@agenticmail/enterprise 0.5.372 → 0.5.374

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.
Files changed (41) hide show
  1. package/dist/agent-heartbeat-HZCGY3KS.js +510 -0
  2. package/dist/{agent-tools-AR3FPB24.js → agent-tools-CUJHKMUN.js} +2 -1
  3. package/dist/{chunk-CE4XOGCE.js → chunk-4THTH64Q.js} +2 -2
  4. package/dist/{chunk-IO5EPYLA.js → chunk-CYBP2ZIB.js} +21 -20
  5. package/dist/{chunk-QHBOQ2IG.js → chunk-HWUZLRZN.js} +4 -4
  6. package/dist/chunk-LVKRN4IR.js +26082 -0
  7. package/dist/{chunk-JXI6PCUZ.js → chunk-ODK6AOKC.js} +1 -1
  8. package/dist/{chunk-JNNZKFBP.js → chunk-OOP2M3YE.js} +15 -15
  9. package/dist/{chunk-DPQWI26Y.js → chunk-XO6LXD7H.js} +2 -2
  10. package/dist/cli-agent-6UJP34H3.js +2483 -0
  11. package/dist/cli-agent-CFLWIYRJ.js +2483 -0
  12. package/dist/cli-serve-42HTQ45A.js +281 -0
  13. package/dist/cli-serve-7AL3NKYK.js +281 -0
  14. package/dist/cli.js +3 -3
  15. package/dist/index.js +4 -4
  16. package/dist/routes-Q3YMFXX3.js +92 -0
  17. package/dist/runtime-UZEFUBAA.js +45 -0
  18. package/dist/runtime-WKWJ5BGT.js +45 -0
  19. package/dist/server-I533SQLB.js +28 -0
  20. package/dist/server-RHXEW7LO.js +28 -0
  21. package/dist/setup-4DKCCU6S.js +20 -0
  22. package/dist/setup-FDTGGTZE.js +20 -0
  23. package/logs/cloudflared-error.log +22 -0
  24. package/package.json +1 -1
  25. package/dist/agent-tools-22C6IARS.js +0 -14007
  26. package/dist/agent-tools-QHR2LY5V.js +0 -14007
  27. package/dist/agent-tools-YZF26YMY.js +0 -14007
  28. package/dist/chunk-2EI4AYXM.js +0 -2591
  29. package/dist/chunk-4MFGMCJO.js +0 -1727
  30. package/dist/chunk-5WDYN4UV.js +0 -3332
  31. package/dist/chunk-F6SI2DE3.js +0 -5101
  32. package/dist/chunk-HIQY73V2.js +0 -467
  33. package/dist/chunk-L7OG7R6F.js +0 -1727
  34. package/dist/chunk-LEACSX6C.js +0 -4945
  35. package/dist/chunk-MUH6AHIS.js +0 -4945
  36. package/dist/chunk-OZW6NYWD.js +0 -5101
  37. package/dist/chunk-SXDQEUHA.js +0 -1727
  38. package/dist/chunk-Z3I6GNTS.js +0 -106
  39. package/dist/chunk-ZW24HPRG.js +0 -5101
  40. package/dist/local-OXFH4V7E.js +0 -1144
  41. package/dist/local-QQ2V7CYC.js +0 -1190
