@agenticmail/enterprise 0.5.196 → 0.5.198
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-Y4N3XCNP.js +1224 -0
- package/dist/cli.js +1 -1
- package/dist/dashboard/pages/domain-status.js +47 -0
- package/dist/index.js +1 -1
- package/dist/setup-FE3TBZIZ.js +20 -0
- package/package.json +1 -1
- package/src/dashboard/pages/domain-status.js +47 -0
- package/src/setup/provision.ts +5 -1
package/dist/cli.js
CHANGED
|
@@ -417,6 +417,52 @@ export function DomainStatusPage() {
|
|
|
417
417
|
)
|
|
418
418
|
),
|
|
419
419
|
|
|
420
|
+
// ═══════════════════════════════════════════════
|
|
421
|
+
// SECTION: Migrate to Another Machine
|
|
422
|
+
// ═══════════════════════════════════════════════
|
|
423
|
+
h('div', { style: Object.assign({}, card, { border: '1px solid rgba(59,130,246,0.25)', background: 'linear-gradient(135deg, rgba(59,130,246,0.04), rgba(99,102,241,0.04))' }) },
|
|
424
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 } },
|
|
425
|
+
h('span', { style: { fontSize: 20 } }, '\uD83D\uDCE6'),
|
|
426
|
+
h('div', null,
|
|
427
|
+
h('div', { style: { fontSize: 14, fontWeight: 700 } }, 'Migrate to Another Machine'),
|
|
428
|
+
h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Move your entire deployment to a new server or computer')
|
|
429
|
+
)
|
|
430
|
+
),
|
|
431
|
+
h('p', { style: { fontSize: 13, color: 'var(--text-secondary)', lineHeight: 1.6, marginBottom: 16 } },
|
|
432
|
+
'All your configuration is stored in ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, '~/.agenticmail/.env'),
|
|
433
|
+
'. To run on a different machine, copy this file and you\'re done.'
|
|
434
|
+
),
|
|
435
|
+
h('div', { style: { marginBottom: 16 } },
|
|
436
|
+
h('div', { style: { fontSize: 12, fontWeight: 700, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.8, marginBottom: 10 } }, 'Steps to migrate'),
|
|
437
|
+
h('ol', { style: { fontSize: 13, color: 'var(--text-secondary)', lineHeight: 2, paddingLeft: 20, marginBottom: 0 } },
|
|
438
|
+
h('li', null, 'On your current machine, copy ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, '~/.agenticmail/.env'), ' — this has your DATABASE_URL, JWT_SECRET, and VAULT_KEY'),
|
|
439
|
+
h('li', null, 'On the new machine, create the directory: ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, 'mkdir -p ~/.agenticmail')),
|
|
440
|
+
h('li', null, 'Save the .env file there: ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, '~/.agenticmail/.env')),
|
|
441
|
+
h('li', null, 'Start the server: ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, 'npx @agenticmail/enterprise@latest start')),
|
|
442
|
+
h('li', null, 'If using Cloudflare Tunnel: run ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, 'cloudflared tunnel login'), ' on the new machine (same CF account), then redeploy the tunnel from the dashboard')
|
|
443
|
+
)
|
|
444
|
+
),
|
|
445
|
+
h('div', { style: { padding: '12px 16px', background: 'var(--bg-primary)', borderRadius: 'var(--radius)', border: '1px solid var(--border)', fontSize: 12, color: 'var(--text-muted)', lineHeight: 1.6 } },
|
|
446
|
+
h('strong', { style: { color: 'var(--text-secondary)' } }, 'What\'s in .env:'), h('br'),
|
|
447
|
+
'\u2022 ', h('strong', null, 'DATABASE_URL'), ' — your database connection (all data lives here)', h('br'),
|
|
448
|
+
'\u2022 ', h('strong', null, 'JWT_SECRET'), ' — keeps login sessions valid across restarts', h('br'),
|
|
449
|
+
'\u2022 ', h('strong', null, 'AGENTICMAIL_VAULT_KEY'), ' — decrypts stored credentials (email passwords, API keys)', h('br'),
|
|
450
|
+
'\u2022 ', h('strong', null, 'PORT'), ' — the port your server runs on', h('br'),
|
|
451
|
+
h('br'),
|
|
452
|
+
h('strong', { style: { color: 'var(--warning)' } }, 'Important:'), ' Without the same VAULT_KEY, encrypted credentials (agent email passwords, API keys) cannot be decrypted. You would need to re-enter them in the dashboard.'
|
|
453
|
+
),
|
|
454
|
+
h('div', { style: { marginTop: 12 } },
|
|
455
|
+
h('button', {
|
|
456
|
+
className: 'btn btn-sm',
|
|
457
|
+
onClick: function() {
|
|
458
|
+
var text = 'To migrate AgenticMail to a new machine:\\n\\n1. mkdir -p ~/.agenticmail\\n2. Copy this file to ~/.agenticmail/.env on the new machine\\n3. npx @agenticmail/enterprise@latest start\\n4. If using CF Tunnel: cloudflared tunnel login + redeploy from dashboard';
|
|
459
|
+
navigator.clipboard.writeText(text);
|
|
460
|
+
toast('Migration instructions copied!', 'success');
|
|
461
|
+
}
|
|
462
|
+
}, 'Copy Instructions')
|
|
463
|
+
)
|
|
464
|
+
),
|
|
465
|
+
|
|
420
466
|
// ═══════════════════════════════════════════════
|
|
421
467
|
// CLI Reference
|
|
422
468
|
// ═══════════════════════════════════════════════
|
|
@@ -424,6 +470,7 @@ export function DomainStatusPage() {
|
|
|
424
470
|
h('div', { style: labelSt }, 'CLI Commands'),
|
|
425
471
|
h('div', { style: { display: 'grid', gap: 8 } },
|
|
426
472
|
cliRow('Initial setup', 'npx @agenticmail/enterprise setup'),
|
|
473
|
+
cliRow('Start server', 'npx @agenticmail/enterprise start'),
|
|
427
474
|
cliRow('Verify DNS ownership', 'npx @agenticmail/enterprise verify-domain'),
|
|
428
475
|
cliRow('Recover on new server', 'npx @agenticmail/enterprise recover --domain your.domain.com')
|
|
429
476
|
)
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-Y4N3XCNP.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
|
@@ -417,6 +417,52 @@ export function DomainStatusPage() {
|
|
|
417
417
|
)
|
|
418
418
|
),
|
|
419
419
|
|
|
420
|
+
// ═══════════════════════════════════════════════
|
|
421
|
+
// SECTION: Migrate to Another Machine
|
|
422
|
+
// ═══════════════════════════════════════════════
|
|
423
|
+
h('div', { style: Object.assign({}, card, { border: '1px solid rgba(59,130,246,0.25)', background: 'linear-gradient(135deg, rgba(59,130,246,0.04), rgba(99,102,241,0.04))' }) },
|
|
424
|
+
h('div', { style: { display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 } },
|
|
425
|
+
h('span', { style: { fontSize: 20 } }, '\uD83D\uDCE6'),
|
|
426
|
+
h('div', null,
|
|
427
|
+
h('div', { style: { fontSize: 14, fontWeight: 700 } }, 'Migrate to Another Machine'),
|
|
428
|
+
h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Move your entire deployment to a new server or computer')
|
|
429
|
+
)
|
|
430
|
+
),
|
|
431
|
+
h('p', { style: { fontSize: 13, color: 'var(--text-secondary)', lineHeight: 1.6, marginBottom: 16 } },
|
|
432
|
+
'All your configuration is stored in ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, '~/.agenticmail/.env'),
|
|
433
|
+
'. To run on a different machine, copy this file and you\'re done.'
|
|
434
|
+
),
|
|
435
|
+
h('div', { style: { marginBottom: 16 } },
|
|
436
|
+
h('div', { style: { fontSize: 12, fontWeight: 700, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.8, marginBottom: 10 } }, 'Steps to migrate'),
|
|
437
|
+
h('ol', { style: { fontSize: 13, color: 'var(--text-secondary)', lineHeight: 2, paddingLeft: 20, marginBottom: 0 } },
|
|
438
|
+
h('li', null, 'On your current machine, copy ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, '~/.agenticmail/.env'), ' — this has your DATABASE_URL, JWT_SECRET, and VAULT_KEY'),
|
|
439
|
+
h('li', null, 'On the new machine, create the directory: ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, 'mkdir -p ~/.agenticmail')),
|
|
440
|
+
h('li', null, 'Save the .env file there: ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, '~/.agenticmail/.env')),
|
|
441
|
+
h('li', null, 'Start the server: ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, 'npx @agenticmail/enterprise@latest start')),
|
|
442
|
+
h('li', null, 'If using Cloudflare Tunnel: run ', h('code', { style: { fontSize: 11, color: 'var(--accent)' } }, 'cloudflared tunnel login'), ' on the new machine (same CF account), then redeploy the tunnel from the dashboard')
|
|
443
|
+
)
|
|
444
|
+
),
|
|
445
|
+
h('div', { style: { padding: '12px 16px', background: 'var(--bg-primary)', borderRadius: 'var(--radius)', border: '1px solid var(--border)', fontSize: 12, color: 'var(--text-muted)', lineHeight: 1.6 } },
|
|
446
|
+
h('strong', { style: { color: 'var(--text-secondary)' } }, 'What\'s in .env:'), h('br'),
|
|
447
|
+
'\u2022 ', h('strong', null, 'DATABASE_URL'), ' — your database connection (all data lives here)', h('br'),
|
|
448
|
+
'\u2022 ', h('strong', null, 'JWT_SECRET'), ' — keeps login sessions valid across restarts', h('br'),
|
|
449
|
+
'\u2022 ', h('strong', null, 'AGENTICMAIL_VAULT_KEY'), ' — decrypts stored credentials (email passwords, API keys)', h('br'),
|
|
450
|
+
'\u2022 ', h('strong', null, 'PORT'), ' — the port your server runs on', h('br'),
|
|
451
|
+
h('br'),
|
|
452
|
+
h('strong', { style: { color: 'var(--warning)' } }, 'Important:'), ' Without the same VAULT_KEY, encrypted credentials (agent email passwords, API keys) cannot be decrypted. You would need to re-enter them in the dashboard.'
|
|
453
|
+
),
|
|
454
|
+
h('div', { style: { marginTop: 12 } },
|
|
455
|
+
h('button', {
|
|
456
|
+
className: 'btn btn-sm',
|
|
457
|
+
onClick: function() {
|
|
458
|
+
var text = 'To migrate AgenticMail to a new machine:\\n\\n1. mkdir -p ~/.agenticmail\\n2. Copy this file to ~/.agenticmail/.env on the new machine\\n3. npx @agenticmail/enterprise@latest start\\n4. If using CF Tunnel: cloudflared tunnel login + redeploy from dashboard';
|
|
459
|
+
navigator.clipboard.writeText(text);
|
|
460
|
+
toast('Migration instructions copied!', 'success');
|
|
461
|
+
}
|
|
462
|
+
}, 'Copy Instructions')
|
|
463
|
+
)
|
|
464
|
+
),
|
|
465
|
+
|
|
420
466
|
// ═══════════════════════════════════════════════
|
|
421
467
|
// CLI Reference
|
|
422
468
|
// ═══════════════════════════════════════════════
|
|
@@ -424,6 +470,7 @@ export function DomainStatusPage() {
|
|
|
424
470
|
h('div', { style: labelSt }, 'CLI Commands'),
|
|
425
471
|
h('div', { style: { display: 'grid', gap: 8 } },
|
|
426
472
|
cliRow('Initial setup', 'npx @agenticmail/enterprise setup'),
|
|
473
|
+
cliRow('Start server', 'npx @agenticmail/enterprise start'),
|
|
427
474
|
cliRow('Verify DNS ownership', 'npx @agenticmail/enterprise verify-domain'),
|
|
428
475
|
cliRow('Recover on new server', 'npx @agenticmail/enterprise recover --domain your.domain.com')
|
|
429
476
|
)
|
package/src/setup/provision.ts
CHANGED
|
@@ -171,12 +171,16 @@ export async function provision(
|
|
|
171
171
|
const { homedir } = await import('os');
|
|
172
172
|
const envDir = join(homedir(), '.agenticmail');
|
|
173
173
|
if (!existsSync(envDir)) mkdirSync(envDir, { recursive: true });
|
|
174
|
+
const port = config.tunnel?.port
|
|
175
|
+
|| (config.deployTarget === 'local' ? 3000 : undefined)
|
|
176
|
+
|| (config.deployTarget === 'docker' ? 3000 : undefined)
|
|
177
|
+
|| 3200;
|
|
174
178
|
const envContent = [
|
|
175
179
|
'# AgenticMail Enterprise — auto-generated by setup wizard',
|
|
176
180
|
`DATABASE_URL=${config.database.connectionString || ''}`,
|
|
177
181
|
`JWT_SECRET=${jwtSecret}`,
|
|
178
182
|
`AGENTICMAIL_VAULT_KEY=${vaultKey}`,
|
|
179
|
-
`PORT=${
|
|
183
|
+
`PORT=${port}`,
|
|
180
184
|
].join('\n') + '\n';
|
|
181
185
|
writeFileSync(join(envDir, '.env'), envContent, { mode: 0o600 });
|
|
182
186
|
spinner.succeed(`Config saved to ~/.agenticmail/.env`);
|