@agenticmail/enterprise 0.5.87 → 0.5.88

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,49 @@
1
+ import {
2
+ AgentRuntime,
3
+ EmailChannel,
4
+ FollowUpScheduler,
5
+ SessionManager,
6
+ SubAgentManager,
7
+ ToolRegistry,
8
+ callLLM,
9
+ createAgentRuntime,
10
+ createNoopHooks,
11
+ createRuntimeHooks,
12
+ estimateMessageTokens,
13
+ estimateTokens,
14
+ executeTool,
15
+ runAgentLoop,
16
+ toolsToDefinitions
17
+ } from "./chunk-PGD43XUU.js";
18
+ import "./chunk-NRF3YRF7.js";
19
+ import "./chunk-TYW5XTOW.js";
20
+ import "./chunk-AQH4DFYV.js";
21
+ import "./chunk-JLSQOQ5L.js";
22
+ import {
23
+ PROVIDER_REGISTRY,
24
+ listAllProviders,
25
+ resolveApiKeyForProvider,
26
+ resolveProvider
27
+ } from "./chunk-67KZYSLU.js";
28
+ import "./chunk-KFQGP6VL.js";
29
+ export {
30
+ AgentRuntime,
31
+ EmailChannel,
32
+ FollowUpScheduler,
33
+ PROVIDER_REGISTRY,
34
+ SessionManager,
35
+ SubAgentManager,
36
+ ToolRegistry,
37
+ callLLM,
38
+ createAgentRuntime,
39
+ createNoopHooks,
40
+ createRuntimeHooks,
41
+ estimateMessageTokens,
42
+ estimateTokens,
43
+ executeTool,
44
+ listAllProviders,
45
+ resolveApiKeyForProvider,
46
+ resolveProvider,
47
+ runAgentLoop,
48
+ toolsToDefinitions
49
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ createServer
3
+ } from "./chunk-FOEQH5TZ.js";
4
+ import "./chunk-3SMTCIR4.js";
5
+ import "./chunk-JLSQOQ5L.js";
6
+ import "./chunk-RO537U6H.js";
7
+ import "./chunk-DRXMYYKN.js";
8
+ import "./chunk-67KZYSLU.js";
9
+ import "./chunk-KFQGP6VL.js";
10
+ export {
11
+ createServer
12
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-5SKX72EH.js";
10
+ import "./chunk-QDXUZP7Y.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.87",
3
+ "version": "0.5.88",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4022,6 +4022,8 @@ function MeetingCapabilitiesSection(props) {
4022
4022
  if (cfg.meetingsEnabled) checkMeetingBrowser();
4023
4023
  }, [cfg.meetingsEnabled]);
4024
4024
 
4025
+ var _stopping = useState(false); var stopping = _stopping[0]; var setStopping = _stopping[1];
4026
+
4025
4027
  function launchMeetingBrowser() {
4026
4028
  setLaunching(true);
4027
4029
  engineCall('/bridge/agents/' + agentId + '/browser-config/launch-meeting-browser', { method: 'POST' })
@@ -4033,6 +4035,17 @@ function MeetingCapabilitiesSection(props) {
4033
4035
  .catch(function(e) { toast(e.message, 'error'); setLaunching(false); });
4034
4036
  }
4035
4037
 
4038
+ function stopMeetingBrowser() {
4039
+ setStopping(true);
4040
+ engineCall('/bridge/agents/' + agentId + '/browser-config/stop-meeting-browser', { method: 'POST' })
4041
+ .then(function(d) {
4042
+ if (d.error) { toast(d.error, 'error'); }
4043
+ else { toast('Meeting browser stopped', 'success'); setBrowserStatus(null); }
4044
+ setStopping(false);
4045
+ })
4046
+ .catch(function(e) { toast(e.message, 'error'); setStopping(false); });
4047
+ }
4048
+
4036
4049
  var meetingsOn = cfg.meetingsEnabled === true;
4037
4050
 
4038
4051
  var isContainer = sysCaps && sysCaps.raw && (sysCaps.raw.deployment === 'container');
@@ -4123,8 +4136,17 @@ function MeetingCapabilitiesSection(props) {
4123
4136
  ),
4124
4137
  browserStatus?.ok
4125
4138
  ? h('div', null,
4126
- h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, browserStatus.browserVersion || 'Chromium ready'),
4127
- isObserverOnly && h('span', { className: 'badge', style: { fontSize: 10, padding: '1px 6px', marginLeft: 8, background: 'rgba(33,150,243,0.15)', color: 'var(--accent)' } }, 'Observer Only'),
4139
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 6 } },
4140
+ h('span', { style: { fontSize: 12, color: 'var(--text-muted)' } }, browserStatus.browserVersion || 'Chromium ready'),
4141
+ isObserverOnly && h('span', { className: 'badge', style: { fontSize: 10, padding: '1px 6px', background: 'rgba(33,150,243,0.15)', color: 'var(--accent)' } }, 'Observer Only'),
4142
+ browserStatus.port && h('span', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Port ' + browserStatus.port)
4143
+ ),
4144
+ h('button', {
4145
+ className: 'btn btn-sm',
4146
+ disabled: stopping,
4147
+ onClick: stopMeetingBrowser,
4148
+ style: { background: 'var(--danger)', color: '#fff', border: 'none', marginTop: 4 },
4149
+ }, stopping ? 'Stopping...' : '\u23F9\uFE0F Stop Meeting Browser'),
4128
4150
  isContainer && !canJoinMeetings && !isObserverOnly && h('div', { style: { fontSize: 11, color: 'var(--warning)', marginTop: 4 } },
4129
4151
  '\u26A0 Browser is headless-only on this container. It cannot join video calls (no display/audio).'
4130
4152
  )
