@agenticmail/enterprise 0.5.492 → 0.5.494

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.
@@ -0,0 +1,203 @@
1
+ import { h, useState, useEffect, useCallback } from './utils.js';
2
+
3
+ // ─── Three animated canvas backgrounds for the login page ───
4
+ // Randomly picks one on each page load. Only shown when no custom company background.
5
+
6
+ var CHARS_BLOCK = '\u2591\u2592\u2593\u2588\u2580\u2584\u258C\u2590\u2502\u2500\u2524\u251C\u2534\u252C\u256D\u256E\u2570\u256F';
7
+ var CHARS_DOT = '\u00B7\u2218\u25CB\u25EF\u25CC\u25CF\u25C9';
8
+
9
+ function renderSphere(ctx, rect, time) {
10
+ var centerX = rect.width / 2;
11
+ var centerY = rect.height / 2;
12
+ var radius = Math.min(rect.width, rect.height) * 0.525;
13
+
14
+ ctx.font = '12px monospace';
15
+ ctx.textAlign = 'center';
16
+ ctx.textBaseline = 'middle';
17
+
18
+ var points = [];
19
+
20
+ for (var phi = 0; phi < Math.PI * 2; phi += 0.15) {
21
+ for (var theta = 0; theta < Math.PI; theta += 0.15) {
22
+ var x = Math.sin(theta) * Math.cos(phi + time * 0.5);
23
+ var y = Math.sin(theta) * Math.sin(phi + time * 0.5);
24
+ var z = Math.cos(theta);
25
+
26
+ var rotY = time * 0.3;
27
+ var newX = x * Math.cos(rotY) - z * Math.sin(rotY);
28
+ var newZ = x * Math.sin(rotY) + z * Math.cos(rotY);
29
+
30
+ var rotX = time * 0.2;
31
+ var newY = y * Math.cos(rotX) - newZ * Math.sin(rotX);
32
+ var finalZ = y * Math.sin(rotX) + newZ * Math.cos(rotX);
33
+
34
+ var depth = (finalZ + 1) / 2;
35
+ var charIndex = Math.floor(depth * (CHARS_BLOCK.length - 1));
36
+
37
+ points.push({ x: centerX + newX * radius, y: centerY + newY * radius, z: finalZ, ch: CHARS_BLOCK[charIndex] });
38
+ }
39
+ }
40
+
41
+ points.sort(function(a, b) { return a.z - b.z; });
42
+ points.forEach(function(p) {
43
+ var alpha = 0.15 + (p.z + 1) * 0.3;
44
+ ctx.fillStyle = 'rgba(120, 120, 140, ' + alpha + ')';
45
+ ctx.fillText(p.ch, p.x, p.y);
46
+ });
47
+ }
48
+
49
+ function renderTetrahedron(ctx, rect, time) {
50
+ var centerX = rect.width / 2;
51
+ var centerY = rect.height / 2;
52
+ var scale = Math.min(rect.width, rect.height) * 0.7;
53
+
54
+ ctx.font = '18px monospace';
55
+ ctx.textAlign = 'center';
56
+ ctx.textBaseline = 'middle';
57
+
58
+ var verts = [
59
+ { x: 0, y: 1, z: 0 },
60
+ { x: -0.943, y: -0.333, z: -0.5 },
61
+ { x: 0.943, y: -0.333, z: -0.5 },
62
+ { x: 0, y: -0.333, z: 1 },
63
+ ];
64
+
65
+ var edges = [[0,1],[0,2],[0,3],[1,2],[2,3],[3,1]];
66
+ var faces = [[0,1,2],[0,2,3],[0,3,1],[1,3,2]];
67
+
68
+ function rotY(p, a) { return { x: p.x * Math.cos(a) - p.z * Math.sin(a), y: p.y, z: p.x * Math.sin(a) + p.z * Math.cos(a) }; }
69
+ function rotX(p, a) { return { x: p.x, y: p.y * Math.cos(a) - p.z * Math.sin(a), z: p.y * Math.sin(a) + p.z * Math.cos(a) }; }
70
+ function rotZ(p, a) { return { x: p.x * Math.cos(a) - p.y * Math.sin(a), y: p.x * Math.sin(a) + p.y * Math.cos(a), z: p.z }; }
71
+
72
+ var points = [];
73
+
74
+ edges.forEach(function(e) {
75
+ var v1 = verts[e[0]], v2 = verts[e[1]];
76
+ for (var t = 0; t <= 1; t += 0.05) {
77
+ var pt = { x: v1.x + (v2.x - v1.x) * t, y: v1.y + (v2.y - v1.y) * t, z: v1.z + (v2.z - v1.z) * t };
78
+ pt = rotY(pt, time * 0.4); pt = rotX(pt, time * 0.3); pt = rotZ(pt, time * 0.2);
79
+ var d = (pt.z + 1.5) / 3;
80
+ var ci = Math.min(Math.floor(d * (CHARS_BLOCK.length - 1)), CHARS_BLOCK.length - 1);
81
+ points.push({ x: centerX + pt.x * scale, y: centerY - pt.y * scale, z: pt.z, ch: CHARS_BLOCK[ci] });
82
+ }
83
+ });
84
+
85
+ faces.forEach(function(f) {
86
+ var v1 = verts[f[0]], v2 = verts[f[1]], v3 = verts[f[2]];
87
+ for (var u = 0; u <= 1; u += 0.12) {
88
+ for (var v = 0; v <= 1 - u; v += 0.12) {
89
+ var w = 1 - u - v;
90
+ var pt = { x: v1.x * u + v2.x * v + v3.x * w, y: v1.y * u + v2.y * v + v3.y * w, z: v1.z * u + v2.z * v + v3.z * w };
91
+ pt = rotY(pt, time * 0.4); pt = rotX(pt, time * 0.3); pt = rotZ(pt, time * 0.2);
92
+ var d = (pt.z + 1.5) / 3;
93
+ var ci = Math.min(Math.floor(d * (CHARS_BLOCK.length - 1)), CHARS_BLOCK.length - 1);
94
+ points.push({ x: centerX + pt.x * scale, y: centerY - pt.y * scale, z: pt.z, ch: CHARS_BLOCK[ci] });
95
+ }
96
+ }
97
+ });
98
+
99
+ points.sort(function(a, b) { return a.z - b.z; });
100
+ points.forEach(function(p) {
101
+ var alpha = 0.1 + (p.z + 1.5) * 0.2;
102
+ ctx.fillStyle = 'rgba(120, 120, 140, ' + Math.min(alpha, 0.7) + ')';
103
+ ctx.fillText(p.ch, p.x, p.y);
104
+ });
105
+ }
106
+
107
+ function renderWave(ctx, rect, time) {
108
+ ctx.font = '14px monospace';
109
+ ctx.textAlign = 'center';
110
+ ctx.textBaseline = 'middle';
111
+
112
+ var cols = Math.floor(rect.width / 20);
113
+ var rows = Math.floor(rect.height / 20);
114
+
115
+ for (var y = 0; y < rows; y++) {
116
+ for (var x = 0; x < cols; x++) {
117
+ var px = (x + 0.5) * (rect.width / cols);
118
+ var py = (y + 0.5) * (rect.height / rows);
119
+
120
+ var wave1 = Math.sin(x * 0.2 + time * 2) * Math.cos(y * 0.15 + time);
121
+ var wave2 = Math.sin((x + y) * 0.1 + time * 1.5);
122
+ var wave3 = Math.cos(x * 0.1 - y * 0.1 + time * 0.8);
123
+
124
+ var combined = (wave1 + wave2 + wave3) / 3;
125
+ var normalized = (combined + 1) / 2;
126
+
127
+ var charIndex = Math.floor(normalized * (CHARS_DOT.length - 1));
128
+ var alpha = 0.1 + normalized * 0.4;
129
+
130
+ ctx.fillStyle = 'rgba(120, 120, 140, ' + alpha + ')';
131
+ ctx.fillText(CHARS_DOT[charIndex], px, py);
132
+ }
133
+ }
134
+ }
135
+
136
+ var RENDERERS = [
137
+ { fn: renderSphere, speed: 0.02 },
138
+ { fn: renderTetrahedron, speed: 0.015 },
139
+ { fn: renderWave, speed: 0.03 },
140
+ ];
141
+
142
+ export function LoginAnimation() {
143
+ var _choice = useState(function() { return Math.floor(Math.random() * RENDERERS.length); });
144
+ var choice = _choice[0];
145
+
146
+ var canvasRef = useCallback(function(canvas) {
147
+ if (!canvas) return;
148
+ var ctx = canvas.getContext('2d');
149
+ if (!ctx) return;
150
+
151
+ var renderer = RENDERERS[choice];
152
+ var time = 0;
153
+ var frameId = 0;
154
+
155
+ function resize() {
156
+ var dpr = window.devicePixelRatio || 1;
157
+ var rect = canvas.getBoundingClientRect();
158
+ canvas.width = rect.width * dpr;
159
+ canvas.height = rect.height * dpr;
160
+ ctx.scale(dpr, dpr);
161
+ }
162
+
163
+ resize();
164
+ window.addEventListener('resize', resize);
165
+
166
+ function render() {
167
+ var rect = canvas.getBoundingClientRect();
168
+ ctx.clearRect(0, 0, rect.width, rect.height);
169
+ renderer.fn(ctx, rect, time);
170
+ time += renderer.speed;
171
+ frameId = requestAnimationFrame(render);
172
+ }
173
+
174
+ render();
175
+
176
+ canvas._cleanup = function() {
177
+ window.removeEventListener('resize', resize);
178
+ cancelAnimationFrame(frameId);
179
+ };
180
+ }, [choice]);
181
+
182
+ useEffect(function() {
183
+ return function() {
184
+ // Cleanup on unmount — find canvas and call cleanup
185
+ var c = document.getElementById('login-anim-canvas');
186
+ if (c && c._cleanup) c._cleanup();
187
+ };
188
+ }, []);
189
+
190
+ return h('canvas', {
191
+ id: 'login-anim-canvas',
192
+ ref: canvasRef,
193
+ style: {
194
+ position: 'absolute',
195
+ top: 0,
196
+ left: 0,
197
+ width: '100%',
198
+ height: '100%',
199
+ zIndex: 0,
200
+ pointerEvents: 'none',
201
+ }
202
+ });
203
+ }
@@ -197,7 +197,9 @@ function RoutingRowEditor(props) {
197
197
  modelId: modelId,
198
198
  providers: providers,
199
199
  onChange: function(p, m) {
200
- onChange(p && m ? p + '/' + m : '');
200
+ if (p && m) onChange(p + '/' + m);
201
+ else if (p) onChange(p + '/');
202
+ else onChange('');
201
203
  }
202
204
  }),
