@agenticmail/enterprise 0.5.329 → 0.5.331
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.
- package/dist/cli.js +13 -0
- package/logs/cloudflared-error.log +4 -0
- package/logs/enterprise-out.log +1 -0
- package/package.json +4 -3
- package/scripts/preuninstall.js +77 -0
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
|
+
var [major] = process.versions.node.split(".").map(Number);
|
|
5
|
+
if (major < 20) {
|
|
6
|
+
console.error(`
|
|
7
|
+
AgenticMail Enterprise requires Node.js 20 or higher.`);
|
|
8
|
+
console.error(` You are running Node.js ${process.version}.`);
|
|
9
|
+
console.error(`
|
|
10
|
+
To upgrade:`);
|
|
11
|
+
console.error(` brew install node@22 # macOS (Homebrew)`);
|
|
12
|
+
console.error(` nvm install 22 # using nvm`);
|
|
13
|
+
console.error(` curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash - # Linux
|
|
14
|
+
`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
4
17
|
var args = process.argv.slice(2);
|
|
5
18
|
var command = args[0];
|
|
6
19
|
switch (command) {
|
|
@@ -125,3 +125,7 @@
|
|
|
125
125
|
2026-03-05 08:04:33: 2026-03-05T07:04:33Z ERR Request failed error="stream 2045 canceled by remote with error code 0" connIndex=3 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=3eecd57d-03ae-440d-8945-5b35f43a8d90 event=0 ip=198.41.200.53 type=http
|
|
126
126
|
2026-03-05 08:04:33: 2026-03-05T07:04:33Z ERR error="stream 2049 canceled by remote with error code 0" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
|
|
127
127
|
2026-03-05 08:04:33: 2026-03-05T07:04:33Z ERR Request failed error="stream 2049 canceled by remote with error code 0" connIndex=3 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=3eecd57d-03ae-440d-8945-5b35f43a8d90 event=0 ip=198.41.200.53 type=http
|
|
128
|
+
2026-03-05 08:08:16: 2026-03-05T07:08:16Z ERR error="unexpected EOF" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
|
|
129
|
+
2026-03-05 08:08:16: 2026-03-05T07:08:16Z ERR error="unexpected EOF" connIndex=3 event=1 ingressRule=0 originService=http://localhost:3100
|
|
130
|
+
2026-03-05 08:08:16: 2026-03-05T07:08:16Z ERR Request failed error="unexpected EOF" connIndex=3 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=3eecd57d-03ae-440d-8945-5b35f43a8d90 event=0 ip=198.41.200.53 type=http
|
|
131
|
+
2026-03-05 08:08:16: 2026-03-05T07:08:16Z ERR Request failed error="unexpected EOF" connIndex=3 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=3eecd57d-03ae-440d-8945-5b35f43a8d90 event=0 ip=198.41.200.53 type=http
|
package/logs/enterprise-out.log
CHANGED
|
@@ -14,3 +14,4 @@
|
|
|
14
14
|
2026-03-05 08:01:40: Loaded config from /Users/ope/Desktop/projects/agenticmail/enterprise/.env
|
|
15
15
|
2026-03-05 08:01:57: Loaded config from /Users/ope/Desktop/projects/agenticmail/enterprise/.env
|
|
16
16
|
2026-03-05 08:04:00: Loaded config from /Users/ope/Desktop/projects/agenticmail/enterprise/.env
|
|
17
|
+
2026-03-05 08:08:16: Loaded config from /Users/ope/Desktop/projects/agenticmail/enterprise/.env
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/enterprise",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.331",
|
|
4
4
|
"description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "tsup src/index.ts src/cli.ts src/registry/cli.ts --format esm --external better-sqlite3 --external mongodb --external mysql2 --external @libsql/client --external @aws-sdk/client-dynamodb --external @aws-sdk/lib-dynamodb --external @aws-sdk/client-s3 --external @aws-sdk/s3-request-presigner --external @google-cloud/storage --external @azure/storage-blob --external @mozilla/readability --external imapflow --external nodemailer --external linkedom --external postgres --external playwright-core --external ws --external express && mkdir -p dist/dashboard/components dist/dashboard/pages dist/dashboard/vendor dist/dashboard/assets dist/registry && cp src/dashboard/index.html dist/dashboard/ && cp src/dashboard/app.js dist/dashboard/ && cp src/dashboard/components/*.js dist/dashboard/components/ && cp src/dashboard/pages/*.js dist/dashboard/pages/ && rm -rf dist/dashboard/pages/agent-detail && cp -r src/dashboard/pages/agent-detail dist/dashboard/pages/agent-detail && cp src/dashboard/vendor/*.js dist/dashboard/vendor/ && cp -r src/dashboard/assets/* dist/dashboard/assets/ && mkdir -p dist/dashboard/data && cp src/dashboard/data/*.js dist/dashboard/data/ && mkdir -p dist/dashboard/docs && cp src/dashboard/docs/*.html dist/dashboard/docs/ && cp src/dashboard/docs/*.css dist/dashboard/docs/ && mkdir -p dist/assets && cp src/engine/assets/* dist/assets/ && cp src/engine/soul-templates.json dist/",
|
|
20
20
|
"dev": "npm run build && node --watch start-live.mjs",
|
|
21
|
-
"rebuild": "npm run build && pm2 restart enterprise"
|
|
21
|
+
"rebuild": "npm run build && pm2 restart enterprise",
|
|
22
|
+
"preuninstall": "node scripts/preuninstall.js"
|
|
22
23
|
},
|
|
23
24
|
"keywords": [
|
|
24
25
|
"ai",
|
|
@@ -113,7 +114,7 @@
|
|
|
113
114
|
"postgres": "^3.4.0"
|
|
114
115
|
},
|
|
115
116
|
"engines": {
|
|
116
|
-
"node": ">=
|
|
117
|
+
"node": ">=20.0.0"
|
|
117
118
|
},
|
|
118
119
|
"funding": {
|
|
119
120
|
"type": "individual",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Pre-uninstall cleanup for @agenticmail/enterprise
|
|
4
|
+
* Stops PM2 processes and removes LaunchAgent if present.
|
|
5
|
+
* Does NOT delete user data (database, config files) — that's the user's responsibility.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { execSync } = require('child_process');
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const os = require('os');
|
|
12
|
+
|
|
13
|
+
function run(cmd, opts = {}) {
|
|
14
|
+
try {
|
|
15
|
+
return execSync(cmd, { stdio: 'pipe', timeout: 10000, ...opts }).toString().trim();
|
|
16
|
+
} catch { return ''; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function log(msg) { console.log(`[agenticmail-uninstall] ${msg}`); }
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// 1. Stop PM2 processes
|
|
23
|
+
const pm2List = run('pm2 jlist');
|
|
24
|
+
if (pm2List) {
|
|
25
|
+
try {
|
|
26
|
+
const procs = JSON.parse(pm2List);
|
|
27
|
+
const ours = procs.filter(p =>
|
|
28
|
+
p.name === 'enterprise' ||
|
|
29
|
+
(p.pm2_env && p.pm2_env.pm_exec_path && p.pm2_env.pm_exec_path.includes('agenticmail'))
|
|
30
|
+
);
|
|
31
|
+
for (const proc of ours) {
|
|
32
|
+
log(`Stopping PM2 process: ${proc.name} (pid ${proc.pid})`);
|
|
33
|
+
run(`pm2 delete ${proc.pm_id}`);
|
|
34
|
+
}
|
|
35
|
+
if (ours.length > 0) {
|
|
36
|
+
run('pm2 save');
|
|
37
|
+
log(`Stopped and removed ${ours.length} PM2 process(es)`);
|
|
38
|
+
}
|
|
39
|
+
} catch { /* pm2 not available or parse error */ }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 2. Remove LaunchAgent (macOS auto-start)
|
|
43
|
+
if (process.platform === 'darwin') {
|
|
44
|
+
const plistDir = path.join(os.homedir(), 'Library', 'LaunchAgents');
|
|
45
|
+
const plistFiles = ['com.PM2.plist', 'com.agenticmail.plist', 'pm2.' + os.userInfo().username + '.plist'];
|
|
46
|
+
for (const pf of plistFiles) {
|
|
47
|
+
const plistPath = path.join(plistDir, pf);
|
|
48
|
+
if (fs.existsSync(plistPath)) {
|
|
49
|
+
run(`launchctl unload "${plistPath}"`);
|
|
50
|
+
log(`Unloaded LaunchAgent: ${pf}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 3. Remove systemd service (Linux auto-start)
|
|
56
|
+
if (process.platform === 'linux') {
|
|
57
|
+
const serviceFiles = [
|
|
58
|
+
path.join(os.homedir(), '.config', 'systemd', 'user', 'agenticmail.service'),
|
|
59
|
+
'/etc/systemd/system/agenticmail.service',
|
|
60
|
+
];
|
|
61
|
+
for (const sf of serviceFiles) {
|
|
62
|
+
if (fs.existsSync(sf)) {
|
|
63
|
+
const name = path.basename(sf);
|
|
64
|
+
run(`systemctl --user disable ${name} 2>/dev/null || systemctl disable ${name} 2>/dev/null`);
|
|
65
|
+
run(`systemctl --user stop ${name} 2>/dev/null || systemctl stop ${name} 2>/dev/null`);
|
|
66
|
+
log(`Disabled systemd service: ${name}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
log('Cleanup complete. Your database and config files have been preserved.');
|
|
72
|
+
log('To fully remove all data, delete your ~/.agenticmail/ directory and drop your database.');
|
|
73
|
+
|
|
74
|
+
} catch (e) {
|
|
75
|
+
// Never block uninstall
|
|
76
|
+
console.error('[agenticmail-uninstall] Warning: cleanup had errors:', e.message);
|
|
77
|
+
}
|