@agenticmail/enterprise 0.5.134 → 0.5.136

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-FJHIX7DF.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-OFAE722M.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
50
+ import("./cli-serve-LJTD2ZIG.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
51
51
  break;
52
52
  case "agent":
53
- import("./cli-agent-MNQJEZI5.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
53
+ import("./cli-agent-DIXEAOHB.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
54
54
  break;
55
55
  case "setup":
56
56
  default:
57
- import("./setup-LP6RJ66F.js").then((m) => m.runSetupWizard()).catch(fatal);
57
+ import("./setup-C6KX3OVN.js").then((m) => m.runSetupWizard()).catch(fatal);
58
58
  break;
59
59
  }
60
60
  function fatal(err) {
@@ -228,11 +228,12 @@ function OverviewSection(props) {
228
228
  var rawTraits = identity.personality_traits || identity.traits || config.personality_traits || {};
229
229
  var traitList = Array.isArray(rawTraits) ? rawTraits : Object.values(rawTraits);
230
230
 
231
- var tokensToday = usageData?.tokensToday || usageData?.today?.tokens || 0;
232
- var costToday = usageData?.costToday || usageData?.today?.cost || 0;
233
- var uptime = usageData?.uptime || usageData?.uptimeSeconds || 0;
234
- var errorRate = usageData?.errorRate || usageData?.today?.errorRate || 0;
235
- var activeSessions = usageData?.activeSessions || usageData?.sessions?.active || 0;
231
+ var uu = usageData?.usage || usageData || {};
232
+ var tokensToday = uu.tokensToday || uu.today?.tokens || 0;
233
+ var costToday = uu.costToday || uu.today?.cost || 0;
234
+ var uptime = uu.uptime || uu.uptimeSeconds || usageData?.uptime || 0;
235
+ var errorRate = uu.errorRate || uu.today?.errorRate || 0;
236
+ var activeSessions = uu.activeSessionCount || uu.activeSessions || uu.sessions?.active || 0;
236
237
 
237
238
  if (loading) {
238
239
  return h('div', { style: { padding: 40, textAlign: 'center', color: 'var(--text-muted)' } }, 'Loading overview...');
@@ -1336,12 +1337,13 @@ function BudgetSection(props) {
1336
1337
 
1337
1338
  // ─── Derived Usage Values ───────────────────────────────
1338
1339
 
1339
- var tokensToday = usageData?.tokensToday || usageData?.today?.tokens || 0;
1340
- var tokensMonth = usageData?.tokensMonth || usageData?.month?.tokens || usageData?.thisMonth?.tokens || 0;
1341
- var costToday = usageData?.costToday || usageData?.today?.cost || 0;
1342
- var costMonth = usageData?.costMonth || usageData?.month?.cost || usageData?.thisMonth?.cost || 0;
1343
- var sessionsToday = usageData?.sessionsToday || usageData?.today?.sessions || 0;
1344
- var errorsToday = usageData?.errorsToday || usageData?.today?.errors || 0;
1340
+ var bu = usageData?.usage || usageData || {};
1341
+ var tokensToday = bu.tokensToday || bu.today?.tokens || 0;
1342
+ var tokensMonth = bu.tokensThisMonth || bu.tokensMonth || bu.month?.tokens || 0;
1343
+ var costToday = bu.costToday || bu.today?.cost || 0;
1344
+ var costMonth = bu.costThisMonth || bu.costMonth || bu.month?.cost || 0;
1345
+ var sessionsToday = bu.sessionsToday || bu.today?.sessions || 0;
1346
+ var errorsToday = bu.errorsToday || bu.today?.errors || 0;
1345
1347
 
1346
1348
  // ─── Budget Limits ──────────────────────────────────────
1347
1349
 
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  provision,
15
15
  runSetupWizard
16
- } from "./chunk-42YEZIIA.js";
16
+ } from "./chunk-6SP2YIDD.js";
17
17
  import {
18
18
  ActionJournal,
19
19
  ActivityTracker,
@@ -60,7 +60,7 @@ import {
60
60
  executeTool,
61
61
  runAgentLoop,
62
62
  toolsToDefinitions
63
- } from "./chunk-Y7ZDAH4R.js";
63
+ } from "./chunk-AALG4XI4.js";
64
64
  import "./chunk-TYW5XTOW.js";
65
65
  import "./chunk-AQH4DFYV.js";
66
66
  import {
@@ -76,7 +76,7 @@ import {
76
76
  requireRole,
77
77
  securityHeaders,
78
78
  validate
79
- } from "./chunk-4B5L7JVW.js";
79
+ } from "./chunk-KKRF3VDD.js";
80
80
  import "./chunk-3SMTCIR4.js";
81
81
  import "./chunk-RO537U6H.js";
82
82
  import "./chunk-DRXMYYKN.js";
@@ -90,7 +90,7 @@ import {
90
90
  AgentConfigGenerator,
91
91
  AgentLifecycleManager,
92
92
  DeploymentEngine
93
- } from "./chunk-FUAX3VFP.js";
93
+ } from "./chunk-A6VPPBF6.js";
94
94
  import {
95
95
  CircuitBreaker,
96
96
  CircuitOpenError,
@@ -0,0 +1,10 @@
1
+ import {
2
+ AgentLifecycleManager
3
+ } from "./chunk-A6VPPBF6.js";
4
+ import "./chunk-JLSQOQ5L.js";
5
+ import "./chunk-T6FM7KNN.js";
6
+ import "./chunk-MINPSFLF.js";
7
+ import "./chunk-KFQGP6VL.js";
8
+ export {
9
+ AgentLifecycleManager
10
+ };