@agenticmail/enterprise 0.5.385 → 0.5.387

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.
@@ -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-TOJQGYGA.js");
1237
+ const { createServer: createServer2 } = await import("./server-WX52FFA4.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-TOJQGYGA.js");
1538
+ const { createServer } = await import("./server-WX52FFA4.js");
1539
1539
  const server = createServer({ port: 3e3, db, jwtSecret });
1540
1540
  const handle = await server.start();
1541
1541
  spinner.succeed("Server running");
@@ -3269,7 +3269,7 @@ function createAdminRoutes(db) {
3269
3269
  });
3270
3270
  api.get("/system/update-check", async (c) => {
3271
3271
  try {
3272
- const { checkForUpdate, getCachedUpdateCheck } = await import("./cli-update-6ZZTT5UR.js");
3272
+ const { checkForUpdate, getCachedUpdateCheck } = await import("./cli-update-UM7XCICB.js");
3273
3273
  const cached = getCachedUpdateCheck();
3274
3274
  if (cached && Date.now() - new Date(cached.checkedAt).getTime() < 5 * 6e4) {
3275
3275
  return c.json(cached);
@@ -3282,7 +3282,7 @@ function createAdminRoutes(db) {
3282
3282
  });
3283
3283
  api.post("/system/update", async (c) => {
3284
3284
  try {
3285
- const { performUpdate } = await import("./cli-update-6ZZTT5UR.js");
3285
+ const { performUpdate } = await import("./cli-update-UM7XCICB.js");
3286
3286
  const result = await performUpdate({ restart: true });
3287
3287
  return c.json(result);
3288
3288
  } catch (e) {
@@ -94,7 +94,7 @@ async function runServe(_args) {
94
94
  process.exit(1);
95
95
  }
96
96
  const { createAdapter, smartDbConfig } = await import("./factory-XRYYBBCW.js");
97
- const { createServer } = await import("./server-TOJQGYGA.js");
97
+ const { createServer } = await import("./server-WX52FFA4.js");
98
98
  const db = await createAdapter(smartDbConfig(DATABASE_URL));
99
99
  await db.migrate();
100
100
  const server = createServer({
@@ -106,7 +106,7 @@ async function runServe(_args) {
106
106
  await server.start();
107
107
  console.log(`AgenticMail Enterprise server running on :${PORT}`);
108
108
  try {
109
- const { startBackgroundUpdateCheck } = await import("./cli-update-6ZZTT5UR.js");
109
+ const { startBackgroundUpdateCheck } = await import("./cli-update-UM7XCICB.js");
110
110
  startBackgroundUpdateCheck();
111
111
  } catch {
112
112
  }
@@ -43,11 +43,29 @@ async function checkForUpdate() {
43
43
  const current = getCurrentVersion();
44
44
  const latest = await getLatestVersion();
45
45
  const updateAvailable = latest !== "unknown" && current !== "unknown" && latest !== current;
46
+ let releaseNotes;
47
+ let releaseUrl;
48
+ if (updateAvailable) {
49
+ try {
50
+ const ghRes = await fetch(`https://api.github.com/repos/agenticmail/enterprise/releases/tags/v${latest}`, {
51
+ headers: { "Accept": "application/vnd.github.v3+json", "User-Agent": "AgenticMail-Enterprise" },
52
+ signal: AbortSignal.timeout(5e3)
53
+ });
54
+ if (ghRes.ok) {
55
+ const gh = await ghRes.json();
56
+ releaseNotes = gh.body || void 0;
57
+ releaseUrl = gh.html_url || void 0;
58
+ }
59
+ } catch {
60
+ }
61
+ }
46
62
  const info = {
47
63
  current,
48
64
  latest,
49
65
  updateAvailable,
50
- checkedAt: (/* @__PURE__ */ new Date()).toISOString()
66
+ checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
67
+ releaseNotes,
68
+ releaseUrl
51
69
  };
52
70
  try {
53
71
  const cacheDir = join(homedir(), ".agenticmail");
@@ -113,10 +131,22 @@ async function performUpdate(options) {
113
131
  return script.includes("agenticmail") || script.includes("enterprise");
114
132
  });
115
133
  if (amProcs.length > 0) {
116
- const names = amProcs.map((p) => p.name).join(" ");
117
- console.log(` Restarting: ${names}`);
118
- execSync(`pm2 restart ${names}`, { stdio: "inherit", timeout: 3e4 });
119
- execSync("pm2 save", { stdio: "ignore", timeout: 1e4 });
134
+ const sorted = amProcs.sort((a, b) => {
135
+ const aIsServer = a.name === "enterprise" || a.name === "agenticmail";
136
+ const bIsServer = b.name === "enterprise" || b.name === "agenticmail";
137
+ return aIsServer ? 1 : bIsServer ? -1 : 0;
138
+ });
139
+ for (const proc of sorted) {
140
+ console.log(` Restarting: ${proc.name}`);
141
+ try {
142
+ execSync(`pm2 restart ${proc.name}`, { stdio: "inherit", timeout: 15e3 });
143
+ } catch {
144
+ }
145
+ }
146
+ try {
147
+ execSync("pm2 save", { stdio: "ignore", timeout: 1e4 });
148
+ } catch {
149
+ }
120
150
  console.log(` \u2705 All services restarted`);
121
151
  } else {
122
152
  console.log(` \u26A0\uFE0F No PM2 processes found \u2014 restart manually if needed`);
package/dist/cli.js CHANGED
@@ -61,18 +61,18 @@ Skill Development:
61
61
  break;
62
62
  case "update":
63
63
  case "upgrade":
64
- import("./cli-update-6ZZTT5UR.js").then((m) => m.runUpdate(args.slice(1))).catch(fatal);
64
+ import("./cli-update-UM7XCICB.js").then((m) => m.runUpdate(args.slice(1))).catch(fatal);
65
65
  break;
66
66
  case "serve":
67
67
  case "start":
68
- import("./cli-serve-I52AEZVE.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
68
+ import("./cli-serve-GA5EXFOE.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
69
69
  break;
70
70
  case "agent":
71
71
  import("./cli-agent-3MGMIL4H.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
72
72
  break;
73
73
  case "setup":
74
74
  default:
75
- import("./setup-3Y2P2ELB.js").then((m) => m.runSetupWizard()).catch(fatal);
75
+ import("./setup-KK3N57HP.js").then((m) => m.runSetupWizard()).catch(fatal);
76
76
  break;
77
77
  }
78
78
  function fatal(err) {
@@ -558,35 +558,42 @@ function App() {
558
558
  h('button', { className: 'btn btn-ghost btn-sm', onClick: () => setShow2faReminder(false), style: { padding: '2px 6px', minWidth: 0 } }, '\u00d7')
559
559
  ),
560
560
  // Update available banner
561
- updateInfo && h('div', { style: { display: 'flex', alignItems: 'center', gap: 12, padding: '10px 16px', margin: '0 0 16px', background: 'rgba(16,185,129,0.1)', border: '1px solid rgba(16,185,129,0.4)', borderRadius: 8, fontSize: 13 } },
562
- h('span', { style: { fontSize: 18 } }, '\uD83C\uDF80'),
563
- h('div', { style: { flex: 1 } },
564
- h('strong', null, 'Update Available'),
565
- h('span', { style: { color: 'var(--text-secondary)', marginLeft: 6 } },
566
- 'v' + updateInfo.current + ' \u2192 v' + updateInfo.latest
567
- )
568
- ),
569
- h('button', {
570
- className: 'btn btn-sm',
571
- disabled: updating,
572
- style: { background: 'rgba(16,185,129,0.9)', color: '#fff', border: 'none' },
573
- onClick: async () => {
574
- setUpdating(true);
575
- try {
576
- const r = await apiCall('/system/update', { method: 'POST' });
577
- if (r?.success) {
578
- setUpdateInfo(null);
579
- showToast && showToast('Updated to v' + r.to + ' — services restarting...', 'success');
580
- } else {
581
- showToast && showToast('Update failed: ' + (r?.message || 'unknown'), 'error');
561
+ updateInfo && h('div', { style: { padding: '12px 16px', margin: '0 0 16px', background: 'rgba(16,185,129,0.08)', border: '1px solid rgba(16,185,129,0.3)', borderRadius: 10, fontSize: 13 } },
562
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 10 } },
563
+ h('span', { style: { fontSize: 18 } }, '\uD83C\uDF80'),
564
+ h('div', { style: { flex: 1 } },
565
+ h('strong', null, 'Update Available'),
566
+ h('span', { style: { color: 'var(--text-secondary)', marginLeft: 6 } },
567
+ 'v' + updateInfo.current + ' \u2192 v' + updateInfo.latest
568
+ )
569
+ ),
570
+ h('button', {
571
+ className: 'btn btn-sm',
572
+ disabled: updating,
573
+ style: { background: 'rgba(16,185,129,0.9)', color: '#fff', border: 'none' },
574
+ onClick: async () => {
575
+ setUpdating(true);
576
+ try {
577
+ const r = await apiCall('/system/update', { method: 'POST' });
578
+ if (r?.success) {
579
+ setUpdateInfo(null);
580
+ toast('Updated to v' + r.to + ' — services restarting...', 'success');
581
+ } else {
582
+ toast('Update failed: ' + (r?.message || 'unknown'), 'error');
583
+ }
584
+ } catch (e) {
585
+ toast('Update failed: ' + e.message, 'error');
582
586
  }
583
- } catch (e) {
584
- showToast && showToast('Update failed: ' + e.message, 'error');
587
+ setUpdating(false);
585
588
  }
586
- setUpdating(false);
587
- }
588
- }, updating ? 'Updating...' : 'Update Now'),
589
- h('button', { className: 'btn btn-ghost btn-sm', onClick: () => setUpdateInfo(null), style: { padding: '2px 6px', minWidth: 0 } }, '\u00d7')
589
+ }, updating ? 'Updating...' : 'Update Now'),
590
+ h('button', { className: 'btn btn-ghost btn-sm', onClick: () => setUpdateInfo(null), style: { padding: '2px 6px', minWidth: 0 } }, '\u00d7')
591
+ ),
592
+ updateInfo.releaseNotes && h('div', { style: { marginTop: 10, paddingTop: 10, borderTop: '1px solid rgba(16,185,129,0.2)', color: 'var(--text-secondary)', fontSize: 12, lineHeight: 1.5, whiteSpace: 'pre-wrap', maxHeight: 150, overflowY: 'auto' } },
593
+ h('div', { style: { fontWeight: 600, color: 'var(--text-primary)', marginBottom: 4, fontSize: 12 } }, "What's New:"),
594
+ updateInfo.releaseNotes
595
+ ),
596
+ updateInfo.releaseUrl && h('a', { href: updateInfo.releaseUrl, target: '_blank', style: { display: 'inline-block', marginTop: 6, fontSize: 11, color: 'rgba(16,185,129,0.9)' } }, 'View full release notes \u2192')
590
597
  ),
591
598
  selectedAgentId
592
599
  ? h(AgentDetailPage, { agentId: selectedAgentId, onBack: () => { _setSelectedAgentId(null); _setPage('agents'); history.pushState(null, '', '/dashboard/agents'); } })
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  provision,
3
3
  runSetupWizard
4
- } from "./chunk-I2ZF3D7V.js";
4
+ } from "./chunk-FP4QC3T5.js";
5
5
  import {
6
6
  AgenticMailManager,
7
7
  GoogleEmailProvider,
@@ -42,7 +42,7 @@ import {
42
42
  requireRole,
43
43
  securityHeaders,
44
44
  validate
45
- } from "./chunk-UPCU6RPK.js";
45
+ } from "./chunk-QIDDLWRL.js";
46
46
  import "./chunk-DJBCRQTD.js";
47
47
  import {
48
48
  PROVIDER_REGISTRY,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-UPCU6RPK.js";
3
+ } from "./chunk-QIDDLWRL.js";
4
4
  import "./chunk-DJBCRQTD.js";
5
5
  import "./chunk-UF3ZJMJO.js";
6
6
  import "./chunk-ACP7QSXU.js";
@@ -6,7 +6,7 @@ import {
6
6
  promptRegistration,
7
7
  provision,
8
8
  runSetupWizard
9
- } from "./chunk-I2ZF3D7V.js";
9
+ } from "./chunk-FP4QC3T5.js";
10
10
  import "./chunk-P6W565WH.js";
11
11
  import "./chunk-KFQGP6VL.js";
12
12
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.385",
3
+ "version": "0.5.387",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {