@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
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DomainLock
|
|
3
|
-
} from "./chunk-HSF6OJ5Z.js";
|
|
4
|
-
import "./chunk-KFQGP6VL.js";
|
|
5
|
-
|
|
6
|
-
// src/domain-lock/cli-verify.ts
|
|
7
|
-
function getFlag(args, name) {
|
|
8
|
-
const idx = args.indexOf(name);
|
|
9
|
-
if (idx !== -1 && args[idx + 1]) return args[idx + 1];
|
|
10
|
-
return void 0;
|
|
11
|
-
}
|
|
12
|
-
async function runVerifyDomain(args) {
|
|
13
|
-
const { default: chalk } = await import("chalk");
|
|
14
|
-
const { default: ora } = await import("ora");
|
|
15
|
-
console.log("");
|
|
16
|
-
console.log(chalk.bold(" AgenticMail Enterprise \u2014 Domain Verification"));
|
|
17
|
-
console.log("");
|
|
18
|
-
let domain = getFlag(args, "--domain");
|
|
19
|
-
let dnsChallenge;
|
|
20
|
-
let dbConnected = false;
|
|
21
|
-
let db = null;
|
|
22
|
-
if (!domain) {
|
|
23
|
-
const dbPath = getFlag(args, "--db");
|
|
24
|
-
const dbType = getFlag(args, "--db-type") || "sqlite";
|
|
25
|
-
if (dbPath) {
|
|
26
|
-
try {
|
|
27
|
-
const { createAdapter } = await import("./factory-FVJH5RRY.js");
|
|
28
|
-
db = await createAdapter({ type: dbType, connectionString: dbPath });
|
|
29
|
-
await db.migrate();
|
|
30
|
-
const settings = await db.getSettings();
|
|
31
|
-
domain = settings?.domain;
|
|
32
|
-
dnsChallenge = settings?.domainDnsChallenge;
|
|
33
|
-
dbConnected = true;
|
|
34
|
-
} catch {
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
if (!domain) {
|
|
39
|
-
const { default: inquirer } = await import("inquirer");
|
|
40
|
-
const answer = await inquirer.prompt([{
|
|
41
|
-
type: "input",
|
|
42
|
-
name: "domain",
|
|
43
|
-
message: "Domain to verify:",
|
|
44
|
-
suffix: chalk.dim(" (e.g. agents.agenticmail.io)"),
|
|
45
|
-
validate: (v) => v.includes(".") || "Enter a valid domain"
|
|
46
|
-
}]);
|
|
47
|
-
domain = answer.domain;
|
|
48
|
-
}
|
|
49
|
-
const spinner = ora("Checking DNS verification...").start();
|
|
50
|
-
const lock = new DomainLock();
|
|
51
|
-
const result = await lock.checkVerification(domain);
|
|
52
|
-
if (!result.success) {
|
|
53
|
-
spinner.fail("Verification check failed");
|
|
54
|
-
console.log("");
|
|
55
|
-
console.error(chalk.red(` ${result.error}`));
|
|
56
|
-
console.log("");
|
|
57
|
-
if (db) await db.disconnect();
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
if (result.verified) {
|
|
61
|
-
spinner.succeed("Domain verified!");
|
|
62
|
-
if (dbConnected && db) {
|
|
63
|
-
try {
|
|
64
|
-
await db.updateSettings({
|
|
65
|
-
domainStatus: "verified",
|
|
66
|
-
domainVerifiedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
67
|
-
});
|
|
68
|
-
} catch {
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
console.log("");
|
|
72
|
-
console.log(chalk.green.bold(` ${domain} is verified and protected.`));
|
|
73
|
-
console.log(chalk.dim(" Your deployment domain is locked. No other instance can claim it."));
|
|
74
|
-
console.log("");
|
|
75
|
-
} else {
|
|
76
|
-
spinner.info("DNS record not found yet");
|
|
77
|
-
console.log("");
|
|
78
|
-
console.log(chalk.yellow(" The DNS TXT record has not been detected."));
|
|
79
|
-
console.log("");
|
|
80
|
-
console.log(chalk.bold(" Make sure this record exists:"));
|
|
81
|
-
console.log("");
|
|
82
|
-
console.log(` ${chalk.bold("Host:")} ${chalk.cyan(`_agenticmail-verify.${domain}`)}`);
|
|
83
|
-
console.log(` ${chalk.bold("Type:")} ${chalk.cyan("TXT")}`);
|
|
84
|
-
if (dnsChallenge) {
|
|
85
|
-
console.log(` ${chalk.bold("Value:")} ${chalk.cyan(dnsChallenge)}`);
|
|
86
|
-
} else {
|
|
87
|
-
console.log(` ${chalk.bold("Value:")} ${chalk.dim("(check your setup records or dashboard)")}`);
|
|
88
|
-
}
|
|
89
|
-
console.log("");
|
|
90
|
-
console.log(chalk.dim(" DNS changes can take up to 48 hours to propagate."));
|
|
91
|
-
console.log(chalk.dim(" Run this command again after adding the record."));
|
|
92
|
-
console.log("");
|
|
93
|
-
}
|
|
94
|
-
if (db) await db.disconnect();
|
|
95
|
-
}
|
|
96
|
-
export {
|
|
97
|
-
runVerifyDomain
|
|
98
|
-
};
|