@agenticmail/enterprise 0.5.15 → 0.5.16

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,47 @@
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-7PFGWQMJ.js";
18
+ import {
19
+ PROVIDER_REGISTRY,
20
+ listAllProviders,
21
+ resolveApiKeyForProvider,
22
+ resolveProvider
23
+ } from "./chunk-ZNR5DDTA.js";
24
+ import "./chunk-TYW5XTOW.js";
25
+ import "./chunk-JLSQOQ5L.js";
26
+ import "./chunk-KFQGP6VL.js";
27
+ export {
28
+ AgentRuntime,
29
+ EmailChannel,
30
+ FollowUpScheduler,
31
+ PROVIDER_REGISTRY,
32
+ SessionManager,
33
+ SubAgentManager,
34
+ ToolRegistry,
35
+ callLLM,
36
+ createAgentRuntime,
37
+ createNoopHooks,
38
+ createRuntimeHooks,
39
+ estimateMessageTokens,
40
+ estimateTokens,
41
+ executeTool,
42
+ listAllProviders,
43
+ resolveApiKeyForProvider,
44
+ resolveProvider,
45
+ runAgentLoop,
46
+ toolsToDefinitions
47
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ createServer
3
+ } from "./chunk-LJNMWZ7Z.js";
4
+ import "./chunk-ZNR5DDTA.js";
5
+ import "./chunk-RO537U6H.js";
6
+ import "./chunk-DRXMYYKN.js";
7
+ import "./chunk-JLSQOQ5L.js";
8
+ import "./chunk-KFQGP6VL.js";
9
+ export {
10
+ createServer
11
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-TXWPXWDR.js";
10
+ import "./chunk-6TDW6ZNI.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.15",
3
+ "version": "0.5.16",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,6 +11,11 @@
11
11
  import { createHash, randomBytes, createCipheriv, createDecipheriv, pbkdf2Sync } from 'crypto';
12
12
  import type { EngineDatabase } from './db-adapter.js';
13
13
 
14
+ function safeJsonParse(val: string | null | undefined, fallback: any = {}): any {
15
+ if (!val) return fallback;
16
+ try { return JSON.parse(val); } catch { return fallback; }
17
+ }
18
+
14
19
  // ─── Types ──────────────────────────────────────────────
15
20
 
16
21
  export interface VaultConfig {
@@ -113,7 +118,7 @@ export class SecureVault {
113
118
  name: r.name,
114
119
  category: r.category,
115
120
  encryptedValue: r.encrypted_value,
116
- metadata: JSON.parse(r.metadata || '{}'),
121
+ metadata: safeJsonParse(r.metadata),
117
122
  createdBy: r.created_by,
118
123
  createdAt: r.created_at,
119
124
  updatedAt: r.updated_at,
@@ -415,7 +420,7 @@ export class SecureVault {
415
420
  const rows = await this.engineDb.query<any>('SELECT * FROM deploy_credentials');
416
421
 
417
422
  for (const row of rows) {
418
- const config = JSON.parse(row.config || '{}');
423
+ const config = safeJsonParse(row.config);
419
424
 
420
425
  // Skip already-encrypted configs
421
426
  if (config._encrypted) continue;
@@ -514,7 +519,7 @@ export class SecureVault {
514
519
  action: r.action,
515
520
  actor: r.actor,
516
521
  ip: r.ip || undefined,
517
- metadata: JSON.parse(r.metadata || '{}'),
522
+ metadata: safeJsonParse(r.metadata),
518
523
  createdAt: r.created_at,
519
524
  }));
520
525
  } catch {