@agenticmail/enterprise 0.5.611 → 0.5.613

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 (43) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/{agent-heartbeat-PHLWJ3HO.js → agent-heartbeat-HFDBZWMO.js} +1 -1
  3. package/dist/{agent-tools-KRMDJOCK.js → agent-tools-5LLIXV6A.js} +17 -6
  4. package/dist/{chunk-NMMTMHTA.js → chunk-GC77MDKW.js} +37 -31
  5. package/dist/{chunk-BUKTZ35L.js → chunk-H3JXMBTG.js} +3 -6
  6. package/dist/{chunk-I2T4HESC.js → chunk-IXAWHXMY.js} +16 -16
  7. package/dist/{chunk-5EMB2S53.js → chunk-MVD2DMAY.js} +2 -2
  8. package/dist/{chunk-TBBVEXBH.js → chunk-QVZIW5HI.js} +14 -0
  9. package/dist/{chunk-REAJCMQE.js → chunk-T26AVIAQ.js} +3 -6
  10. package/dist/chunk-UETRFOSR.js +80 -0
  11. package/dist/{chunk-KQ5EU4IA.js → chunk-VWIDJRD4.js} +49 -32
  12. package/dist/{cli-agent-V7K6HZAG.js → cli-agent-AMA2R4PG.js} +18 -12
  13. package/dist/{cli-serve-T3W5RDO4.js → cli-serve-4NLB4RK2.js} +2 -2
  14. package/dist/cli.js +3 -3
  15. package/dist/{deployer-BKBISKKF.js → deployer-M4YHMATN.js} +2 -1
  16. package/dist/index.js +12 -11
  17. package/dist/meetings-SPK24WE7.js +1 -1
  18. package/dist/{routes-VX5CXX4J.js → routes-5PUCWC4N.js} +4 -3
  19. package/dist/{runtime-RMLNHLAT.js → runtime-GML2LXIN.js} +2 -1
  20. package/dist/{server-64K32C5T.js → server-R5SICPBI.js} +5 -4
  21. package/dist/{setup-7AQLYQBS.js → setup-SLLV37YT.js} +1 -1
  22. package/dist/{telegram-NG7PNNIN.js → telegram-W765VRI5.js} +1 -1
  23. package/dist/{whatsapp-RAQUV6ZL.js → whatsapp-TBOB7TDL.js} +1 -1
  24. package/dist/workspace-P5FCSG2D.js +19 -0
  25. package/package.json +1 -1
  26. package/logs/cloudflared-error.log +0 -9
  27. package/logs/cloudflared-error__2026-05-21_00-00-00.log +0 -59
  28. package/logs/cloudflared-error__2026-05-22_00-00-00.log +0 -739
  29. package/logs/cloudflared-error__2026-05-23_00-00-00.log +0 -1432
  30. package/logs/cloudflared-error__2026-05-24_00-00-00.log +0 -1117
  31. package/logs/cloudflared-error__2026-05-25_00-00-00.log +0 -410
  32. package/logs/cloudflared-out.log +0 -0
  33. package/logs/enterprise-error.log +0 -11
  34. package/logs/enterprise-out.log +0 -225
  35. package/logs/fola-error.log +0 -2
  36. package/logs/fola-out.log +0 -0
  37. package/logs/john-error.log +0 -8
  38. package/logs/john-error__2026-03-06_00-00-00.log +0 -10
  39. package/logs/john-error__2026-03-07_00-00-00.log +0 -25
  40. package/logs/john-out.log +0 -0
  41. package/test-gemma4.mjs +0 -703
  42. /package/dist/{chunk-CC4BHZHO.js → chunk-GAOEALTJ.js} +0 -0
  43. /package/dist/{integrations-4JDIOHQU.js → integrations-UWDEQ7Z4.js} +0 -0
