@agenticmail/enterprise 0.5.27 → 0.5.29
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-GMIH6K23.js +12666 -0
- package/dist/chunk-JLY6XTBE.js +2115 -0
- package/dist/chunk-OHHLRNF3.js +898 -0
- package/dist/chunk-OPRVE2SR.js +9081 -0
- package/dist/chunk-OUQXTFOT.js +2115 -0
- package/dist/chunk-TCMLGWLQ.js +898 -0
- package/dist/chunk-ZMZCLNTY.js +48 -0
- package/dist/cli-recover-BW6DAPJY.js +97 -0
- package/dist/cli-verify-CZHJ2MW2.js +98 -0
- package/dist/cli.js +3 -3
- package/dist/dashboard/pages/settings.js +65 -33
- package/dist/factory-W7N4VZNK.js +9 -0
- package/dist/index.js +5 -5
- package/dist/postgres-PG4ZGLJ4.js +597 -0
- package/dist/routes-G6DASOQ5.js +5740 -0
- package/dist/runtime-C5DJMYCK.js +47 -0
- package/dist/server-BV7HHV7K.js +12 -0
- package/dist/server-J3NHDQRQ.js +12 -0
- package/dist/setup-3M3NTZNY.js +20 -0
- package/dist/setup-QJ6O6UAO.js +20 -0
- package/package.json +1 -1
- package/src/admin/routes.ts +2 -0
- package/src/dashboard/pages/settings.js +65 -33
- package/src/db/adapter.ts +2 -0
- package/src/db/postgres.ts +8 -0
- package/src/engine/community-registry.ts +1 -1
- package/src/engine/lifecycle.ts +1 -0
|
@@ -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-GMIH6K23.js";
|
|
18
|
+
import "./chunk-TYW5XTOW.js";
|
|
19
|
+
import "./chunk-JLSQOQ5L.js";
|
|
20
|
+
import {
|
|
21
|
+
PROVIDER_REGISTRY,
|
|
22
|
+
listAllProviders,
|
|
23
|
+
resolveApiKeyForProvider,
|
|
24
|
+
resolveProvider
|
|
25
|
+
} from "./chunk-67KZYSLU.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,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-OUQXTFOT.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,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-JLY6XTBE.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-TCMLGWLQ.js";
|
|
10
|
+
import "./chunk-ZMZCLNTY.js";
|
|
11
|
+
import "./chunk-KFQGP6VL.js";
|
|
12
|
+
export {
|
|
13
|
+
promptCompanyInfo,
|
|
14
|
+
promptDatabase,
|
|
15
|
+
promptDeployment,
|
|
16
|
+
promptDomain,
|
|
17
|
+
promptRegistration,
|
|
18
|
+
provision,
|
|
19
|
+
runSetupWizard
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-OHHLRNF3.js";
|
|
10
|
+
import "./chunk-ZMZCLNTY.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/admin/routes.ts
CHANGED
|
@@ -467,6 +467,8 @@ export function createAdminRoutes(db: DatabaseAdapter) {
|
|
|
467
467
|
{ field: 'smtpUser', type: 'string', maxLength: 253 },
|
|
468
468
|
{ field: 'smtpPass', type: 'string', maxLength: 253 },
|
|
469
469
|
{ field: 'dkimPrivateKey', type: 'string' },
|
|
470
|
+
{ field: 'cfApiToken', type: 'string', maxLength: 500 },
|
|
471
|
+
{ field: 'cfAccountId', type: 'string', maxLength: 100 },
|
|
470
472
|
{ field: 'plan', type: 'string', maxLength: 32 },
|
|
471
473
|
]);
|
|
472
474
|
|
|
@@ -383,41 +383,73 @@ export function SettingsPage() {
|
|
|
383
383
|
)
|
|
384
384
|
),
|
|
385
385
|
|
|
386
|
-
tab === 'email' && h('div',
|
|
387
|
-
|
|
388
|
-
h('div', { className: 'card
|
|
389
|
-
h('
|
|
390
|
-
h('div', {
|
|
391
|
-
h('div', {
|
|
392
|
-
h('
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
),
|
|
403
|
-
h('button', { className: 'btn btn-primary btn-sm', onClick: () => apiCall('/settings', { method: 'PATCH', body: JSON.stringify({ smtpHost: 'smtp.gmail.com', smtpPort: 587, smtpUser: settings.relayEmail || null, smtpPass: settings.relayPassword || null }) }).then(d => { setSettings(s => ({ ...s, ...d })); toast('Relay config saved', 'success'); }).catch(e => toast(e.message, 'error')) }, 'Save Relay Config')
|
|
404
|
-
),
|
|
405
|
-
h('div', { className: 'preset-card', style: { cursor: 'default' } },
|
|
406
|
-
h('h4', null, 'Custom Domain'),
|
|
407
|
-
h('p', { style: { marginBottom: 12 } }, 'Professional setup. Agents send from agent@yourdomain.com with full email authentication.'),
|
|
408
|
-
h('div', { className: 'form-group' },
|
|
409
|
-
h('label', { className: 'form-label' }, 'Domain'),
|
|
410
|
-
h('input', { className: 'input', value: settings.emailDomain || '', onChange: e => setSettings(s => ({ ...s, emailDomain: e.target.value })), placeholder: 'yourdomain.com' })
|
|
411
|
-
),
|
|
412
|
-
h('div', { className: 'form-group' },
|
|
413
|
-
h('label', { className: 'form-label' }, 'Cloudflare API Token'),
|
|
414
|
-
h('input', { className: 'input', type: 'password', value: settings.cfApiToken || '', onChange: e => setSettings(s => ({ ...s, cfApiToken: e.target.value })), placeholder: 'Your Cloudflare API token' })
|
|
386
|
+
tab === 'email' && h('div', null,
|
|
387
|
+
// Saved configurations summary
|
|
388
|
+
(settings.smtpUser || settings.cfApiToken) && h('div', { className: 'card', style: { marginBottom: 16 } },
|
|
389
|
+
h('div', { className: 'card-header' }, h('h3', null, 'Active Email Configuration')),
|
|
390
|
+
h('div', { className: 'card-body' },
|
|
391
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
392
|
+
settings.smtpUser && h('div', { style: { padding: 12, background: 'var(--bg-success, rgba(34,197,94,0.08))', borderRadius: 'var(--radius)', border: '1px solid var(--border)' } },
|
|
393
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 } },
|
|
394
|
+
h('span', { style: { color: '#22c55e', fontSize: 18 } }, '\u2713'),
|
|
395
|
+
h('strong', null, 'Relay Configured')
|
|
396
|
+
),
|
|
397
|
+
h('div', { style: { fontSize: 13, color: 'var(--text-secondary)' } },
|
|
398
|
+
h('div', null, 'Host: ', h('code', null, settings.smtpHost || 'smtp.gmail.com')),
|
|
399
|
+
h('div', null, 'User: ', h('code', null, settings.smtpUser)),
|
|
400
|
+
h('div', null, 'Password: ', h('code', null, '\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022'))
|
|
401
|
+
)
|
|
415
402
|
),
|
|
416
|
-
h('div', {
|
|
417
|
-
h('
|
|
418
|
-
|
|
403
|
+
settings.cfApiToken && h('div', { style: { padding: 12, background: 'var(--bg-success, rgba(34,197,94,0.08))', borderRadius: 'var(--radius)', border: '1px solid var(--border)' } },
|
|
404
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 } },
|
|
405
|
+
h('span', { style: { color: '#22c55e', fontSize: 18 } }, '\u2713'),
|
|
406
|
+
h('strong', null, 'Custom Domain Configured')
|
|
407
|
+
),
|
|
408
|
+
h('div', { style: { fontSize: 13, color: 'var(--text-secondary)' } },
|
|
409
|
+
h('div', null, 'Domain: ', h('code', null, settings.domain || 'Not set')),
|
|
410
|
+
h('div', null, 'CF Token: ', h('code', null, (settings.cfApiToken || '').slice(0, 8) + '\u2022\u2022\u2022\u2022')),
|
|
411
|
+
h('div', null, 'CF Account: ', h('code', null, settings.cfAccountId || 'Not set'))
|
|
412
|
+
)
|
|
413
|
+
)
|
|
414
|
+
)
|
|
415
|
+
)
|
|
416
|
+
),
|
|
417
|
+
h('div', { className: 'card' },
|
|
418
|
+
h('div', { className: 'card-header' }, h('h3', null, 'Email & Domain Configuration')),
|
|
419
|
+
h('div', { className: 'card-body' },
|
|
420
|
+
h('p', { style: { color: 'var(--text-secondary)', fontSize: 13, marginBottom: 20 } }, 'Configure how agents send and receive email. Choose between a relay (Gmail/Outlook forwarding) or a custom domain with full DKIM/SPF/DMARC.'),
|
|
421
|
+
h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
|
|
422
|
+
h('div', { className: 'preset-card', style: { cursor: 'default' } },
|
|
423
|
+
h('h4', null, 'Gmail / Outlook Relay'),
|
|
424
|
+
h('p', { style: { marginBottom: 12 } }, 'Easy setup. Agents send from yourname+agent@gmail.com. Best for getting started.'),
|
|
425
|
+
h('div', { className: 'form-group' },
|
|
426
|
+
h('label', { className: 'form-label' }, 'Email Address'),
|
|
427
|
+
h('input', { className: 'input', value: settings.smtpUser || '', onChange: e => setSettings(s => ({ ...s, smtpUser: e.target.value })), placeholder: 'you@gmail.com' })
|
|
428
|
+
),
|
|
429
|
+
h('div', { className: 'form-group' },
|
|
430
|
+
h('label', { className: 'form-label' }, 'App Password'),
|
|
431
|
+
h('input', { className: 'input', type: 'password', value: settings.smtpPass || '', onChange: e => setSettings(s => ({ ...s, smtpPass: e.target.value })), placeholder: 'xxxx xxxx xxxx xxxx' }),
|
|
432
|
+
h('p', { className: 'form-help' }, h('a', { href: 'https://myaccount.google.com/apppasswords', target: '_blank' }, 'Get app password from Google'))
|
|
433
|
+
),
|
|
434
|
+
h('button', { className: 'btn btn-primary btn-sm', onClick: () => apiCall('/settings', { method: 'PATCH', body: JSON.stringify({ smtpHost: 'smtp.gmail.com', smtpPort: 587, smtpUser: settings.smtpUser || null, smtpPass: settings.smtpPass || null }) }).then(d => { setSettings(s => ({ ...s, ...d })); toast('Relay config saved', 'success'); }).catch(e => toast(e.message, 'error')) }, 'Save Relay Config')
|
|
419
435
|
),
|
|
420
|
-
h('
|
|
436
|
+
h('div', { className: 'preset-card', style: { cursor: 'default' } },
|
|
437
|
+
h('h4', null, 'Custom Domain'),
|
|
438
|
+
h('p', { style: { marginBottom: 12 } }, 'Professional setup. Agents send from agent@yourdomain.com with full email authentication.'),
|
|
439
|
+
h('div', { className: 'form-group' },
|
|
440
|
+
h('label', { className: 'form-label' }, 'Domain'),
|
|
441
|
+
h('input', { className: 'input', value: settings.domain || '', onChange: e => setSettings(s => ({ ...s, domain: e.target.value })), placeholder: 'yourdomain.com' })
|
|
442
|
+
),
|
|
443
|
+
h('div', { className: 'form-group' },
|
|
444
|
+
h('label', { className: 'form-label' }, 'Cloudflare API Token'),
|
|
445
|
+
h('input', { className: 'input', type: 'password', value: settings.cfApiToken || '', onChange: e => setSettings(s => ({ ...s, cfApiToken: e.target.value })), placeholder: 'Your Cloudflare API token' })
|
|
446
|
+
),
|
|
447
|
+
h('div', { className: 'form-group' },
|
|
448
|
+
h('label', { className: 'form-label' }, 'Cloudflare Account ID'),
|
|
449
|
+
h('input', { className: 'input', value: settings.cfAccountId || '', onChange: e => setSettings(s => ({ ...s, cfAccountId: e.target.value })), placeholder: 'Account ID' })
|
|
450
|
+
),
|
|
451
|
+
h('button', { className: 'btn btn-primary btn-sm', onClick: () => apiCall('/settings', { method: 'PATCH', body: JSON.stringify({ domain: settings.domain || null, cfApiToken: settings.cfApiToken || null, cfAccountId: settings.cfAccountId || null }) }).then(d => { setSettings(s => ({ ...s, ...d })); toast('Domain config saved', 'success'); }).catch(e => toast(e.message, 'error')) }, 'Save Domain Config')
|
|
452
|
+
)
|
|
421
453
|
)
|
|
422
454
|
)
|
|
423
455
|
)
|
package/src/db/adapter.ts
CHANGED
|
@@ -195,6 +195,8 @@ export interface CompanySettings {
|
|
|
195
195
|
domainVerifiedAt?: string;
|
|
196
196
|
domainRegisteredAt?: string;
|
|
197
197
|
domainStatus?: 'unregistered' | 'pending_dns' | 'verified' | 'failed';
|
|
198
|
+
cfApiToken?: string;
|
|
199
|
+
cfAccountId?: string;
|
|
198
200
|
toolSecurityConfig?: Record<string, any>;
|
|
199
201
|
firewallConfig?: FirewallConfig;
|
|
200
202
|
modelPricingConfig?: ModelPricingConfig;
|
package/src/db/postgres.ts
CHANGED
|
@@ -102,6 +102,10 @@ export class PostgresAdapter extends DatabaseAdapter {
|
|
|
102
102
|
await client.query(`
|
|
103
103
|
ALTER TABLE company_settings ADD COLUMN IF NOT EXISTS org_id TEXT
|
|
104
104
|
`).catch(() => {});
|
|
105
|
+
await client.query(`
|
|
106
|
+
ALTER TABLE company_settings ADD COLUMN IF NOT EXISTS cf_api_token TEXT;
|
|
107
|
+
ALTER TABLE company_settings ADD COLUMN IF NOT EXISTS cf_account_id TEXT;
|
|
108
|
+
`).catch(() => {});
|
|
105
109
|
await client.query('COMMIT');
|
|
106
110
|
} catch (err) {
|
|
107
111
|
await client.query('ROLLBACK');
|
|
@@ -141,6 +145,8 @@ export class PostgresAdapter extends DatabaseAdapter {
|
|
|
141
145
|
domainVerifiedAt: 'domain_verified_at',
|
|
142
146
|
domainRegisteredAt: 'domain_registered_at',
|
|
143
147
|
domainStatus: 'domain_status',
|
|
148
|
+
cfApiToken: 'cf_api_token',
|
|
149
|
+
cfAccountId: 'cf_account_id',
|
|
144
150
|
};
|
|
145
151
|
for (const [key, col] of Object.entries(map)) {
|
|
146
152
|
if ((updates as any)[key] !== undefined) {
|
|
@@ -545,6 +551,8 @@ export class PostgresAdapter extends DatabaseAdapter {
|
|
|
545
551
|
domainVerifiedAt: r.domain_verified_at || undefined,
|
|
546
552
|
domainRegisteredAt: r.domain_registered_at || undefined,
|
|
547
553
|
domainStatus: r.domain_status || 'unregistered',
|
|
554
|
+
cfApiToken: r.cf_api_token || undefined,
|
|
555
|
+
cfAccountId: r.cf_account_id || undefined,
|
|
548
556
|
};
|
|
549
557
|
}
|
|
550
558
|
}
|
|
@@ -591,7 +591,7 @@ export class CommunitySkillRegistry {
|
|
|
591
591
|
description: skill.description,
|
|
592
592
|
category: (skill.category || 'custom') as any,
|
|
593
593
|
risk: (skill.risk || 'medium') as any,
|
|
594
|
-
tools: skill.tools.map(t => ({
|
|
594
|
+
tools: (Array.isArray(skill.tools) ? skill.tools : []).map(t => ({
|
|
595
595
|
id: t.id,
|
|
596
596
|
name: t.name,
|
|
597
597
|
description: t.description,
|
package/src/engine/lifecycle.ts
CHANGED