@agenticmail/enterprise 0.5.3 → 0.5.5
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-ANW4OHXR.js → chunk-6CVIA5YL.js} +52 -8
- package/dist/{chunk-PQADDAC2.js → chunk-VRRCELRN.js} +43 -0
- package/dist/cli-build-skill-AE7QC5C5.js +235 -0
- package/dist/{cli-recover-SSGGSKZJ.js → cli-recover-5M74V7V4.js} +2 -2
- package/dist/cli-submit-skill-LDFJGSKO.js +162 -0
- package/dist/cli-validate-QTV6662P.js +148 -0
- package/dist/cli.js +12 -12
- package/dist/index.js +1 -1
- package/dist/{setup-RCYNX5NA.js → setup-HJ4PTUSA.js} +1 -1
- package/dist/{setup-5CVRQ5ES.js → setup-WUDZZ25K.js} +1 -1
- package/package.json +1 -1
- package/src/cli.ts +13 -13
- package/src/domain-lock/cli-recover.ts +4 -4
- package/src/domain-lock/cli-verify.ts +3 -3
- package/src/engine/cli-build-skill.ts +2 -2
- package/src/engine/cli-submit-skill.ts +3 -3
- package/src/engine/cli-validate.ts +3 -3
- package/src/setup/index.ts +47 -0
- package/src/setup/registration.ts +4 -4
- package/dist/chunk-E23VJ3QX.js +0 -9427
- package/dist/chunk-EOBN6RCA.js +0 -12652
- package/dist/chunk-HAUHDCUB.js +0 -764
- package/dist/chunk-HSF6OJ5Z.js +0 -154
- package/dist/chunk-SMUXH6FM.js +0 -1943
- package/dist/chunk-V2YIXYDJ.js +0 -1943
- package/dist/cli-verify-V3GPFMWU.js +0 -98
- package/dist/domain-lock-URIFILHB.js +0 -7
- package/dist/routes-NJK5OI5N.js +0 -5673
- package/dist/runtime-SMA6JUMP.js +0 -46
- package/dist/server-OGQWCOT6.js +0 -11
- package/dist/server-ZT5NWHT4.js +0 -11
- package/dist/setup-HCMMUEW6.js +0 -20
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ALL_TOOLS,
|
|
3
|
+
init_tool_catalog
|
|
4
|
+
} from "./chunk-X6UVWFHW.js";
|
|
5
|
+
import {
|
|
6
|
+
collectCommunityToolIds,
|
|
7
|
+
validateSkillManifest
|
|
8
|
+
} from "./chunk-TY7NVD4U.js";
|
|
9
|
+
import "./chunk-KFQGP6VL.js";
|
|
10
|
+
|
|
11
|
+
// src/engine/cli-validate.ts
|
|
12
|
+
init_tool_catalog();
|
|
13
|
+
async function runValidate(args) {
|
|
14
|
+
const chalk = (await import("chalk")).default;
|
|
15
|
+
const fs = await import("fs/promises");
|
|
16
|
+
const path = await import("path");
|
|
17
|
+
const jsonMode = args.includes("--json");
|
|
18
|
+
const allMode = args.includes("--all");
|
|
19
|
+
const pathArgs = args.filter((a) => !a.startsWith("--"));
|
|
20
|
+
const builtinIds = new Set(ALL_TOOLS.map((t) => t.id));
|
|
21
|
+
const communityDir = path.resolve(process.cwd(), "community-skills");
|
|
22
|
+
const reports = [];
|
|
23
|
+
if (allMode) {
|
|
24
|
+
let entries;
|
|
25
|
+
try {
|
|
26
|
+
entries = await fs.readdir(communityDir, { withFileTypes: true });
|
|
27
|
+
} catch {
|
|
28
|
+
if (jsonMode) {
|
|
29
|
+
console.log(JSON.stringify({ error: "community-skills/ directory not found" }));
|
|
30
|
+
} else {
|
|
31
|
+
console.error(chalk.red("Error: community-skills/ directory not found"));
|
|
32
|
+
}
|
|
33
|
+
process.exit(1);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
for (const entry of entries) {
|
|
37
|
+
if (!entry.isDirectory() || entry.name.startsWith("_") || entry.name.startsWith(".")) continue;
|
|
38
|
+
const skillDir = path.join(communityDir, entry.name);
|
|
39
|
+
const report = await validatePath(skillDir, builtinIds, communityDir);
|
|
40
|
+
reports.push(report);
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
const target = pathArgs[0];
|
|
44
|
+
if (!target) {
|
|
45
|
+
if (jsonMode) {
|
|
46
|
+
console.log(JSON.stringify({ error: "No path specified. Usage: npx @agenticmail/enterprise validate <path> [--all] [--json]" }));
|
|
47
|
+
} else {
|
|
48
|
+
console.log(`${chalk.bold("Usage:")} npx @agenticmail/enterprise validate <path>`);
|
|
49
|
+
console.log("");
|
|
50
|
+
console.log(" <path> Path to a skill directory or agenticmail-skill.json file");
|
|
51
|
+
console.log(" --all Validate all skills in community-skills/");
|
|
52
|
+
console.log(" --json Machine-readable JSON output");
|
|
53
|
+
}
|
|
54
|
+
process.exit(1);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const report = await validatePath(path.resolve(target), builtinIds, communityDir);
|
|
58
|
+
reports.push(report);
|
|
59
|
+
}
|
|
60
|
+
if (jsonMode) {
|
|
61
|
+
console.log(JSON.stringify({ results: reports, totalErrors: reports.reduce((s, r) => s + r.errors.length, 0) }, null, 2));
|
|
62
|
+
} else {
|
|
63
|
+
console.log("");
|
|
64
|
+
for (const report of reports) {
|
|
65
|
+
if (report.valid) {
|
|
66
|
+
console.log(chalk.green(" \u2714") + " " + chalk.bold(report.skillId) + chalk.dim(` (${report.path})`));
|
|
67
|
+
} else {
|
|
68
|
+
console.log(chalk.red(" \u2718") + " " + chalk.bold(report.skillId) + chalk.dim(` (${report.path})`));
|
|
69
|
+
for (const err of report.errors) {
|
|
70
|
+
console.log(chalk.red(" \u2502 ") + err);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (const warn of report.warnings) {
|
|
74
|
+
console.log(chalk.yellow(" \u26A0 ") + warn);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
console.log("");
|
|
78
|
+
const passed = reports.filter((r) => r.valid).length;
|
|
79
|
+
const failed = reports.filter((r) => !r.valid).length;
|
|
80
|
+
if (failed > 0) {
|
|
81
|
+
console.log(chalk.red(` ${failed} failed`) + chalk.dim(`, ${passed} passed, ${reports.length} total`));
|
|
82
|
+
} else {
|
|
83
|
+
console.log(chalk.green(` ${passed} passed`) + chalk.dim(`, ${reports.length} total`));
|
|
84
|
+
}
|
|
85
|
+
console.log("");
|
|
86
|
+
}
|
|
87
|
+
if (reports.some((r) => !r.valid)) {
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async function validatePath(targetPath, builtinIds, communityDir) {
|
|
92
|
+
const fs = await import("fs/promises");
|
|
93
|
+
const path = await import("path");
|
|
94
|
+
let manifestPath;
|
|
95
|
+
try {
|
|
96
|
+
const stat = await fs.stat(targetPath);
|
|
97
|
+
if (stat.isDirectory()) {
|
|
98
|
+
manifestPath = path.join(targetPath, "agenticmail-skill.json");
|
|
99
|
+
} else {
|
|
100
|
+
manifestPath = targetPath;
|
|
101
|
+
}
|
|
102
|
+
} catch {
|
|
103
|
+
return {
|
|
104
|
+
path: targetPath,
|
|
105
|
+
skillId: path.basename(targetPath),
|
|
106
|
+
valid: false,
|
|
107
|
+
errors: [`Path not found: ${targetPath}`],
|
|
108
|
+
warnings: []
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
let raw;
|
|
112
|
+
try {
|
|
113
|
+
raw = await fs.readFile(manifestPath, "utf-8");
|
|
114
|
+
} catch {
|
|
115
|
+
return {
|
|
116
|
+
path: manifestPath,
|
|
117
|
+
skillId: path.basename(path.dirname(manifestPath)),
|
|
118
|
+
valid: false,
|
|
119
|
+
errors: [`Cannot read: ${manifestPath}`],
|
|
120
|
+
warnings: []
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
let manifest;
|
|
124
|
+
try {
|
|
125
|
+
manifest = JSON.parse(raw);
|
|
126
|
+
} catch (err) {
|
|
127
|
+
return {
|
|
128
|
+
path: manifestPath,
|
|
129
|
+
skillId: path.basename(path.dirname(manifestPath)),
|
|
130
|
+
valid: false,
|
|
131
|
+
errors: [`Invalid JSON: ${err.message}`],
|
|
132
|
+
warnings: []
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const communityIds = await collectCommunityToolIds(communityDir, manifest.id);
|
|
136
|
+
const allExistingIds = /* @__PURE__ */ new Set([...builtinIds, ...communityIds]);
|
|
137
|
+
const result = validateSkillManifest(manifest, { existingToolIds: allExistingIds });
|
|
138
|
+
return {
|
|
139
|
+
path: manifestPath,
|
|
140
|
+
skillId: manifest.id || path.basename(path.dirname(manifestPath)),
|
|
141
|
+
valid: result.valid,
|
|
142
|
+
errors: result.errors,
|
|
143
|
+
warnings: result.warnings
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
runValidate
|
|
148
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -5,16 +5,16 @@ var args = process.argv.slice(2);
|
|
|
5
5
|
var command = args[0];
|
|
6
6
|
switch (command) {
|
|
7
7
|
case "validate":
|
|
8
|
-
import("./cli-validate-
|
|
8
|
+
import("./cli-validate-QTV6662P.js").then((m) => m.runValidate(args.slice(1))).catch(fatal);
|
|
9
9
|
break;
|
|
10
10
|
case "build-skill":
|
|
11
|
-
import("./cli-build-skill-
|
|
11
|
+
import("./cli-build-skill-AE7QC5C5.js").then((m) => m.runBuildSkill(args.slice(1))).catch(fatal);
|
|
12
12
|
break;
|
|
13
13
|
case "submit-skill":
|
|
14
|
-
import("./cli-submit-skill-
|
|
14
|
+
import("./cli-submit-skill-LDFJGSKO.js").then((m) => m.runSubmitSkill(args.slice(1))).catch(fatal);
|
|
15
15
|
break;
|
|
16
16
|
case "recover":
|
|
17
|
-
import("./cli-recover-
|
|
17
|
+
import("./cli-recover-5M74V7V4.js").then((m) => m.runRecover(args.slice(1))).catch(fatal);
|
|
18
18
|
break;
|
|
19
19
|
case "verify-domain":
|
|
20
20
|
import("./cli-verify-YT7IADFX.js").then((m) => m.runVerifyDomain(args.slice(1))).catch(fatal);
|
|
@@ -35,20 +35,20 @@ Commands:
|
|
|
35
35
|
verify-domain Check DNS verification for your domain
|
|
36
36
|
|
|
37
37
|
Domain Registration:
|
|
38
|
-
agenticmail
|
|
39
|
-
agenticmail
|
|
40
|
-
agenticmail
|
|
38
|
+
npx @agenticmail/enterprise recover --domain agents.agenticmail.io --key <hex>
|
|
39
|
+
npx @agenticmail/enterprise verify-domain
|
|
40
|
+
npx @agenticmail/enterprise verify-domain --domain agents.agenticmail.io
|
|
41
41
|
|
|
42
42
|
Skill Development:
|
|
43
|
-
agenticmail
|
|
44
|
-
agenticmail
|
|
45
|
-
agenticmail
|
|
46
|
-
agenticmail
|
|
43
|
+
npx @agenticmail/enterprise validate ./community-skills/github-issues/
|
|
44
|
+
npx @agenticmail/enterprise validate --all
|
|
45
|
+
npx @agenticmail/enterprise build-skill
|
|
46
|
+
npx @agenticmail/enterprise submit-skill ./community-skills/my-skill/
|
|
47
47
|
`);
|
|
48
48
|
break;
|
|
49
49
|
case "setup":
|
|
50
50
|
default:
|
|
51
|
-
import("./setup-
|
|
51
|
+
import("./setup-HJ4PTUSA.js").then((m) => m.runSetupWizard()).catch(fatal);
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
54
|
function fatal(err) {
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Usage:
|
|
14
14
|
* npx @agenticmail/enterprise
|
|
15
|
-
* agenticmail
|
|
16
|
-
* agenticmail
|
|
17
|
-
* agenticmail
|
|
18
|
-
* agenticmail
|
|
19
|
-
* agenticmail
|
|
20
|
-
* agenticmail
|
|
15
|
+
* npx @agenticmail/enterprise validate ./community-skills/my-skill/
|
|
16
|
+
* npx @agenticmail/enterprise validate --all
|
|
17
|
+
* npx @agenticmail/enterprise build-skill
|
|
18
|
+
* npx @agenticmail/enterprise submit-skill ./community-skills/my-skill/
|
|
19
|
+
* npx @agenticmail/enterprise recover --domain agents.agenticmail.io
|
|
20
|
+
* npx @agenticmail/enterprise verify-domain
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
const args = process.argv.slice(2);
|
|
@@ -60,15 +60,15 @@ Commands:
|
|
|
60
60
|
verify-domain Check DNS verification for your domain
|
|
61
61
|
|
|
62
62
|
Domain Registration:
|
|
63
|
-
agenticmail
|
|
64
|
-
agenticmail
|
|
65
|
-
agenticmail
|
|
63
|
+
npx @agenticmail/enterprise recover --domain agents.agenticmail.io --key <hex>
|
|
64
|
+
npx @agenticmail/enterprise verify-domain
|
|
65
|
+
npx @agenticmail/enterprise verify-domain --domain agents.agenticmail.io
|
|
66
66
|
|
|
67
67
|
Skill Development:
|
|
68
|
-
agenticmail
|
|
69
|
-
agenticmail
|
|
70
|
-
agenticmail
|
|
71
|
-
agenticmail
|
|
68
|
+
npx @agenticmail/enterprise validate ./community-skills/github-issues/
|
|
69
|
+
npx @agenticmail/enterprise validate --all
|
|
70
|
+
npx @agenticmail/enterprise build-skill
|
|
71
|
+
npx @agenticmail/enterprise submit-skill ./community-skills/my-skill/
|
|
72
72
|
`);
|
|
73
73
|
break;
|
|
74
74
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Requires the original deployment key to prove ownership.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* agenticmail
|
|
9
|
-
* agenticmail
|
|
10
|
-
* agenticmail
|
|
8
|
+
* npx @agenticmail/enterprise recover
|
|
9
|
+
* npx @agenticmail/enterprise recover --domain agents.agenticmail.io --key <hex>
|
|
10
|
+
* npx @agenticmail/enterprise recover --db ./data.db --db-type sqlite
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { DomainLock } from './index.js';
|
|
@@ -119,6 +119,6 @@ export async function runRecover(args: string[]): Promise<void> {
|
|
|
119
119
|
console.log(` ${chalk.bold('Type:')} ${chalk.cyan('TXT')}`);
|
|
120
120
|
console.log(` ${chalk.bold('Value:')} ${chalk.cyan(result.dnsChallenge)}`);
|
|
121
121
|
console.log('');
|
|
122
|
-
console.log(chalk.dim(' Then run: agenticmail
|
|
122
|
+
console.log(chalk.dim(' Then run: npx @agenticmail/enterprise verify-domain'));
|
|
123
123
|
console.log('');
|
|
124
124
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Asks the central registry to resolve the TXT record.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* agenticmail
|
|
9
|
-
* agenticmail
|
|
10
|
-
* agenticmail
|
|
8
|
+
* npx @agenticmail/enterprise verify-domain
|
|
9
|
+
* npx @agenticmail/enterprise verify-domain --domain agents.agenticmail.io
|
|
10
|
+
* npx @agenticmail/enterprise verify-domain --db ./data.db
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { DomainLock } from './index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI: agenticmail
|
|
2
|
+
* CLI: npx @agenticmail/enterprise build-skill
|
|
3
3
|
*
|
|
4
4
|
* Interactive AI-assisted skill scaffolding. Prompts for the target
|
|
5
5
|
* application/service, generates a valid agenticmail-skill.json manifest,
|
|
@@ -162,7 +162,7 @@ export async function runBuildSkill(_args: string[]) {
|
|
|
162
162
|
const { runSubmitSkill } = await import('./cli-submit-skill.js');
|
|
163
163
|
await runSubmitSkill([outDir]);
|
|
164
164
|
} else {
|
|
165
|
-
console.log(chalk.dim('\n To submit later: agenticmail
|
|
165
|
+
console.log(chalk.dim('\n To submit later: npx @agenticmail/enterprise submit-skill ' + answers.outputDir));
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI: agenticmail
|
|
2
|
+
* CLI: npx @agenticmail/enterprise submit-skill <path>
|
|
3
3
|
*
|
|
4
4
|
* Automates the GitHub PR submission flow for a community skill.
|
|
5
5
|
* Uses the `gh` CLI to fork, branch, commit, push, and open a PR.
|
|
@@ -18,7 +18,7 @@ export async function runSubmitSkill(args: string[]) {
|
|
|
18
18
|
|
|
19
19
|
const target = args.filter(a => !a.startsWith('--'))[0];
|
|
20
20
|
if (!target) {
|
|
21
|
-
console.log(`${chalk.bold('Usage:')} agenticmail
|
|
21
|
+
console.log(`${chalk.bold('Usage:')} npx @agenticmail/enterprise submit-skill <path-to-skill-dir>`);
|
|
22
22
|
process.exit(1);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
@@ -172,7 +172,7 @@ ${toolsList}
|
|
|
172
172
|
|
|
173
173
|
### Validation
|
|
174
174
|
|
|
175
|
-
- [x] Manifest passes \`agenticmail
|
|
175
|
+
- [x] Manifest passes \`npx @agenticmail/enterprise validate\`
|
|
176
176
|
- [x] All required fields present
|
|
177
177
|
- [x] No duplicate tool IDs
|
|
178
178
|
${manifest.tags ? `\n**Tags:** ${manifest.tags.join(', ')}` : ''}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI: agenticmail
|
|
2
|
+
* CLI: npx @agenticmail/enterprise validate <path>
|
|
3
3
|
*
|
|
4
4
|
* Validates an agenticmail-skill.json manifest against the full spec.
|
|
5
5
|
* Checks for duplicate tool IDs against the builtin catalog and
|
|
@@ -64,9 +64,9 @@ export async function runValidate(args: string[]) {
|
|
|
64
64
|
const target = pathArgs[0];
|
|
65
65
|
if (!target) {
|
|
66
66
|
if (jsonMode) {
|
|
67
|
-
console.log(JSON.stringify({ error: 'No path specified. Usage: agenticmail
|
|
67
|
+
console.log(JSON.stringify({ error: 'No path specified. Usage: npx @agenticmail/enterprise validate <path> [--all] [--json]' }));
|
|
68
68
|
} else {
|
|
69
|
-
console.log(`${chalk.bold('Usage:')} agenticmail
|
|
69
|
+
console.log(`${chalk.bold('Usage:')} npx @agenticmail/enterprise validate <path>`);
|
|
70
70
|
console.log('');
|
|
71
71
|
console.log(' <path> Path to a skill directory or agenticmail-skill.json file');
|
|
72
72
|
console.log(' --all Validate all skills in community-skills/');
|
package/src/setup/index.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* → Provision (setup/provision.ts)
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { execSync } from 'child_process';
|
|
17
18
|
import { promptCompanyInfo } from './company.js';
|
|
18
19
|
import { promptDatabase } from './database.js';
|
|
19
20
|
import { promptDeployment } from './deployment.js';
|
|
@@ -34,6 +35,49 @@ export type { DomainSelection } from './domain.js';
|
|
|
34
35
|
export type { RegistrationSelection } from './registration.js';
|
|
35
36
|
export type { ProvisionConfig, ProvisionResult } from './provision.js';
|
|
36
37
|
|
|
38
|
+
// ─── DB Driver Requirements ──────────────────────
|
|
39
|
+
|
|
40
|
+
const DB_DRIVER_MAP: Record<string, string[]> = {
|
|
41
|
+
postgres: ['pg'],
|
|
42
|
+
supabase: ['pg'],
|
|
43
|
+
neon: ['pg'],
|
|
44
|
+
cockroachdb: ['pg'],
|
|
45
|
+
mysql: ['mysql2'],
|
|
46
|
+
planetscale: ['mysql2'],
|
|
47
|
+
mongodb: ['mongodb'],
|
|
48
|
+
sqlite: ['better-sqlite3'],
|
|
49
|
+
turso: ['@libsql/client'],
|
|
50
|
+
dynamodb: ['@aws-sdk/client-dynamodb', '@aws-sdk/lib-dynamodb'],
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
async function ensureDbDriver(dbType: string, ora: any, chalk: any): Promise<void> {
|
|
54
|
+
const packages = DB_DRIVER_MAP[dbType];
|
|
55
|
+
if (!packages?.length) return;
|
|
56
|
+
|
|
57
|
+
const missing: string[] = [];
|
|
58
|
+
for (const pkg of packages) {
|
|
59
|
+
try {
|
|
60
|
+
await import(pkg);
|
|
61
|
+
} catch {
|
|
62
|
+
missing.push(pkg);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!missing.length) return;
|
|
66
|
+
|
|
67
|
+
const spinner = ora(`Installing database driver: ${missing.join(', ')}...`).start();
|
|
68
|
+
try {
|
|
69
|
+
execSync(`npm install --no-save ${missing.join(' ')}`, {
|
|
70
|
+
stdio: 'pipe',
|
|
71
|
+
timeout: 120_000,
|
|
72
|
+
});
|
|
73
|
+
spinner.succeed(`Database driver installed: ${missing.join(', ')}`);
|
|
74
|
+
} catch (err: any) {
|
|
75
|
+
spinner.fail(`Failed to install ${missing.join(', ')}`);
|
|
76
|
+
console.error(chalk.red(`\n Run manually: npm install ${missing.join(' ')}\n`));
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
37
81
|
/**
|
|
38
82
|
* Run the full interactive setup wizard.
|
|
39
83
|
* Returns when provisioning is complete (or the local server is running).
|
|
@@ -72,6 +116,9 @@ export async function runSetupWizard(): Promise<void> {
|
|
|
72
116
|
company.adminEmail,
|
|
73
117
|
);
|
|
74
118
|
|
|
119
|
+
// ─── Install DB driver if needed ───────────────
|
|
120
|
+
await ensureDbDriver(database.type, ora, chalk);
|
|
121
|
+
|
|
75
122
|
// ─── Provision ───────────────────────────────────
|
|
76
123
|
console.log('');
|
|
77
124
|
console.log(chalk.dim(' ─────────────────────────────────────────'));
|
|
@@ -94,7 +94,7 @@ export async function promptRegistration(
|
|
|
94
94
|
spinner.fail('Domain already registered');
|
|
95
95
|
console.log('');
|
|
96
96
|
console.log(chalk.yellow(' This domain is already registered and verified.'));
|
|
97
|
-
console.log(chalk.dim(' If this is your domain, use: agenticmail
|
|
97
|
+
console.log(chalk.dim(' If this is your domain, use: npx @agenticmail/enterprise recover'));
|
|
98
98
|
console.log('');
|
|
99
99
|
|
|
100
100
|
const { continueAnyway } = await inquirer.prompt([{
|
|
@@ -121,7 +121,7 @@ export async function promptRegistration(
|
|
|
121
121
|
spinner.warn('Registry unavailable');
|
|
122
122
|
console.log('');
|
|
123
123
|
console.log(chalk.yellow(` Could not reach registry: ${err.message}`));
|
|
124
|
-
console.log(chalk.dim(' You can register later with: agenticmail
|
|
124
|
+
console.log(chalk.dim(' You can register later with: npx @agenticmail/enterprise verify-domain'));
|
|
125
125
|
console.log('');
|
|
126
126
|
|
|
127
127
|
const { continueAnyway } = await inquirer.prompt([{
|
|
@@ -209,11 +209,11 @@ export async function promptRegistration(
|
|
|
209
209
|
await new Promise(r => setTimeout(r, 10_000));
|
|
210
210
|
} else {
|
|
211
211
|
spinner.info('DNS record not found yet');
|
|
212
|
-
console.log(chalk.dim(' Run later: agenticmail
|
|
212
|
+
console.log(chalk.dim(' Run later: npx @agenticmail/enterprise verify-domain'));
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
} else {
|
|
216
|
-
console.log(chalk.dim(' Run when ready: agenticmail
|
|
216
|
+
console.log(chalk.dim(' Run when ready: npx @agenticmail/enterprise verify-domain'));
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
console.log('');
|