@@ -1,3 +1,7 @@
1
+ import {
2
+ AgentStatusTracker,
3
+ init_agent_status
4
+ } from "./chunk-FQWJMPKW.js";
1
5
  import {
2
6
  DatabaseConnectionManager,
3
7
  init_connection_manager,
@@ -7,6 +11,12 @@ import {
7
11
  init_agent_tools,
8
12
  init_types
9
13
  } from "./chunk-TK55CSBH.js";
14
+ import {
15
+ AgentConfigGenerator,
16
+ DeploymentEngine,
17
+ init_agent_config,
18
+ init_deployer
19
+ } from "./chunk-QVZIW5HI.js";
10
20
  import {
11
21
  init_messaging_history,
12
22
  storeMessage
@@ -28,10 +38,6 @@ import {
28
38
  TaskQueueManager,
29
39
  init_task_queue
30
40
  } from "./chunk-ET6WZFPS.js";
31
- import {
32
- AgentStatusTracker,
33
- init_agent_status
34
- } from "./chunk-FQWJMPKW.js";
35
41
  import {
36
42
  BUILTIN_SKILLS,
37
43
  PRESET_PROFILES,
@@ -39,12 +45,6 @@ import {
39
45
  SKILL_SUITES,
40
46
  init_skills as init_skills2
41
47
  } from "./chunk-HGBLI5HF.js";
42
- import {
43
- AgentConfigGenerator,
44
- DeploymentEngine,
45
- init_agent_config,
46
- init_deployer
47
- } from "./chunk-TBBVEXBH.js";
48
48
  import {
49
49
  getConfig,
50
50
  init_transport_encryption,
@@ -760,6 +760,25 @@ var init_lifecycle = __esm({
760
760
  this.agents.set(agent.id, agent);
761
761
  await this.persistAgent(agent);
762
762
  this.emitEvent(agent, "created", { createdBy });
763
+ try {
764
+ const { ensureAgentWorkspace, renderWorkspaceMarkdown } = await import("./workspace-P5FCSG2D.js");
765
+ const displayName = config.identity?.displayName || config.displayName || config.name;
766
+ const wsRoot = ensureAgentWorkspace(agent.id, displayName);
767
+ try {
768
+ const { memoryManager: memoryManager2 } = await import("./routes-5PUCWC4N.js");
769
+ await memoryManager2.createMemory({
770
+ agentId: agent.id,
771
+ orgId,
772
+ category: "system_notice",
773
+ title: "My permanent workspace location",
774
+ content: renderWorkspaceMarkdown(wsRoot, displayName),
775
+ source: "system",
776
+ importance: "high"
777
+ });
778
+ } catch {
779
+ }
780
+ } catch {
781
+ }
763
782
  return agent;
764
783
  }
765
784
  /**
@@ -7055,7 +7074,7 @@ function createAgentRoutes(opts) {
7055
7074
  });
7056
7075
  router.post("/system/install-pm2", async (c) => {
7057
7076
  try {
7058
- const { ensurePm2 } = await import("./deployer-BKBISKKF.js");
7077
+ const { ensurePm2 } = await import("./deployer-M4YHMATN.js");
7059
7078
  const result = await ensurePm2();
7060
7079
  if (result.installed) {
7061
7080
  return c.json({ success: true, message: `PM2 ${result.version} installed successfully` });
@@ -7311,7 +7330,7 @@ function createAgentRoutes(opts) {
7311
7330
  }
7312
7331
  const managedAgent = await lifecycle2.createAgent(orgId, config, actor);
7313
7332
  try {
7314
- const { knowledgeBase: kbEngine } = await import("./routes-VX5CXX4J.js");
7333
+ const { knowledgeBase: kbEngine } = await import("./routes-5PUCWC4N.js");
7315
7334
  const allKbs = kbEngine.getAllKnowledgeBases();
7316
7335
  const clientOrgId = managedAgent?.clientOrgId || config?.clientOrgId || null;
7317
7336
  let kbAssigned = 0;
@@ -9256,7 +9275,7 @@ function createAgentRoutes(opts) {
9256
9275
  try {
9257
9276
  const body = await c.req.json().catch(() => ({}));
9258
9277
  const mode = body.mode || "";
9259
- const { createWhatsAppTools } = await import("./whatsapp-RAQUV6ZL.js");
9278
+ const { createWhatsAppTools } = await import("./whatsapp-TBOB7TDL.js");
9260
9279
  const dataDir = process.env.DATA_DIR || "/tmp/agenticmail-data";
9261
9280
  const connId = mode === "business" ? `biz-${agentId}` : agentId;
9262
9281
  const connDir = mode === "business" ? `${dataDir}/agents/${agentId}/whatsapp-business` : `${dataDir}/agents/${agentId}/whatsapp`;
@@ -9273,7 +9292,7 @@ function createAgentRoutes(opts) {
9273
9292
  const agentId = c.req.param("id");
9274
9293
  const mode = c.req.query("mode") || "";
9275
9294
  try {
9276
- const { getConnectionStatus } = await import("./whatsapp-RAQUV6ZL.js");
9295
+ const { getConnectionStatus } = await import("./whatsapp-TBOB7TDL.js");
9277
9296
  const connId = mode === "business" ? `biz-${agentId}` : agentId;
9278
9297
  return c.json(getConnectionStatus(connId));
9279
9298
  } catch {
@@ -9286,7 +9305,7 @@ function createAgentRoutes(opts) {
9286
9305
  const body = await c.req.json().catch(() => ({}));
9287
9306
  const mode = body.mode || "";
9288
9307
  const connId = mode === "business" ? `biz-${agentId}` : agentId;
9289
- const { sendTestMessage } = await import("./whatsapp-RAQUV6ZL.js");
9308
+ const { sendTestMessage } = await import("./whatsapp-TBOB7TDL.js");
9290
9309
  const result = await sendTestMessage(connId, body.to);
9291
9310
  return c.json(result);
9292
9311
  } catch (err) {
@@ -9297,7 +9316,7 @@ function createAgentRoutes(opts) {
9297
9316
  const agentId = c.req.param("id");
9298
9317
  try {
9299
9318
  const body = await c.req.json();
9300
- const { getConnection } = await import("./whatsapp-RAQUV6ZL.js");
9319
+ const { getConnection } = await import("./whatsapp-TBOB7TDL.js");
9301
9320
  const conn = getConnection(agentId);
9302
9321
  if (!conn?.connected) return c.json({ error: "Not connected" }, 503);
9303
9322
  const toJid = (to) => to?.includes("@") ? to : (to || "").replace(/[^0-9]/g, "") + "@s.whatsapp.net";
@@ -9341,7 +9360,7 @@ function createAgentRoutes(opts) {
9341
9360
  try {
9342
9361
  const body = await c.req.json().catch(() => ({}));
9343
9362
  const mode = body.mode || "";
9344
- const { createWhatsAppTools } = await import("./whatsapp-RAQUV6ZL.js");
9363
+ const { createWhatsAppTools } = await import("./whatsapp-TBOB7TDL.js");
9345
9364
  const dataDir = process.env.DATA_DIR || "/tmp/agenticmail-data";
9346
9365
  const connId = mode === "business" ? `biz-${agentId}` : agentId;
9347
9366
  const connDir = mode === "business" ? `${dataDir}/agents/${agentId}/whatsapp-business` : `${dataDir}/agents/${agentId}/whatsapp`;
@@ -24422,15 +24441,16 @@ var init_messaging_poller = __esm({
24422
24441
  port: agents[0].port || 3100
24423
24442
  };
24424
24443
  if (this.config.getCapability("whatsapp")) {
24425
- var dataDir = process.env.DATA_DIR || "/tmp/agenticmail-data";
24444
+ var { getAgentWorkspaceDir } = await import("./workspace-P5FCSG2D.js");
24445
+ var { join: _join } = await import("path");
24426
24446
  var agentEndpoints = [];
24427
24447
  for (var ag of agents) {
24428
24448
  var ep = { id: ag.id, displayName: ag.displayName || ag.name || "Agent", host: ag.host || "localhost", port: ag.port || 3100 };
24429
- agentEndpoints.push({ id: ag.id, dataDir: `${dataDir}/agents/${ag.id}/whatsapp`, endpoint: ep });
24449
+ agentEndpoints.push({ id: ag.id, dataDir: _join(getAgentWorkspaceDir(ag.id), "whatsapp"), endpoint: ep });
24430
24450
  await this.startWhatsApp(ep);
24431
24451
  }
24432
24452
  try {
24433
- var { autoStartConnections } = await import("./whatsapp-RAQUV6ZL.js");
24453
+ var { autoStartConnections } = await import("./whatsapp-TBOB7TDL.js");
24434
24454
  await autoStartConnections(agentEndpoints.map((a) => ({ id: a.id, dataDir: a.dataDir })));
24435
24455
  } catch (err) {
24436
24456
  console.error("[messaging] WhatsApp auto-start failed:", err.message);
@@ -24544,7 +24564,7 @@ var init_messaging_poller = __esm({
24544
24564
  // ─── WhatsApp (event-driven — Baileys WebSocket) ──
24545
24565
  async startWhatsApp(agent) {
24546
24566
  try {
24547
- var { onWhatsAppMessage } = await import("./whatsapp-RAQUV6ZL.js");
24567
+ var { onWhatsAppMessage } = await import("./whatsapp-TBOB7TDL.js");
24548
24568
  var unsub = onWhatsAppMessage(agent.id, (msg) => {
24549
24569
  var waMediaFiles;
24550
24570
  if (msg.mediaPath && msg.mediaType) {
@@ -24570,7 +24590,7 @@ var init_messaging_poller = __esm({
24570
24590
  }
24571
24591
  // ─── Telegram (webhook preferred, polling fallback) ─
24572
24592
  async startTelegram(botToken, agent) {
24573
- var { setTelegramWebhook, deleteTelegramWebhook, getTelegramWebhookInfo } = await import("./telegram-NG7PNNIN.js");
24593
+ var { setTelegramWebhook, deleteTelegramWebhook, getTelegramWebhookInfo } = await import("./telegram-W765VRI5.js");
24574
24594
  var { randomBytes: randomBytes2 } = await import("crypto");
24575
24595
  var webhookSecret = randomBytes2(32).toString("hex");
24576
24596
  if (this.config.publicUrl && this.config.app) {
@@ -24649,7 +24669,7 @@ var init_messaging_poller = __esm({
24649
24669
  offset = await loadOffset();
24650
24670
  while (running && this.running) {
24651
24671
  try {
24652
- var { pollTelegramUpdates } = await import("./telegram-NG7PNNIN.js");
24672
+ var { pollTelegramUpdates } = await import("./telegram-W765VRI5.js");
24653
24673
  var { updates, nextOffset } = await pollTelegramUpdates(botToken, offset, 25);
24654
24674
  if (nextOffset > offset) {
24655
24675
  offset = nextOffset;
@@ -24766,13 +24786,10 @@ ${desc}` : desc;
24766
24786
  var downloadUrl = `https://api.telegram.org/file/bot${botToken}/${filePath}`;
24767
24787
  var response = await fetch(downloadUrl);
24768
24788
  if (!response.ok) return null;
24769
- var { join: join3, dirname: dirname3 } = await import("path");
24770
- var { mkdirSync, writeFileSync } = await import("fs");
24771
- var mediaDir = join3(agent.dataDir || `/tmp/agents/${agent.id}`, "media");
24772
- try {
24773
- mkdirSync(mediaDir, { recursive: true });
24774
- } catch {
24775
- }
24789
+ var { join: join3 } = await import("path");
24790
+ var { writeFileSync } = await import("fs");
24791
+ var { getAgentSubdir } = await import("./workspace-P5FCSG2D.js");
24792
+ var mediaDir = getAgentSubdir(agent.id, "media");
24776
24793
  var ext = filePath.split(".").pop() || (mediaType === "photo" ? "jpg" : "bin");
24777
24794
  var localName = fileName || `${mediaType}-${Date.now()}.${ext}`;
24778
24795
  var localPath = join3(mediaDir, localName);
@@ -25042,7 +25059,7 @@ ${desc}` : desc;
25042
25059
  var typingJson = await typingResp.json();
25043
25060
  console.log(`[messaging] Telegram typing sent to ${chatId}: ${JSON.stringify(typingJson)}`);
25044
25061
  } else if (ctx.source === "whatsapp") {
25045
- var { getConnection } = await import("./whatsapp-RAQUV6ZL.js");
25062
+ var { getConnection } = await import("./whatsapp-TBOB7TDL.js");
25046
25063
  var conn = getConnection(agent.id);
25047
25064
  if (!conn?.connected) return;
25048
25065
  var jid = ctx.senderId.includes("@") ? ctx.senderId : ctx.senderId.replace(/[^0-9]/g, "") + "@s.whatsapp.net";
@@ -25057,7 +25074,7 @@ ${desc}` : desc;
25057
25074
  async sendDirectReply(agent, ctx, text) {
25058
25075
  try {
25059
25076
  if (ctx.source === "whatsapp") {
25060
- var { getConnection } = await import("./whatsapp-RAQUV6ZL.js");
25077
+ var { getConnection } = await import("./whatsapp-TBOB7TDL.js");
25061
25078
  var conn = getConnection(agent.id);
25062
25079
  if (!conn?.connected) return;
25063
25080
  var jid = ctx.senderId.includes("@") ? ctx.senderId : ctx.senderId.replace(/[^0-9]/g, "") + "@s.whatsapp.net";
@@ -2,13 +2,19 @@ import {
2
2
  TaskQueueManager,
3
3
  init_task_queue
4
4
  } from "./chunk-ET6WZFPS.js";
5
+ import {
6
+ getAgentSubdir,
7
+ init_workspace
8
+ } from "./chunk-UETRFOSR.js";
5
9
  import "./chunk-KFQGP6VL.js";
6
10
 
7
11
  // src/cli-agent.ts
12
+ init_workspace();
8
13
  init_task_queue();
9
14
  import { Hono } from "hono";
10
15
  import { serve } from "@hono/node-server";
11
16
  import { existsSync, readFileSync, writeFileSync } from "fs";
17
+ import { join as _joinPath } from "path";
12
18
 
13
19
  // src/engine/task-queue-before-spawn.ts
14
20
  function extractTaskMetadata(task) {
@@ -889,7 +895,7 @@ async function runAgent(_args) {
889
895
  const agent = agentRow[0];
890
896
  console.log(` Agent: ${agent.display_name || agent.name}`);
891
897
  console.log(` State: ${agent.state}`);
892
- const routes = await import("./routes-VX5CXX4J.js");
898
+ const routes = await import("./routes-5PUCWC4N.js");
893
899
  await routes.lifecycle.setDb(engineDb);
894
900
  await routes.lifecycle.loadFromDb();
895
901
  routes.lifecycle.standaloneMode = true;
@@ -957,7 +963,7 @@ async function runAgent(_args) {
957
963
  }
958
964
  Object.assign(dbApiKeys, fresh);
959
965
  try {
960
- const routesMod = await import("./routes-VX5CXX4J.js");
966
+ const routesMod = await import("./routes-5PUCWC4N.js");
961
967
  routesMod.knowledgeBase?.setApiKeys?.(dbApiKeys);
962
968
  } catch {
963
969
  }
@@ -998,10 +1004,10 @@ async function runAgent(_args) {
998
1004
  setInterval(() => {
999
1005
  void _loadProviderKeys();
1000
1006
  }, 3e4).unref();
1001
- const { createAgentRuntime } = await import("./runtime-RMLNHLAT.js");
1007
+ const { createAgentRuntime } = await import("./runtime-GML2LXIN.js");
1002
1008
  let orgIntMgr = null;
1003
1009
  try {
1004
- const { orgIntegrations: oi } = await import("./routes-VX5CXX4J.js");
1010
+ const { orgIntegrations: oi } = await import("./routes-5PUCWC4N.js");
1005
1011
  orgIntMgr = oi;
1006
1012
  } catch {
1007
1013
  }
@@ -1388,7 +1394,7 @@ Please complete this task now.`,
1388
1394
  console.log(`[TaskPoller] Delivered recovery response to Telegram chat ${dc.chatId}`);
1389
1395
  }
1390
1396
  } else if (dc.channel === "whatsapp") {
1391
- const { getOrCreateConnection, toJid } = await import("./whatsapp-RAQUV6ZL.js");
1397
+ const { getOrCreateConnection, toJid } = await import("./whatsapp-TBOB7TDL.js");
1392
1398
  const conn = await getOrCreateConnection(agentId);
1393
1399
  if (conn.connected && conn.sock) {
1394
1400
  await conn.sock.sendMessage(toJid(dc.chatId), { text: lastText.trim() });
@@ -1590,7 +1596,7 @@ Please complete this task now.`,
1590
1596
  }
1591
1597
  if (scope === "all" || scope === "permissions") {
1592
1598
  try {
1593
- const { permissionEngine } = await import("./routes-VX5CXX4J.js");
1599
+ const { permissionEngine } = await import("./routes-5PUCWC4N.js");
1594
1600
  await permissionEngine.setDb(engineDb);
1595
1601
  reloaded.push("permissions");
1596
1602
  } catch {
@@ -1630,7 +1636,7 @@ Please complete this task now.`,
1630
1636
  }
1631
1637
  if (scope === "all" || scope === "guardrails") {
1632
1638
  try {
1633
- const { guardrails } = await import("./routes-VX5CXX4J.js");
1639
+ const { guardrails } = await import("./routes-5PUCWC4N.js");
1634
1640
  await guardrails.loadFromDb?.();
1635
1641
  reloaded.push("guardrails");
1636
1642
  } catch {
@@ -1719,7 +1725,7 @@ Please complete this task now.`,
1719
1725
  });
1720
1726
  }
1721
1727
  } else if (ctx.source === "whatsapp") {
1722
- import("./whatsapp-RAQUV6ZL.js").then(({ getConnection }) => {
1728
+ import("./whatsapp-TBOB7TDL.js").then(({ getConnection }) => {
1723
1729
  const conn = getConnection(AGENT_ID);
1724
1730
  if (!conn?.connected) return;
1725
1731
  const jid = ctx.senderEmail.includes("@") ? ctx.senderEmail : ctx.senderEmail.replace(/[^0-9]/g, "") + "@s.whatsapp.net";
@@ -2089,7 +2095,7 @@ ${ambientContext}` : ""
2089
2095
  if (isMessagingSource) {
2090
2096
  if (ctx.source === "whatsapp") {
2091
2097
  try {
2092
- const { getOrCreateConnection, toJid } = await import("./whatsapp-RAQUV6ZL.js");
2098
+ const { getOrCreateConnection, toJid } = await import("./whatsapp-TBOB7TDL.js");
2093
2099
  const conn = await getOrCreateConnection(AGENT_ID);
2094
2100
  if (conn.connected && conn.sock) {
2095
2101
  await conn.sock.sendMessage(toJid(ctx.senderEmail), { text: _stripMd(lastText) });
@@ -2343,7 +2349,7 @@ ${identity.personality.slice(0, 800)}` : "";
2343
2349
  if (defaultWaChat) waChatIds.add(String(defaultWaChat));
2344
2350
  if (waChatIds.size > 0) {
2345
2351
  try {
2346
- const { getConnection, toJid } = await import("./whatsapp-RAQUV6ZL.js");
2352
+ const { getConnection, toJid } = await import("./whatsapp-TBOB7TDL.js");
2347
2353
  const conn = await getConnection(agentId);
2348
2354
  if (conn?.connected && conn?.sock) {
2349
2355
  for (const chatId of waChatIds) {
@@ -2832,7 +2838,7 @@ Available tools: ${providerType === "imap" ? "email_send (to, subject, body)" :
2832
2838
  console.log("[guardrails] Disabled via autonomy settings");
2833
2839
  }
2834
2840
  try {
2835
- const { AgentHeartbeatManager } = await import("./agent-heartbeat-PHLWJ3HO.js");
2841
+ const { AgentHeartbeatManager } = await import("./agent-heartbeat-HFDBZWMO.js");
2836
2842
  const hbOrgRows = await engineDb.query(`SELECT org_id FROM managed_agents WHERE id = $1`, [AGENT_ID]);
2837
2843
  const hbOrgId = hbOrgRows?.[0]?.org_id || "";
2838
2844
  const hbManagerEmail = config.managerEmail || (config.manager?.type === "external" ? config.manager.email : null);
@@ -2917,7 +2923,7 @@ async function startCalendarPolling(agentId, config, runtime, _engineDb, _memory
2917
2923
  };
2918
2924
  const CALENDAR_POLL_INTERVAL = 5 * 6e4;
2919
2925
  const joinedMeetings = /* @__PURE__ */ new Set();
2920
- const joinedMeetingsFile = `/tmp/agenticmail-joined-meetings-${agentId}.json`;
2926
+ const joinedMeetingsFile = _joinPath(getAgentSubdir(agentId, "data"), "joined-meetings.json");
2921
2927
  try {
2922
2928
  if (existsSync(joinedMeetingsFile)) {
2923
2929
  const data = JSON.parse(readFileSync(joinedMeetingsFile, "utf-8"));
@@ -94,7 +94,7 @@ async function runServe(_args) {
94
94
  process.exit(1);
95
95
  }
96
96
  const { createAdapter, smartDbConfig } = await import("./factory-RUGZPU7W.js");
97
- const { createServer } = await import("./server-64K32C5T.js");
97
+ const { createServer } = await import("./server-R5SICPBI.js");
98
98
  const db = await createAdapter(smartDbConfig(DATABASE_URL));
99
99
  await db.migrate();
100
100
  const server = createServer({
@@ -120,7 +120,7 @@ async function runServe(_args) {
120
120
  });
121
121
  setTimeout(async () => {
122
122
  try {
123
- const routes = await import("./routes-VX5CXX4J.js");
123
+ const routes = await import("./routes-5PUCWC4N.js");
124
124
  setWatcherRuntime(
125
125
  () => routes.getRuntime?.() || null
126
126
  );
package/dist/cli.js CHANGED
@@ -65,14 +65,14 @@ Skill Development:
65
65
  break;
66
66
  case "serve":
67
67
  case "start":
68
- import("./cli-serve-T3W5RDO4.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
68
+ import("./cli-serve-4NLB4RK2.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
69
69
  break;
70
70
  case "agent":
71
- import("./cli-agent-V7K6HZAG.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
71
+ import("./cli-agent-AMA2R4PG.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
72
72
  break;
73
73
  case "setup":
74
74
  default:
75
- import("./setup-7AQLYQBS.js").then((m) => m.runSetupWizard()).catch(fatal);
75
+ import("./setup-SLLV37YT.js").then((m) => m.runSetupWizard()).catch(fatal);
76
76
  break;
77
77
  }
78
78
  function fatal(err) {
@@ -2,7 +2,8 @@ import {
2
2
  DeploymentEngine,
3
3
  ensurePm2,
4
4
  init_deployer
5
- } from "./chunk-TBBVEXBH.js";
5
+ } from "./chunk-QVZIW5HI.js";
6
+ import "./chunk-UETRFOSR.js";
6
7
  import "./chunk-KFQGP6VL.js";
7
8
  init_deployer();
8
9
  export {
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  provision,
15
15
  runSetupWizard
16
- } from "./chunk-5EMB2S53.js";
16
+ } from "./chunk-MVD2DMAY.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-NMMTMHTA.js";
31
+ } from "./chunk-GC77MDKW.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-I2T4HESC.js";
45
+ } from "./chunk-IXAWHXMY.js";
46
46
  import "./chunk-DJBCRQTD.js";
47
47
  import {
48
48
  PROVIDER_REGISTRY,
@@ -83,7 +83,8 @@ import {
83
83
  init_storage_manager,
84
84
  init_tenant,
85
85
  init_workforce
86
- } from "./chunk-KQ5EU4IA.js";
86
+ } from "./chunk-VWIDJRD4.js";
87
+ import "./chunk-FQWJMPKW.js";
87
88
  import "./chunk-K2GKUQSB.js";
88
89
  import "./chunk-TK55CSBH.js";
89
90
  import {
@@ -96,6 +97,12 @@ import {
96
97
  sqliteToMySQL,
97
98
  sqliteToPostgres
98
99
  } from "./chunk-CZPHXLRP.js";
100
+ import {
101
+ AgentConfigGenerator,
102
+ DeploymentEngine,
103
+ init_agent_config,
104
+ init_deployer
105
+ } from "./chunk-QVZIW5HI.js";
99
106
  import "./chunk-Z7NVD3OQ.js";
100
107
  import {
101
108
  AgentMemoryManager,
@@ -105,19 +112,13 @@ import "./chunk-AF3WSNVX.js";
105
112
  import "./chunk-V6QTSKGO.js";
106
113
  import "./chunk-74ZCQKYU.js";
107
114
  import "./chunk-ET6WZFPS.js";
108
- import "./chunk-FQWJMPKW.js";
115
+ import "./chunk-UETRFOSR.js";
109
116
  import {
110
117
  BUILTIN_SKILLS,
111
118
  PRESET_PROFILES,
112
119
  PermissionEngine,
113
120
  init_skills
114
121
  } from "./chunk-HGBLI5HF.js";
115
- import {
116
- AgentConfigGenerator,
117
- DeploymentEngine,
118
- init_agent_config,
119
- init_deployer
120
- } from "./chunk-TBBVEXBH.js";
121
122
  import "./chunk-FLQ5FLHW.js";
122
123
  import "./chunk-GBW6SJPH.js";
123
124
  import "./chunk-X5IZUXDC.js";
@@ -2,7 +2,7 @@ import {
2
2
  createMeetingTools,
3
3
  ensureBrowser,
4
4
  sendChatMessage
5
- } from "./chunk-CC4BHZHO.js";
5
+ } from "./chunk-GAOEALTJ.js";
6
6
  import "./chunk-X5IZUXDC.js";
7
7
  import "./chunk-KFQGP6VL.js";
8
8
  export {
@@ -37,18 +37,19 @@ import {
37
37
  tenants,
38
38
  vault,
39
39
  workforce
40
- } from "./chunk-KQ5EU4IA.js";
40
+ } from "./chunk-VWIDJRD4.js";
41
+ import "./chunk-FQWJMPKW.js";
41
42
  import "./chunk-K2GKUQSB.js";
42
43
  import "./chunk-TK55CSBH.js";
44
+ import "./chunk-QVZIW5HI.js";
43
45
  import "./chunk-Z7NVD3OQ.js";
44
46
  import "./chunk-VSBC4SWO.js";
45
47
  import "./chunk-AF3WSNVX.js";
46
48
  import "./chunk-V6QTSKGO.js";
47
49
  import "./chunk-74ZCQKYU.js";
48
50
  import "./chunk-ET6WZFPS.js";
49
- import "./chunk-FQWJMPKW.js";
51
+ import "./chunk-UETRFOSR.js";
50
52
  import "./chunk-HGBLI5HF.js";
51
- import "./chunk-TBBVEXBH.js";
52
53
  import "./chunk-FLQ5FLHW.js";
53
54
  import "./chunk-WUAWWKTN.js";
54
55
  import "./chunk-YDD5TC5Q.js";
@@ -16,7 +16,7 @@ import {
16
16
  runAgentLoop,
17
17
  toolsToDefinitions,
18
18
  truncateToolResults
19
- } from "./chunk-NMMTMHTA.js";
19
+ } from "./chunk-GC77MDKW.js";
20
20
  import {
21
21
  PROVIDER_REGISTRY,
22
22
  listAllProviders,
@@ -24,6 +24,7 @@ import {
24
24
  resolveProvider
25
25
  } from "./chunk-FP7JCKYO.js";
26
26
  import "./chunk-BBM4POWP.js";
27
+ import "./chunk-UETRFOSR.js";
27
28
  import "./chunk-KFQGP6VL.js";
28
29
  export {
29
30
  AgentRuntime,
@@ -1,20 +1,21 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-I2T4HESC.js";
3
+ } from "./chunk-IXAWHXMY.js";
4
4
  import "./chunk-DJBCRQTD.js";
5
5
  import "./chunk-FP7JCKYO.js";
6
- import "./chunk-KQ5EU4IA.js";
6
+ import "./chunk-VWIDJRD4.js";
7
+ import "./chunk-FQWJMPKW.js";
7
8
  import "./chunk-K2GKUQSB.js";
8
9
  import "./chunk-TK55CSBH.js";
10
+ import "./chunk-QVZIW5HI.js";
9
11
  import "./chunk-Z7NVD3OQ.js";
10
12
  import "./chunk-VSBC4SWO.js";
11
13
  import "./chunk-AF3WSNVX.js";
12
14
  import "./chunk-V6QTSKGO.js";
13
15
  import "./chunk-74ZCQKYU.js";
14
16
  import "./chunk-ET6WZFPS.js";
15
- import "./chunk-FQWJMPKW.js";
17
+ import "./chunk-UETRFOSR.js";
16
18
  import "./chunk-HGBLI5HF.js";
17
- import "./chunk-TBBVEXBH.js";
18
19
  import "./chunk-FLQ5FLHW.js";
19
20
  import "./chunk-GBW6SJPH.js";
20
21
  import "./chunk-X5IZUXDC.js";
@@ -6,7 +6,7 @@ import {
6
6
  promptRegistration,
7
7
  provision,
8
8
  runSetupWizard
9
- } from "./chunk-5EMB2S53.js";
9
+ } from "./chunk-MVD2DMAY.js";
10
10
  import "./chunk-UQRQ2JN3.js";
11
11
  import "./chunk-KFQGP6VL.js";
12
12
  export {
@@ -5,7 +5,7 @@ import {
5
5
  init_telegram,
6
6
  pollTelegramUpdates,
7
7
  setTelegramWebhook
8
- } from "./chunk-REAJCMQE.js";
8
+ } from "./chunk-T26AVIAQ.js";
9
9
  import "./chunk-KFQGP6VL.js";
10
10
  init_telegram();
11
11
  export {
@@ -12,7 +12,7 @@ import {
12
12
  onWhatsAppMessage,
13
13
  sendTestMessage,
14
14
  toJid
15
- } from "./chunk-BUKTZ35L.js";
15
+ } from "./chunk-H3JXMBTG.js";
16
16
  import "./chunk-KFQGP6VL.js";
17
17
  init_whatsapp();
18
18
  export {
@@ -0,0 +1,19 @@
1
+ import {
2
+ WORKSPACE_SUBDIRS,
3
+ ensureAgentWorkspace,
4
+ getAgentSubdir,
5
+ getAgentWorkspaceDir,
6
+ getWorkspaceBase,
7
+ init_workspace,
8
+ renderWorkspaceMarkdown
9
+ } from "./chunk-UETRFOSR.js";
10
+ import "./chunk-KFQGP6VL.js";
11
+ init_workspace();
12
+ export {
13
+ WORKSPACE_SUBDIRS,
14
+ ensureAgentWorkspace,
15
+ getAgentSubdir,
16
+ getAgentWorkspaceDir,
17
+ getWorkspaceBase,
18
+ renderWorkspaceMarkdown
19
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.611",
3
+ "version": "0.5.613",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,9 +0,0 @@
1
- 2026-05-25 03:40:19: 2026-05-25T07:40:19Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
2
- 2026-05-25 03:40:19: 2026-05-25T07:40:19Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=0 dest=https://enterprise.agenticmail.io/ event=0 ip=198.41.200.13 type=http
3
- 2026-05-25 05:14:48: 2026-05-25T09:14:48Z WRN Your version 2026.2.0 is outdated. We recommend upgrading it to 2026.5.0
4
- 2026-05-25 07:56:07: 2026-05-25T11:56:07Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
5
- 2026-05-25 07:56:07: 2026-05-25T11:56:07Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=3 dest=http://enterprise.agenticmail.io/ event=0 ip=198.41.200.53 type=http
6
- 2026-05-25 09:39:26: 2026-05-25T13:39:26Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 event=1 ingressRule=0 originService=http://localhost:3100
7
- 2026-05-25 09:39:26: 2026-05-25T13:39:26Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=2 dest=http://enterprise.agenticmail.io/ event=0 ip=198.41.192.77 type=http
8
- 2026-05-25 12:49:34: 2026-05-25T16:49:34Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=1 event=1 ingressRule=0 originService=http://localhost:3100
9
- 2026-05-25 12:49:34: 2026-05-25T16:49:34Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:3100: connect: connection refused" connIndex=1 dest=https://enterprise.agenticmail.io/ event=0 ip=198.41.192.37 type=http