@agenticmail/enterprise 0.5.192 → 0.5.193
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/chunk-2ZP3V7GQ.js +1206 -0
- package/dist/chunk-KKTVGBSC.js +2862 -0
- package/dist/chunk-ZZXPEZOC.js +3679 -0
- package/dist/cli-agent-XYXSRD2Q.js +1602 -0
- package/dist/cli-serve-OOXMWQUD.js +34 -0
- package/dist/cli.js +3 -3
- package/dist/db-adapter-FBLIO7QY.js +7 -0
- package/dist/index.js +3 -3
- package/dist/server-P7UOPB2B.js +15 -0
- package/dist/setup-GBVE3MRW.js +20 -0
- package/package.json +1 -1
- package/src/engine/db-adapter.ts +6 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./chunk-KFQGP6VL.js";
|
|
2
|
+
|
|
3
|
+
// src/cli-serve.ts
|
|
4
|
+
async function runServe(_args) {
|
|
5
|
+
const DATABASE_URL = process.env.DATABASE_URL;
|
|
6
|
+
const JWT_SECRET = process.env.JWT_SECRET;
|
|
7
|
+
const PORT = parseInt(process.env.PORT || "8080", 10);
|
|
8
|
+
if (!DATABASE_URL) {
|
|
9
|
+
console.error("ERROR: DATABASE_URL environment variable is required");
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
if (!JWT_SECRET) {
|
|
13
|
+
console.error("ERROR: JWT_SECRET environment variable is required");
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
const { createAdapter } = await import("./factory-K32DV2DR.js");
|
|
17
|
+
const { createServer } = await import("./server-P7UOPB2B.js");
|
|
18
|
+
const db = await createAdapter({
|
|
19
|
+
type: DATABASE_URL.startsWith("postgres") ? "postgres" : "sqlite",
|
|
20
|
+
connectionString: DATABASE_URL
|
|
21
|
+
});
|
|
22
|
+
await db.migrate();
|
|
23
|
+
const server = createServer({
|
|
24
|
+
port: PORT,
|
|
25
|
+
db,
|
|
26
|
+
jwtSecret: JWT_SECRET,
|
|
27
|
+
corsOrigins: ["*"]
|
|
28
|
+
});
|
|
29
|
+
await server.start();
|
|
30
|
+
console.log(`AgenticMail Enterprise server running on :${PORT}`);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
runServe
|
|
34
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -51,14 +51,14 @@ Skill Development:
|
|
|
51
51
|
`);
|
|
52
52
|
break;
|
|
53
53
|
case "serve":
|
|
54
|
-
import("./cli-serve-
|
|
54
|
+
import("./cli-serve-OOXMWQUD.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
|
|
55
55
|
break;
|
|
56
56
|
case "agent":
|
|
57
|
-
import("./cli-agent-
|
|
57
|
+
import("./cli-agent-XYXSRD2Q.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
|
|
58
58
|
break;
|
|
59
59
|
case "setup":
|
|
60
60
|
default:
|
|
61
|
-
import("./setup-
|
|
61
|
+
import("./setup-GBVE3MRW.js").then((m) => m.runSetupWizard()).catch(fatal);
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
function fatal(err) {
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
provision,
|
|
9
9
|
runSetupWizard
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2ZP3V7GQ.js";
|
|
11
11
|
import {
|
|
12
12
|
AgenticMailManager,
|
|
13
13
|
GoogleEmailProvider,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
requireRole,
|
|
43
43
|
securityHeaders,
|
|
44
44
|
validate
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-ZZXPEZOC.js";
|
|
46
46
|
import "./chunk-OF4MUWWS.js";
|
|
47
47
|
import {
|
|
48
48
|
PROVIDER_REGISTRY,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
MIGRATIONS_TABLE_POSTGRES,
|
|
80
80
|
sqliteToMySQL,
|
|
81
81
|
sqliteToPostgres
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-KKTVGBSC.js";
|
|
83
83
|
import {
|
|
84
84
|
BUILTIN_SKILLS,
|
|
85
85
|
PRESET_PROFILES,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-ZZXPEZOC.js";
|
|
4
|
+
import "./chunk-OF4MUWWS.js";
|
|
5
|
+
import "./chunk-UF3ZJMJO.js";
|
|
6
|
+
import "./chunk-3OC6RH7W.js";
|
|
7
|
+
import "./chunk-2DDKGTD6.js";
|
|
8
|
+
import "./chunk-YVK6F5OD.js";
|
|
9
|
+
import "./chunk-MKRNEM5A.js";
|
|
10
|
+
import "./chunk-DRXMYYKN.js";
|
|
11
|
+
import "./chunk-6WSX7QXF.js";
|
|
12
|
+
import "./chunk-KFQGP6VL.js";
|
|
13
|
+
export {
|
|
14
|
+
createServer
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-2ZP3V7GQ.js";
|
|
10
|
+
import "./chunk-VQQ4SYYQ.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
package/src/engine/db-adapter.ts
CHANGED
|
@@ -104,6 +104,12 @@ export class EngineDatabase {
|
|
|
104
104
|
count++;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
// Post-migration: ensure critical tables exist (handles partial first-install or re-install scenarios)
|
|
108
|
+
const settingsDDL = this.dialect === 'postgres'
|
|
109
|
+
? `CREATE TABLE IF NOT EXISTS engine_settings (key TEXT PRIMARY KEY, value TEXT, updated_at TIMESTAMP DEFAULT NOW())`
|
|
110
|
+
: `CREATE TABLE IF NOT EXISTS engine_settings (key TEXT PRIMARY KEY, value TEXT, updated_at TEXT DEFAULT (datetime('now')))`;
|
|
111
|
+
try { await this.db.run(settingsDDL); } catch { /* ok — may already exist */ }
|
|
112
|
+
|
|
107
113
|
// Post-migration: fix version columns that were incorrectly created as BOOLEAN on Postgres
|
|
108
114
|
if (this.dialect === 'postgres') {
|
|
109
115
|
try {
|