@agenticmail/enterprise 0.5.158 → 0.5.160

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,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-MBP7N2OQ.js");
17
+ const { createServer } = await import("./server-J36I2HOF.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
@@ -47,14 +47,14 @@ Skill Development:
47
47
  `);
48
48
  break;
49
49
  case "serve":
50
- import("./cli-serve-HJUKIOF3.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
50
+ import("./cli-serve-O4GHSQCU.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
51
51
  break;
52
52
  case "agent":
53
- import("./cli-agent-U7IPCDV4.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
53
+ import("./cli-agent-4OEUTDYO.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
54
54
  break;
55
55
  case "setup":
56
56
  default:
57
- import("./setup-LKGHGM5X.js").then((m) => m.runSetupWizard()).catch(fatal);
57
+ import("./setup-HBSO7Q7P.js").then((m) => m.runSetupWizard()).catch(fatal);
58
58
  break;
59
59
  }
60
60
  function fatal(err) {
@@ -0,0 +1,7 @@
1
+ import {
2
+ EngineDatabase
3
+ } from "./chunk-CTJQFLDO.js";
4
+ import "./chunk-KFQGP6VL.js";
5
+ export {
6
+ EngineDatabase
7
+ };
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  provision,
9
9
  runSetupWizard
10
- } from "./chunk-M3FYDKAX.js";
10
+ } from "./chunk-2A3C24M3.js";
11
11
  import {
12
12
  ActionJournal,
13
13
  ActivityTracker,
@@ -39,7 +39,7 @@ import {
39
39
  MIGRATIONS_TABLE_POSTGRES,
40
40
  sqliteToMySQL,
41
41
  sqliteToPostgres
42
- } from "./chunk-34TJNHXS.js";
42
+ } from "./chunk-CTJQFLDO.js";
43
43
  import {
44
44
  AgentRuntime,
45
45
  EmailChannel,
@@ -69,7 +69,7 @@ import {
69
69
  requireRole,
70
70
  securityHeaders,
71
71
  validate
72
- } from "./chunk-NPQ6LQAB.js";
72
+ } from "./chunk-QBULLAY5.js";
73
73
  import "./chunk-3SMTCIR4.js";
74
74
  import {
75
75
  CircuitBreaker,
@@ -0,0 +1,12 @@
1
+ import {
2
+ createServer
3
+ } from "./chunk-QBULLAY5.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-2A3C24M3.js";
10
+ import "./chunk-MHIFVS5L.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.158",
3
+ "version": "0.5.160",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli-agent.ts CHANGED
@@ -216,12 +216,14 @@ export async function runAgent(_args: string[]) {
216
216
 
217
217
  // 9. Update agent state to 'running'
218
218
  try {
219
- await engineDb.query(
220
- `UPDATE managed_agents SET state = 'running', updated_at = $1 WHERE id = $2`,
221
- [new Date().toISOString(), AGENT_ID]
219
+ await engineDb.execute(
220
+ `UPDATE managed_agents SET state = ?, updated_at = ? WHERE id = ?`,
221
+ ['running', new Date().toISOString(), AGENT_ID]
222
222
  );
223
223
  console.log(' State: running');
224
- } catch {}
224
+ } catch (stateErr: any) {
225
+ console.error(' State update failed:', stateErr.message);
226
+ }
225
227
 
226
228
  // 10. Auto-onboarding + welcome email (runs after short delay to let runtime settle)
227
229
  setTimeout(async () => {
@@ -234,7 +234,6 @@ export class EngineDatabase {
234
234
  INSERT INTO managed_agents (id, org_id, name, display_name, state, config, health, usage, permission_profile_id, version, last_deployed_at, last_health_check_at, created_at, updated_at)
235
235
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
236
236
  ON CONFLICT(id) DO UPDATE SET
237
- state = excluded.state,
238
237
  config = excluded.config,
239
238
  health = excluded.health,
240
239
  permission_profile_id = excluded.permission_profile_id,