@agenticmail/enterprise 0.5.381 → 0.5.382
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/dashboard/app.js +8 -4
- package/logs/cloudflared-error.log +14 -0
- package/package.json +1 -1
- package/dist/agent-heartbeat-3JIAQFMW.js +0 -510
- package/dist/agent-heartbeat-BICTJ4TT.js +0 -510
- package/dist/agent-heartbeat-HZCGY3KS.js +0 -510
- package/dist/agent-heartbeat-VU7RMEIG.js +0 -510
- package/dist/browser-tool-P57PLVW2.js +0 -4002
- package/dist/cli-agent-45NEZY7H.js +0 -2483
- package/dist/cli-agent-6UJP34H3.js +0 -2483
- package/dist/cli-agent-A4IFO5ML.js +0 -2483
- package/dist/cli-agent-CFLWIYRJ.js +0 -2483
- package/dist/cli-agent-H3DNHT44.js +0 -2483
- package/dist/cli-agent-HWRINZSE.js +0 -2483
- package/dist/cli-agent-NIKMPSIT.js +0 -2497
- package/dist/cli-agent-VEQZKUCM.js +0 -2483
- package/dist/cli-agent-XCILLLBL.js +0 -2483
- package/dist/cli-agent-ZZGZ5KDE.js +0 -2483
- package/dist/cli-recover-CO2RNTTL.js +0 -488
- package/dist/cli-serve-2K7AX2G2.js +0 -281
- package/dist/cli-serve-42HTQ45A.js +0 -281
- package/dist/cli-serve-5KMU2NHN.js +0 -281
- package/dist/cli-serve-7AL3NKYK.js +0 -281
- package/dist/cli-serve-AEW7G6YZ.js +0 -281
- package/dist/cli-serve-COPCKGDT.js +0 -281
- package/dist/cli-serve-H5LPD45H.js +0 -286
- package/dist/cli-serve-IOSXZHIK.js +0 -286
- package/dist/cli-serve-MGKI4Z5G.js +0 -281
- package/dist/cli-serve-WFOG5TRD.js +0 -281
- package/dist/cli-validate-ZO3PW64W.js +0 -150
- package/dist/cli-verify-7EMGBE46.js +0 -149
- package/dist/dynamodb-QS64UREL.js +0 -424
- package/dist/factory-RTZU2K54.js +0 -11
- package/dist/meetings-EMKU56G3.js +0 -12
- package/dist/mongodb-MWH3DGZY.js +0 -320
- package/dist/mysql-E54MUUH2.js +0 -580
- package/dist/postgres-KAERODLZ.js +0 -879
- package/dist/routes-NIQHEAV2.js +0 -92
- package/dist/routes-OKGFOUUP.js +0 -92
- package/dist/routes-Q3YMFXX3.js +0 -92
- package/dist/routes-XTMY7IYO.js +0 -92
- package/dist/runtime-F75SNKYK.js +0 -45
- package/dist/runtime-GS2SAORH.js +0 -45
- package/dist/runtime-HNPFFKQL.js +0 -45
- package/dist/runtime-NST6HJUG.js +0 -45
- package/dist/runtime-RDULR4UE.js +0 -45
- package/dist/runtime-SUDXHYMB.js +0 -45
- package/dist/runtime-UZEFUBAA.js +0 -45
- package/dist/runtime-WKWJ5BGT.js +0 -45
- package/dist/server-4XD4C4GA.js +0 -28
- package/dist/server-CQPAITXK.js +0 -28
- package/dist/server-EGWD64TG.js +0 -28
- package/dist/server-ET4HLIC7.js +0 -28
- package/dist/server-I533SQLB.js +0 -28
- package/dist/server-NENS3OG6.js +0 -28
- package/dist/server-OYPIKSG2.js +0 -28
- package/dist/server-Q52YXWZD.js +0 -28
- package/dist/server-RHXEW7LO.js +0 -28
- package/dist/server-XRW327IX.js +0 -28
- package/dist/setup-4DKCCU6S.js +0 -20
- package/dist/setup-C22ILWUJ.js +0 -20
- package/dist/setup-DCBFFTLT.js +0 -20
- package/dist/setup-DKOGTOIG.js +0 -20
- package/dist/setup-FDTGGTZE.js +0 -20
- package/dist/setup-JLD2NH4N.js +0 -20
- package/dist/setup-LQT3AYBX.js +0 -20
- package/dist/setup-QKWRY6L3.js +0 -20
- package/dist/setup-T2U77CEY.js +0 -20
- package/dist/setup-WO337O3I.js +0 -20
- package/dist/skills-4MHEPJGC.js +0 -16
- package/dist/sqlite-YZ64WWE6.js +0 -572
- package/dist/telegram-QRNGRT5M.js +0 -17
- package/dist/turso-H7HBWPHO.js +0 -501
- package/dist/whatsapp-32CNVRFX.js +0 -31
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ALL_TOOLS,
|
|
3
|
-
init_tool_catalog
|
|
4
|
-
} from "./chunk-5WDYN4UV.js";
|
|
5
|
-
import {
|
|
6
|
-
collectCommunityToolIds,
|
|
7
|
-
init_skill_validator,
|
|
8
|
-
validateSkillManifest
|
|
9
|
-
} from "./chunk-22U7TZPN.js";
|
|
10
|
-
import "./chunk-KFQGP6VL.js";
|
|
11
|
-
|
|
12
|
-
// src/engine/cli-validate.ts
|
|
13
|
-
init_skill_validator();
|
|
14
|
-
init_tool_catalog();
|
|
15
|
-
async function runValidate(args) {
|
|
16
|
-
const chalk = (await import("chalk")).default;
|
|
17
|
-
const fs = await import("fs/promises");
|
|
18
|
-
const path = await import("path");
|
|
19
|
-
const jsonMode = args.includes("--json");
|
|
20
|
-
const allMode = args.includes("--all");
|
|
21
|
-
const pathArgs = args.filter((a) => !a.startsWith("--"));
|
|
22
|
-
const builtinIds = new Set(ALL_TOOLS.map((t) => t.id || t.name));
|
|
23
|
-
const communityDir = path.resolve(process.cwd(), "community-skills");
|
|
24
|
-
const reports = [];
|
|
25
|
-
if (allMode) {
|
|
26
|
-
let entries;
|
|
27
|
-
try {
|
|
28
|
-
entries = await fs.readdir(communityDir, { withFileTypes: true });
|
|
29
|
-
} catch {
|
|
30
|
-
if (jsonMode) {
|
|
31
|
-
console.log(JSON.stringify({ error: "community-skills/ directory not found" }));
|
|
32
|
-
} else {
|
|
33
|
-
console.error(chalk.red("Error: community-skills/ directory not found"));
|
|
34
|
-
}
|
|
35
|
-
process.exit(1);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
for (const entry of entries) {
|
|
39
|
-
if (!entry.isDirectory() || entry.name.startsWith("_") || entry.name.startsWith(".")) continue;
|
|
40
|
-
const skillDir = path.join(communityDir, entry.name);
|
|
41
|
-
const report = await validatePath(skillDir, builtinIds, communityDir);
|
|
42
|
-
reports.push(report);
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
const target = pathArgs[0];
|
|
46
|
-
if (!target) {
|
|
47
|
-
if (jsonMode) {
|
|
48
|
-
console.log(JSON.stringify({ error: "No path specified. Usage: npx @agenticmail/enterprise validate <path> [--all] [--json]" }));
|
|
49
|
-
} else {
|
|
50
|
-
console.log(`${chalk.bold("Usage:")} npx @agenticmail/enterprise validate <path>`);
|
|
51
|
-
console.log("");
|
|
52
|
-
console.log(" <path> Path to a skill directory or agenticmail-skill.json file");
|
|
53
|
-
console.log(" --all Validate all skills in community-skills/");
|
|
54
|
-
console.log(" --json Machine-readable JSON output");
|
|
55
|
-
}
|
|
56
|
-
process.exit(1);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const report = await validatePath(path.resolve(target), builtinIds, communityDir);
|
|
60
|
-
reports.push(report);
|
|
61
|
-
}
|
|
62
|
-
if (jsonMode) {
|
|
63
|
-
console.log(JSON.stringify({ results: reports, totalErrors: reports.reduce((s, r) => s + r.errors.length, 0) }, null, 2));
|
|
64
|
-
} else {
|
|
65
|
-
console.log("");
|
|
66
|
-
for (const report of reports) {
|
|
67
|
-
if (report.valid) {
|
|
68
|
-
console.log(chalk.green(" \u2714") + " " + chalk.bold(report.skillId) + chalk.dim(` (${report.path})`));
|
|
69
|
-
} else {
|
|
70
|
-
console.log(chalk.red(" \u2718") + " " + chalk.bold(report.skillId) + chalk.dim(` (${report.path})`));
|
|
71
|
-
for (const err of report.errors) {
|
|
72
|
-
console.log(chalk.red(" \u2502 ") + err);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
for (const warn of report.warnings) {
|
|
76
|
-
console.log(chalk.yellow(" \u26A0 ") + warn);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
console.log("");
|
|
80
|
-
const passed = reports.filter((r) => r.valid).length;
|
|
81
|
-
const failed = reports.filter((r) => !r.valid).length;
|
|
82
|
-
if (failed > 0) {
|
|
83
|
-
console.log(chalk.red(` ${failed} failed`) + chalk.dim(`, ${passed} passed, ${reports.length} total`));
|
|
84
|
-
} else {
|
|
85
|
-
console.log(chalk.green(` ${passed} passed`) + chalk.dim(`, ${reports.length} total`));
|
|
86
|
-
}
|
|
87
|
-
console.log("");
|
|
88
|
-
}
|
|
89
|
-
if (reports.some((r) => !r.valid)) {
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
async function validatePath(targetPath, builtinIds, communityDir) {
|
|
94
|
-
const fs = await import("fs/promises");
|
|
95
|
-
const path = await import("path");
|
|
96
|
-
let manifestPath;
|
|
97
|
-
try {
|
|
98
|
-
const stat = await fs.stat(targetPath);
|
|
99
|
-
if (stat.isDirectory()) {
|
|
100
|
-
manifestPath = path.join(targetPath, "agenticmail-skill.json");
|
|
101
|
-
} else {
|
|
102
|
-
manifestPath = targetPath;
|
|
103
|
-
}
|
|
104
|
-
} catch {
|
|
105
|
-
return {
|
|
106
|
-
path: targetPath,
|
|
107
|
-
skillId: path.basename(targetPath),
|
|
108
|
-
valid: false,
|
|
109
|
-
errors: [`Path not found: ${targetPath}`],
|
|
110
|
-
warnings: []
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
let raw;
|
|
114
|
-
try {
|
|
115
|
-
raw = await fs.readFile(manifestPath, "utf-8");
|
|
116
|
-
} catch {
|
|
117
|
-
return {
|
|
118
|
-
path: manifestPath,
|
|
119
|
-
skillId: path.basename(path.dirname(manifestPath)),
|
|
120
|
-
valid: false,
|
|
121
|
-
errors: [`Cannot read: ${manifestPath}`],
|
|
122
|
-
warnings: []
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
let manifest;
|
|
126
|
-
try {
|
|
127
|
-
manifest = JSON.parse(raw);
|
|
128
|
-
} catch (err) {
|
|
129
|
-
return {
|
|
130
|
-
path: manifestPath,
|
|
131
|
-
skillId: path.basename(path.dirname(manifestPath)),
|
|
132
|
-
valid: false,
|
|
133
|
-
errors: [`Invalid JSON: ${err.message}`],
|
|
134
|
-
warnings: []
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
const communityIds = await collectCommunityToolIds(communityDir, manifest.id);
|
|
138
|
-
const allExistingIds = /* @__PURE__ */ new Set([...builtinIds, ...communityIds]);
|
|
139
|
-
const result = validateSkillManifest(manifest, { existingToolIds: allExistingIds });
|
|
140
|
-
return {
|
|
141
|
-
path: manifestPath,
|
|
142
|
-
skillId: manifest.id || path.basename(path.dirname(manifestPath)),
|
|
143
|
-
valid: result.valid,
|
|
144
|
-
errors: result.errors,
|
|
145
|
-
warnings: result.warnings
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
export {
|
|
149
|
-
runValidate
|
|
150
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DomainLock
|
|
3
|
-
} from "./chunk-UPU23ZRG.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
|
-
function hasFlag(args, name) {
|
|
13
|
-
return args.includes(name);
|
|
14
|
-
}
|
|
15
|
-
function detectDbType(url) {
|
|
16
|
-
const u = url.toLowerCase().trim();
|
|
17
|
-
if (u.startsWith("postgres") || u.startsWith("pg:")) return "postgres";
|
|
18
|
-
if (u.startsWith("mysql")) return "mysql";
|
|
19
|
-
if (u.startsWith("mongodb")) return "mongodb";
|
|
20
|
-
if (u.startsWith("libsql") || u.includes(".turso.io")) return "turso";
|
|
21
|
-
if (u.endsWith(".db") || u.endsWith(".sqlite") || u.endsWith(".sqlite3") || u.startsWith("file:")) return "sqlite";
|
|
22
|
-
return "postgres";
|
|
23
|
-
}
|
|
24
|
-
async function runVerifyDomain(args) {
|
|
25
|
-
const { default: chalk } = await import("chalk");
|
|
26
|
-
const { default: ora } = await import("ora");
|
|
27
|
-
console.log("");
|
|
28
|
-
console.log(chalk.bold(" AgenticMail Enterprise \u2014 Domain Verification"));
|
|
29
|
-
console.log("");
|
|
30
|
-
let domain = getFlag(args, "--domain");
|
|
31
|
-
let dnsChallenge;
|
|
32
|
-
let db = null;
|
|
33
|
-
let dbConnected = false;
|
|
34
|
-
const envDbUrl = process.env.DATABASE_URL;
|
|
35
|
-
if (envDbUrl) {
|
|
36
|
-
const dbType = detectDbType(envDbUrl);
|
|
37
|
-
const spinner = ora(`Connecting to database (${dbType})...`).start();
|
|
38
|
-
try {
|
|
39
|
-
const { createAdapter } = await import("./factory-RTZU2K54.js");
|
|
40
|
-
db = await createAdapter({ type: dbType, connectionString: envDbUrl });
|
|
41
|
-
await db.migrate();
|
|
42
|
-
const settings = await db.getSettings();
|
|
43
|
-
if (!domain && settings?.domain) domain = settings.domain;
|
|
44
|
-
if (settings?.domainDnsChallenge) dnsChallenge = settings.domainDnsChallenge;
|
|
45
|
-
dbConnected = true;
|
|
46
|
-
spinner.succeed(`Connected to ${dbType} database` + (domain ? ` (domain: ${domain})` : ""));
|
|
47
|
-
} catch (err) {
|
|
48
|
-
spinner.warn(`Could not connect via DATABASE_URL: ${err.message}`);
|
|
49
|
-
db = null;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (!dbConnected) {
|
|
53
|
-
const dbPath = getFlag(args, "--db");
|
|
54
|
-
const dbType = getFlag(args, "--db-type") || "sqlite";
|
|
55
|
-
if (dbPath) {
|
|
56
|
-
const spinner = ora(`Connecting to ${dbType} database...`).start();
|
|
57
|
-
try {
|
|
58
|
-
const { createAdapter } = await import("./factory-RTZU2K54.js");
|
|
59
|
-
db = await createAdapter({ type: dbType, connectionString: dbPath });
|
|
60
|
-
await db.migrate();
|
|
61
|
-
const settings = await db.getSettings();
|
|
62
|
-
if (!domain && settings?.domain) domain = settings.domain;
|
|
63
|
-
if (settings?.domainDnsChallenge) dnsChallenge = settings.domainDnsChallenge;
|
|
64
|
-
dbConnected = true;
|
|
65
|
-
spinner.succeed(`Connected to ${dbType} database`);
|
|
66
|
-
} catch {
|
|
67
|
-
spinner.warn("Could not read local database");
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (!domain) {
|
|
72
|
-
const { default: inquirer } = await import("inquirer");
|
|
73
|
-
const answer = await inquirer.prompt([{
|
|
74
|
-
type: "input",
|
|
75
|
-
name: "domain",
|
|
76
|
-
message: "Domain to verify:",
|
|
77
|
-
suffix: chalk.dim(" (e.g. agents.yourcompany.com)"),
|
|
78
|
-
validate: (v) => v.includes(".") || "Enter a valid domain",
|
|
79
|
-
filter: (v) => v.trim().toLowerCase()
|
|
80
|
-
}]);
|
|
81
|
-
domain = answer.domain;
|
|
82
|
-
}
|
|
83
|
-
const lock = new DomainLock();
|
|
84
|
-
const maxAttempts = hasFlag(args, "--poll") ? 5 : 1;
|
|
85
|
-
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
86
|
-
const spinner = ora(
|
|
87
|
-
maxAttempts > 1 ? `Checking DNS verification (attempt ${attempt}/${maxAttempts})...` : "Checking DNS verification..."
|
|
88
|
-
).start();
|
|
89
|
-
try {
|
|
90
|
-
const result = await lock.checkVerification(domain);
|
|
91
|
-
if (!result.success) {
|
|
92
|
-
spinner.fail("Verification check failed");
|
|
93
|
-
console.log("");
|
|
94
|
-
console.error(chalk.red(` ${result.error}`));
|
|
95
|
-
console.log("");
|
|
96
|
-
if (db) await db.disconnect();
|
|
97
|
-
process.exit(1);
|
|
98
|
-
}
|
|
99
|
-
if (result.verified) {
|
|
100
|
-
spinner.succeed("Domain verified!");
|
|
101
|
-
if (dbConnected && db) {
|
|
102
|
-
try {
|
|
103
|
-
await db.updateSettings({
|
|
104
|
-
domainStatus: "verified",
|
|
105
|
-
domainVerifiedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
106
|
-
});
|
|
107
|
-
console.log(chalk.dim(" Database updated with verified status."));
|
|
108
|
-
} catch {
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
console.log("");
|
|
112
|
-
console.log(chalk.green.bold(` \u2713 ${domain} is verified and protected.`));
|
|
113
|
-
console.log(chalk.dim(" Your deployment domain is locked. No other instance can claim it."));
|
|
114
|
-
console.log(chalk.dim(" The system now operates 100% offline \u2014 no outbound calls are made."));
|
|
115
|
-
console.log("");
|
|
116
|
-
if (db) await db.disconnect();
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
} catch (err) {
|
|
120
|
-
spinner.warn(`Check failed: ${err.message}`);
|
|
121
|
-
}
|
|
122
|
-
if (attempt < maxAttempts) {
|
|
123
|
-
const waitSpinner = ora(`DNS record not found yet. Retrying in 10 seconds...`).start();
|
|
124
|
-
await new Promise((r) => setTimeout(r, 1e4));
|
|
125
|
-
waitSpinner.stop();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
console.log("");
|
|
129
|
-
console.log(chalk.yellow(" DNS record not detected yet."));
|
|
130
|
-
console.log("");
|
|
131
|
-
console.log(chalk.bold(" Make sure this TXT record exists at your DNS provider:"));
|
|
132
|
-
console.log("");
|
|
133
|
-
console.log(` ${chalk.bold("Host:")} ${chalk.cyan(`_agenticmail-verify.${domain}`)}`);
|
|
134
|
-
console.log(` ${chalk.bold("Type:")} ${chalk.cyan("TXT")}`);
|
|
135
|
-
if (dnsChallenge) {
|
|
136
|
-
console.log(` ${chalk.bold("Value:")} ${chalk.cyan(dnsChallenge)}`);
|
|
137
|
-
} else {
|
|
138
|
-
console.log(` ${chalk.bold("Value:")} ${chalk.dim("(check your dashboard or setup output)")}`);
|
|
139
|
-
}
|
|
140
|
-
console.log("");
|
|
141
|
-
console.log(chalk.dim(" DNS propagation can take up to 48 hours."));
|
|
142
|
-
console.log(chalk.dim(" Run with --poll to retry automatically:"));
|
|
143
|
-
console.log(chalk.dim(` npx @agenticmail/enterprise verify-domain --domain ${domain} --poll`));
|
|
144
|
-
console.log("");
|
|
145
|
-
if (db) await db.disconnect();
|
|
146
|
-
}
|
|
147
|
-
export {
|
|
148
|
-
runVerifyDomain
|
|
149
|
-
};
|