@@ -1060,6 +1060,56 @@ export function createAgentRoutes(opts: {
1060
1060
  }
1061
1061
  });
1062
1062
 
1063
+ /**
1064
+ * POST /bridge/agents/:id/browser-config/stop-meeting-browser
1065
+ * Kills the meeting browser process for this agent.
1066
+ */
1067
+ router.post('/bridge/agents/:id/browser-config/stop-meeting-browser', async (c) => {
1068
+ const agentId = c.req.param('id');
1069
+ const managed = lifecycle.getAgent(agentId);
1070
+ if (!managed) return c.json({ error: 'Agent not found' }, 404);
1071
+
1072
+ try {
1073
+ const port = (managed.config as any)?.meetingBrowserPort;
1074
+ if (!port) return c.json({ error: 'No meeting browser is tracked for this agent' }, 400);
1075
+
1076
+ // Try to close gracefully via CDP
1077
+ let closed = false;
1078
+ try {
1079
+ const resp = await fetch(`http://127.0.0.1:${port}/json/version`, { signal: AbortSignal.timeout(2000) });
1080
+ if (resp.ok) {
1081
+ // Get the websocket URL and send Browser.close
1082
+ const data = await resp.json() as any;
1083
+ if (data.webSocketDebuggerUrl) {
1084
+ try {
1085
+ const closeResp = await fetch(`http://127.0.0.1:${port}/json/close`, { method: 'PUT', signal: AbortSignal.timeout(3000) });
1086
+ closed = true;
1087
+ } catch { /* fallback to kill */ }
1088
+ }
1089
+ }
1090
+ } catch { /* not running or not reachable */ }
1091
+
1092
+ // Fallback: kill by port
1093
+ if (!closed) {
1094
+ try {
1095
+ const { execSync } = await import('node:child_process');
1096
+ execSync(`lsof -ti:${port} | xargs kill -9 2>/dev/null || true`, { timeout: 5000 });
1097
+ closed = true;
1098
+ } catch { /* already dead */ }
1099
+ }
1100
+
1101
+ // Clear config
1102
+ delete (managed.config as any).meetingBrowserPort;
1103
+ delete (managed.config as any).meetingBrowserCdpUrl;
1104
+ managed.updatedAt = new Date().toISOString();
1105
+ await lifecycle.saveAgent(agentId);
1106
+
1107
+ return c.json({ ok: true, stopped: true, port });
1108
+ } catch (e: any) {
1109
+ return c.json({ error: 'Failed to stop meeting browser: ' + e.message }, 500);
1110
+ }
1111
+ });
1112
+
1063
1113
  router.post('/bridge/agents/:id/browser-config/test', async (c) => {
1064
1114
  const agentId = c.req.param('id');
1065
1115
  const managed = lifecycle.getAgent(agentId);