203
205
  h('div', { style: { fontSize: 11, color: 'var(--text-muted)', marginTop: 4, fontStyle: 'italic' } }, 'Recommended: ' + ctx.rec),
@@ -741,9 +743,15 @@ export function ConfigurationSection(props) {
741
743
  setEditingRouting(true);
742
744
  },
743
745
  onSave: function() {
746
+ // Clean routing: strip entries with provider but no model (e.g. "anthropic/")
747
+ var cleanRouting = {};
748
+ Object.keys(routingForm).forEach(function(k) {
749
+ var v = routingForm[k] || '';
750
+ cleanRouting[k] = v.endsWith('/') ? '' : v;
751
+ });
744
752
  saveUpdates({
745
- modelRouting: routingForm,
746
- voiceConfig: Object.assign({}, config.voiceConfig || {}, { chatModel: routingForm.chat || '', meetingModel: routingForm.meeting || '' }),
753
+ modelRouting: cleanRouting,
754
+ voiceConfig: Object.assign({}, config.voiceConfig || {}, { chatModel: cleanRouting.chat || '', meetingModel: cleanRouting.meeting || '' }),
747
755
  }, function() { setEditingRouting(false); });
748
756
  },
749
757
  onCancel: function() { setEditingRouting(false); }
@@ -2,6 +2,7 @@ import { h, useState, useEffect, useCallback, Fragment } from '../components/uti
2
2
  import { apiCall, authCall, engineCall } from '../components/utils.js';