@@ -1,106 +0,0 @@
1
- // src/db/factory.ts
2
- var ADAPTER_MAP = {
3
- postgres: () => import("./postgres-KAERODLZ.js").then((m) => m.PostgresAdapter),
4
- supabase: () => import("./postgres-KAERODLZ.js").then((m) => m.PostgresAdapter),
5
- // Supabase IS Postgres
6
- neon: () => import("./postgres-KAERODLZ.js").then((m) => m.PostgresAdapter),
7
- // Neon IS Postgres
8
- cockroachdb: () => import("./postgres-KAERODLZ.js").then((m) => m.PostgresAdapter),
9
- // CockroachDB is PG-compatible
10
- mysql: () => import("./mysql-E54MUUH2.js").then((m) => m.MysqlAdapter),
11
- planetscale: () => import("./mysql-E54MUUH2.js").then((m) => m.MysqlAdapter),
12
- // PlanetScale IS MySQL
13
- mongodb: () => import("./mongodb-MWH3DGZY.js").then((m) => m.MongoAdapter),
14
- sqlite: () => import("./sqlite-YZ64WWE6.js").then((m) => m.SqliteAdapter),
15
- turso: () => import("./turso-H7HBWPHO.js").then((m) => m.TursoAdapter),
16
- dynamodb: () => import("./dynamodb-QS64UREL.js").then((m) => m.DynamoAdapter)
17
- };
18
- async function createAdapter(config) {
19
- const loader = ADAPTER_MAP[config.type];
20
- if (!loader) {
21
- throw new Error(
22
- `Unsupported database type: "${config.type}". Supported: ${Object.keys(ADAPTER_MAP).join(", ")}`
23
- );
24
- }
25
- const AdapterClass = await loader();
26
- const adapter = new AdapterClass();
27
- await adapter.connect(config);
28
- return adapter;
29
- }
30
- function smartDbConfig(connectionString, typeHint) {
31
- const type = typeHint || (connectionString.startsWith("postgres") ? "postgres" : "sqlite");
32
- const config = { type, connectionString };
33
- if (type === "sqlite") return config;
34
- try {
35
- const u = new URL(connectionString);
36
- const host = u.hostname || "";
37
- const port = u.port || "5432";
38
- if (host.includes("pooler.supabase.com") || host.includes(".supabase.co")) {
39
- const projectRef = u.username.replace("postgres.", "");
40
- if (host.includes("pooler.supabase.com")) {
41
- const directU = new URL(connectionString);
42
- directU.hostname = "db." + projectRef + ".supabase.co";
43
- directU.port = "5432";
44
- directU.searchParams.delete("pgbouncer");
45
- config.directUrl = directU.toString();
46
- if (port === "5432") {
47
- const fixedU = new URL(connectionString);
48
- fixedU.port = "6543";
49
- fixedU.searchParams.set("pgbouncer", "true");
50
- config.connectionString = fixedU.toString();
51
- console.log("[db] Auto-optimized: Supabase session mode (5432) \u2192 transaction mode (6543)");
52
- } else if (!u.searchParams.get("pgbouncer")) {
53
- const fixedU = new URL(connectionString);
54
- fixedU.searchParams.set("pgbouncer", "true");
55
- config.connectionString = fixedU.toString();
56
- console.log("[db] Auto-configured: Added ?pgbouncer=true for Supabase transaction mode");
57
- }
58
- } else if (host.startsWith("db.")) {
59
- config.directUrl = connectionString;
60
- console.log("[db] Supabase direct connection detected. For production, use the pooler URL (port 6543).");
61
- }
62
- } else if (host.includes(".neon.tech")) {
63
- if (!host.includes("-pooler")) {
64
- config.directUrl = connectionString;
65
- const poolerU = new URL(connectionString);
66
- const parts = poolerU.hostname.split(".");
67
- if (parts[0] && !parts[0].endsWith("-pooler")) {
68
- parts[0] = parts[0] + "-pooler";
69
- poolerU.hostname = parts.join(".");
70
- config.connectionString = poolerU.toString();
71
- console.log("[db] Auto-optimized: Neon direct \u2192 pooler endpoint");
72
- }
73
- } else {
74
- const directU = new URL(connectionString);
75
- const parts = directU.hostname.split(".");
76
- if (parts[0]) {
77
- parts[0] = parts[0].replace(/-pooler$/, "");
78
- directU.hostname = parts.join(".");
79
- }
80
- config.directUrl = directU.toString();
81
- }
82
- }
83
- } catch {
84
- }
85
- return config;
86
- }
87
- function getSupportedDatabases() {
88
- return [
89
- { type: "postgres", label: "PostgreSQL", group: "SQL" },
90
- { type: "mysql", label: "MySQL / MariaDB", group: "SQL" },
91
- { type: "sqlite", label: "SQLite (embedded, dev/small)", group: "SQL" },
92
- { type: "mongodb", label: "MongoDB", group: "NoSQL" },
93
- { type: "turso", label: "Turso (LibSQL, edge)", group: "Edge" },
94
- { type: "dynamodb", label: "DynamoDB (AWS)", group: "Cloud" },
95
- { type: "supabase", label: "Supabase (managed Postgres)", group: "Cloud" },
96
- { type: "neon", label: "Neon (serverless Postgres)", group: "Cloud" },
97
- { type: "planetscale", label: "PlanetScale (managed MySQL)", group: "Cloud" },
98
- { type: "cockroachdb", label: "CockroachDB", group: "Distributed" }
99
- ];
100
- }
101
-
102
- export {
103
- createAdapter,
104
- smartDbConfig,
105
- getSupportedDatabases
106
- };