3
3
  import { I } from '../components/icons.js';
4
4
  import { E } from '../assets/icons/emoji-icons.js';
5
+ import { LoginAnimation } from '../components/login-animations.js';
5
6
 
6
7
  var _b = typeof window !== 'undefined' && window.__EM_BRANDING__ || {};
7
8
  var _brandLogo = _b.login_logo || _b.logo || _brandLogo;
@@ -128,8 +129,9 @@ export function LoginPage({ onLogin }) {
128
129
  // ─── 2FA Verification Screen ──────────────────────────
129
130
 
130
131
  if (needs2fa) {
131
- return h('div', { className: 'login-page', style: _brandBg ? { backgroundImage: 'url(' + _brandBg + ')', backgroundSize: 'cover', backgroundPosition: 'center' } : {} },
132
- h('div', { className: 'login-card' },
132
+ return h('div', { className: 'login-page', style: Object.assign({ position: 'relative', overflow: 'hidden' }, _brandBg ? { backgroundImage: 'url(' + _brandBg + ')', backgroundSize: 'cover', backgroundPosition: 'center' } : {}) },
133
+ !_brandBg && h(LoginAnimation),
134
+ h('div', { className: 'login-card', style: { position: 'relative', zIndex: 1 } },
133
135
  h('div', { className: 'login-logo' },
134
136
  h('img', { src: _brandLogo, alt: 'AgenticMail', style: { width: 48, height: 48, objectFit: 'contain' } }),
135
137
  h('h1', null, 'Two-Factor Authentication'),
@@ -161,8 +163,9 @@ export function LoginPage({ onLogin }) {
161
163
  // ─── Forgot Password Screen ──────────────────────────
162
164
 
163
165
  if (forgotMode) {
164
- return h('div', { className: 'login-page', style: _brandBg ? { backgroundImage: 'url(' + _brandBg + ')', backgroundSize: 'cover', backgroundPosition: 'center' } : {} },
165
- h('div', { className: 'login-card' },
166
+ return h('div', { className: 'login-page', style: Object.assign({ position: 'relative', overflow: 'hidden' }, _brandBg ? { backgroundImage: 'url(' + _brandBg + ')', backgroundSize: 'cover', backgroundPosition: 'center' } : {}) },
167
+ !_brandBg && h(LoginAnimation),
168
+ h('div', { className: 'login-card', style: { position: 'relative', zIndex: 1 } },
166
169
  h('div', { className: 'login-logo' },
167
170
  h('img', { src: _brandLogo, alt: 'AgenticMail', style: { width: 48, height: 48, objectFit: 'contain' } }),
168
171
  h('h1', null, 'Reset Password'),
@@ -257,8 +260,9 @@ export function LoginPage({ onLogin }) {
257
260
 
258
261
  // ─── Main Login Screen ────────────────────────────────
259
262
 
260
- return h('div', { className: 'login-page', style: _brandBg ? { backgroundImage: 'url(' + _brandBg + ')', backgroundSize: 'cover', backgroundPosition: 'center' } : {} },
261
- h('div', { className: 'login-card' },
263
+ return h('div', { className: 'login-page', style: Object.assign({ position: 'relative', overflow: 'hidden' }, _brandBg ? { backgroundImage: 'url(' + _brandBg + ')', backgroundSize: 'cover', backgroundPosition: 'center' } : {}) },
264
+ !_brandBg && h(LoginAnimation),
265
+ h('div', { className: 'login-card', style: { position: 'relative', zIndex: 1 } },
262
266
  h('div', { className: 'login-logo' },
263
267
  h('img', { src: _brandLogo, alt: 'AgenticMail', style: { width: 48, height: 48, objectFit: 'contain' } }),
264
268
  h('h1', null, 'AgenticMail Enterprise'),
@@ -563,3 +563,15 @@
563
563
  2026-03-14 04:50:35: 2026-03-14T03:50:35Z INF Registered tunnel connection connIndex=3 connection=edaea301-0814-452a-816f-f78a2c49c9e5 event=0 ip=198.41.200.23 location=atl15 protocol=quic
564
564
  2026-03-14 04:50:35: 2026-03-14T03:50:35Z INF Registered tunnel connection connIndex=2 connection=7e9be2c3-35ca-48ee-9fc9-8bb982e3c6ba event=0 ip=198.41.192.167 location=atl06 protocol=quic
565
565
  2026-03-14 04:50:35: 2026-03-14T03:50:35Z INF Registered tunnel connection connIndex=1 connection=bb94f936-08f3-49db-9d1a-364d2e05be2f event=0 ip=198.41.200.113 location=atl10 protocol=quic
566
+ 2026-03-14 04:56:00: 2026-03-14T03:56:00Z ERR error="stream 5 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
567
+ 2026-03-14 04:56:00: 2026-03-14T03:56:00Z ERR Request failed error="stream 5 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/polymarket/67ba24f1-c8af-40b4-9df5-c05b81fc1e7a/price-stream event=0 ip=198.41.192.37 type=http
568
+ 2026-03-14 04:56:04: 2026-03-14T03:56:04Z ERR error="stream 1 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
569
+ 2026-03-14 04:56:04: 2026-03-14T03:56:04Z ERR Request failed error="stream 1 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/polymarket/stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.37 type=http
570
+ 2026-03-14 05:04:27: 2026-03-14T04:04:27Z ERR error="stream 633 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
571
+ 2026-03-14 05:04:27: 2026-03-14T04:04:27Z ERR Request failed error="stream 633 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream event=0 ip=198.41.192.37 type=http
572
+ 2026-03-14 05:04:29: 2026-03-14T04:04:29Z ERR error="stream 673 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
573
+ 2026-03-14 05:04:29: 2026-03-14T04:04:29Z ERR Request failed error="stream 673 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.37 type=http
574
+ 2026-03-14 05:04:56: 2026-03-14T04:04:56Z ERR error="stream 713 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
575
+ 2026-03-14 05:04:56: 2026-03-14T04:04:56Z ERR Request failed error="stream 713 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.37 type=http
576
+ 2026-03-14 05:13:03: 2026-03-14T04:13:03Z ERR error="stream 653 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
577
+ 2026-03-14 05:13:03: 2026-03-14T04:13:03Z ERR Request failed error="stream 653 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=67ba24f1-c8af-40b4-9df5-c05b81fc1e7a event=0 ip=198.41.192.37 type=http
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.492",
3
+ "version": "0.5.494",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {