@agenticmail/enterprise 0.5.351 → 0.5.353

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.
@@ -466,7 +466,7 @@ var AgentHeartbeatManager = class {
466
466
  return;
467
467
  }
468
468
  try {
469
- const { guardrails } = await import("./routes-FPNJY7MF.js");
469
+ const { guardrails } = await import("./routes-OA6Y74YU.js");
470
470
  const status = await guardrails.getStatus(ctx.agentId);
471
471
  if (status.paused || status.offDuty) {
472
472
  console.log(`[heartbeat] Skipping action dispatch \u2014 agent is ${status.offDuty ? "off duty" : "paused"}`);
@@ -0,0 +1,193 @@
1
+ import {
2
+ __esm
3
+ } from "./chunk-KFQGP6VL.js";
4
+
5
+ // src/engine/agent-provisioner.ts
6
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync } from "fs";
7
+ import { resolve, dirname } from "path";
8
+ import { homedir } from "os";
9
+ import { execSync } from "child_process";
10
+ import { fileURLToPath } from "url";
11
+ function slugify(name) {
12
+ return name.split(/\s+/)[0].toLowerCase().replace(/[^a-z0-9-]/g, "");
13
+ }
14
+ function getPm2Name(config) {
15
+ const local = config.deployment?.config?.local;
16
+ if (local?.pm2Name) return local.pm2Name;
17
+ return `${slugify(config.name)}-agent`;
18
+ }
19
+ function findCliScript() {
20
+ try {
21
+ const thisFile = fileURLToPath(import.meta.url);
22
+ let dir = dirname(thisFile);
23
+ for (let i = 0; i < 5; i++) {
24
+ const candidate = resolve(dir, "dist", "cli.js");
25
+ if (existsSync(candidate)) return candidate;
26
+ const candidate2 = resolve(dir, "cli.js");
27
+ if (existsSync(candidate2) && dir.endsWith("dist")) return candidate2;
28
+ dir = dirname(dir);
29
+ }
30
+ } catch {
31
+ }
32
+ try {
33
+ const result = execSync("npm root -g", { encoding: "utf8", timeout: 5e3 }).trim();
34
+ const candidate = resolve(result, "@agenticmail", "enterprise", "dist", "cli.js");
35
+ if (existsSync(candidate)) return candidate;
36
+ } catch {
37
+ }
38
+ return null;
39
+ }
40
+ function provisionAgent(config) {
41
+ const slug = slugify(config.name);
42
+ const pm2Name = getPm2Name(config);
43
+ const amDir = resolve(homedir(), ".agenticmail");
44
+ const envFile = resolve(amDir, `.env.${slug}`);
45
+ const wrapperScript = resolve(amDir, `agent-${slug}.cjs`);
46
+ const port = config.deployment?.config?.local?.port || 3101;
47
+ try {
48
+ mkdirSync(amDir, { recursive: true });
49
+ } catch (e) {
50
+ return { success: false, error: `Cannot create ${amDir}: ${e.message}`, envFile, wrapperScript, slug, pm2Name, port };
51
+ }
52
+ const envLines = [
53
+ `# Auto-generated for agent: ${config.displayName || config.name}`,
54
+ `# Created: ${(/* @__PURE__ */ new Date()).toISOString()}`,
55
+ `AGENTICMAIL_AGENT_ID=${config.id}`,
56
+ `AGENTICMAIL_AGENT_NAME=${config.displayName || config.name}`,
57
+ `AGENTICMAIL_MODEL=${config.model?.provider || "anthropic"}/${config.model?.modelId || "claude-sonnet-4-20250514"}`,
58
+ `PORT=${port}`
59
+ ];
60
+ if (config.model?.thinkingLevel) {
61
+ envLines.push(`AGENTICMAIL_THINKING=${config.model.thinkingLevel}`);
62
+ }
63
+ const mainEnvFile = resolve(amDir, ".env");
64
+ const REQUIRED_INHERIT = ["DATABASE_URL", "JWT_SECRET"];
65
+ const OPTIONAL_INHERIT = ["AGENTICMAIL_VAULT_KEY", "ORG_ID", "ENTERPRISE_URL", "AGENTICMAIL_DOMAIN"];
66
+ if (!existsSync(mainEnvFile)) {
67
+ return { success: false, error: `Enterprise .env not found at ${mainEnvFile}. Run setup first.`, envFile, wrapperScript, slug, pm2Name, port };
68
+ }
69
+ const mainEnvContent = readFileSync(mainEnvFile, "utf8");
70
+ const missingKeys = [];
71
+ for (const key of REQUIRED_INHERIT) {
72
+ const m = mainEnvContent.match(new RegExp(`^${key}=(.+)$`, "m"));
73
+ if (m) {
74
+ envLines.push(`${key}=${m[1]}`);
75
+ } else {
76
+ missingKeys.push(key);
77
+ }
78
+ }
79
+ if (missingKeys.length > 0) {
80
+ return { success: false, error: `Missing required keys in ${mainEnvFile}: ${missingKeys.join(", ")}`, envFile, wrapperScript, slug, pm2Name, port };
81
+ }
82
+ for (const key of OPTIONAL_INHERIT) {
83
+ const m = mainEnvContent.match(new RegExp(`^${key}=(.+)$`, "m"));
84
+ if (m) envLines.push(`${key}=${m[1]}`);
85
+ }
86
+ try {
87
+ writeFileSync(envFile, envLines.join("\n") + "\n");
88
+ } catch (e) {
89
+ return { success: false, error: `Cannot write ${envFile}: ${e.message}`, envFile, wrapperScript, slug, pm2Name, port };
90
+ }
91
+ try {
92
+ const written = readFileSync(envFile, "utf8");
93
+ if (!written.includes(`AGENTICMAIL_AGENT_ID=${config.id}`)) {
94
+ return { success: false, error: `Env file validation failed: AGENTICMAIL_AGENT_ID not found in ${envFile}`, envFile, wrapperScript, slug, pm2Name, port };
95
+ }
96
+ if (!written.includes("DATABASE_URL=")) {
97
+ return { success: false, error: `Env file validation failed: DATABASE_URL not found in ${envFile}`, envFile, wrapperScript, slug, pm2Name, port };
98
+ }
99
+ } catch (e) {
100
+ return { success: false, error: `Cannot read back ${envFile}: ${e.message}`, envFile, wrapperScript, slug, pm2Name, port };
101
+ }
102
+ const cliScript = findCliScript();
103
+ const wrapperLines = [
104
+ `#!/usr/bin/env node`,
105
+ `// Auto-generated agent wrapper for: ${config.displayName || config.name}`,
106
+ `// Agent ID: ${config.id}`,
107
+ `// Created: ${(/* @__PURE__ */ new Date()).toISOString()}`,
108
+ `'use strict';`,
109
+ ``,
110
+ `const { readFileSync } = require('fs');`,
111
+ ``,
112
+ `// \u2500\u2500 Load agent env file \u2500\u2500`,
113
+ `const envFile = ${JSON.stringify(envFile)};`,
114
+ `try {`,
115
+ ` const lines = readFileSync(envFile, 'utf8').split('\\n');`,
116
+ ` for (const line of lines) {`,
117
+ ` const m = line.match(/^([A-Z_][A-Z0-9_]*)=(.*)$/);`,
118
+ ` if (m) process.env[m[1]] = m[2];`,
119
+ ` }`,
120
+ `} catch (e) {`,
121
+ ` console.error('[agent-wrapper] FATAL: Cannot load env file:', envFile, e.message);`,
122
+ ` process.exit(1);`,
123
+ `}`,
124
+ ``,
125
+ `// \u2500\u2500 Validate required env vars \u2500\u2500`,
126
+ `const required = ['AGENTICMAIL_AGENT_ID', 'DATABASE_URL', 'JWT_SECRET'];`,
127
+ `for (const key of required) {`,
128
+ ` if (!process.env[key]) {`,
129
+ ` console.error('[agent-wrapper] FATAL: Missing required env var:', key);`,
130
+ ` process.exit(1);`,
131
+ ` }`,
132
+ `}`,
133
+ `console.log('[agent-wrapper] Agent:', process.env.AGENTICMAIL_AGENT_NAME, '(' + process.env.AGENTICMAIL_AGENT_ID.slice(0, 8) + '...)');`,
134
+ ``
135
+ ];
136
+ if (cliScript) {
137
+ wrapperLines.push(
138
+ `// \u2500\u2500 Direct execution (found cli.js at build time) \u2500\u2500`,
139
+ `// Set argv so cli.js routes to 'agent' command`,
140
+ `process.argv = [process.execPath, __filename, 'agent'];`,
141
+ `try {`,
142
+ ` require(${JSON.stringify(cliScript)});`,
143
+ `} catch (e) {`,
144
+ ` // Fallback to npx if direct path is stale (e.g. npx cache cleared)`,
145
+ ` console.warn('[agent-wrapper] Direct execution failed, falling back to npx:', e.message);`,
146
+ ` const { spawnSync } = require('child_process');`,
147
+ ` const r = spawnSync('npx', ['@agenticmail/enterprise', 'agent'], {`,
148
+ ` stdio: 'inherit', env: process.env, shell: process.platform === 'win32'`,
149
+ ` });`,
150
+ ` process.exit(r.status || 0);`,
151
+ `}`
152
+ );
153
+ } else {
154
+ wrapperLines.push(
155
+ `// \u2500\u2500 npx execution (cli.js not found at provision time) \u2500\u2500`,
156
+ `const { spawnSync } = require('child_process');`,
157
+ `const r = spawnSync('npx', ['@agenticmail/enterprise', 'agent'], {`,
158
+ ` stdio: 'inherit', env: process.env, shell: process.platform === 'win32'`,
159
+ `});`,
160
+ `process.exit(r.status || 0);`
161
+ );
162
+ }
163
+ try {
164
+ writeFileSync(wrapperScript, wrapperLines.join("\n") + "\n");
165
+ } catch (e) {
166
+ return { success: false, error: `Cannot write ${wrapperScript}: ${e.message}`, envFile, wrapperScript, slug, pm2Name, port };
167
+ }
168
+ try {
169
+ const stat = statSync(wrapperScript);
170
+ if (stat.size < 100) {
171
+ return { success: false, error: `Wrapper script too small (${stat.size} bytes): ${wrapperScript}`, envFile, wrapperScript, slug, pm2Name, port };
172
+ }
173
+ } catch (e) {
174
+ return { success: false, error: `Cannot stat wrapper: ${e.message}`, envFile, wrapperScript, slug, pm2Name, port };
175
+ }
176
+ return {
177
+ success: true,
178
+ envFile,
179
+ wrapperScript,
180
+ cliScript: cliScript || void 0,
181
+ slug,
182
+ pm2Name,
183
+ port
184
+ };
185
+ }
186
+ var init_agent_provisioner = __esm({
187
+ "src/engine/agent-provisioner.ts"() {
188
+ }
189
+ });
190
+ init_agent_provisioner();
191
+ export {
192
+ provisionAgent
193
+ };
@@ -393,9 +393,6 @@ _Add environment-specific notes here (camera names, SSH hosts, etc.)_
393
393
 
394
394
  // src/engine/deployer.ts
395
395
  import { execSync } from "child_process";
396
- import { resolve } from "path";
397
- import { existsSync } from "fs";
398
- import { homedir } from "os";
399
396
  function getPm2Name(config) {
400
397
  const local = config.deployment?.config?.local;
401
398
  if (local?.pm2Name) return local.pm2Name;
@@ -419,40 +416,6 @@ async function ensurePm2() {
419
416
  }
420
417
  }
421
418
  }
422
- function generateEcosystemConfig(config) {
423
- const pm2Name = getPm2Name(config);
424
- const local = config.deployment?.config?.local;
425
- const cwd = local?.workDir || process.cwd();
426
- let script = resolve(cwd, "dist/cli.js");
427
- let useNpx = false;
428
- if (!existsSync(script)) {
429
- try {
430
- const pkgDir = resolve(import.meta.url.replace("file://", "").replace(/\/dist\/.*$|\/src\/.*$/, ""));
431
- const candidate = resolve(pkgDir, "dist/cli.js");
432
- if (existsSync(candidate)) {
433
- script = candidate;
434
- } else {
435
- useNpx = true;
436
- }
437
- } catch {
438
- useNpx = true;
439
- }
440
- }
441
- const slug = config.name.split(/\s+/)[0].toLowerCase().replace(/[^a-z0-9-]/g, "");
442
- const amDir = resolve(homedir(), ".agenticmail");
443
- const envFile = resolve(amDir, `.env.${slug}`);
444
- const hasEnvFile = existsSync(envFile);
445
- const cwdEnvFile = resolve(cwd, `.env.${slug}`);
446
- const hasCwdEnvFile = existsSync(cwdEnvFile);
447
- return {
448
- script,
449
- args: "agent",
450
- name: pm2Name,
451
- cwd,
452
- envFile: hasEnvFile ? envFile : hasCwdEnvFile ? cwdEnvFile : void 0,
453
- useNpx
454
- };
455
- }
456
419
  var DeploymentEngine;
457
420
  var init_deployer = __esm({
458
421
  "src/engine/deployer.ts"() {
@@ -715,16 +678,23 @@ EOF`);
715
678
  * Restarts the PM2 process (or starts it if stopped).
716
679
  */
717
680
  async deployLocal(config, emit) {
718
- const pm2Name = getPm2Name(config);
681
+ emit("provision", "started", "Creating agent configuration files...");
682
+ const { provisionAgent } = await import("./agent-provisioner-JIT6CRPU.js");
683
+ const provision = provisionAgent(config);
684
+ if (!provision.success) {
685
+ emit("provision", "failed", `Provisioning failed: ${provision.error}`);
686
+ return { success: false, events: [], error: provision.error };
687
+ }
688
+ emit("provision", "completed", `Agent files created: ${provision.envFile}, ${provision.wrapperScript}${provision.cliScript ? " (direct mode)" : " (npx mode)"}`);
719
689
  emit("install", "started", "Checking PM2 installation...");
720
690
  const pm2Status = await ensurePm2();
721
691
  if (!pm2Status.installed) {
722
- emit("install", "failed", `PM2 installation failed: ${pm2Status.error}. Try manually: npm install -g pm2`);
692
+ emit("install", "failed", `PM2 not available: ${pm2Status.error}. Try: npm install -g pm2`);
723
693
  return { success: false, events: [], error: `PM2 not available: ${pm2Status.error}` };
724
694
  }
725
695
  emit("install", "completed", `PM2 v${pm2Status.version} ready`);
726
- emit("provision", "started", `Checking PM2 process "${pm2Name}"...`);
727
- const list = await this.execCommand(`pm2 jlist`);
696
+ const pm2Name = provision.pm2Name;
697
+ const list = await this.execCommand("pm2 jlist");
728
698
  let processExists = false;
729
699
  if (list.success) {
730
700
  try {
@@ -733,107 +703,38 @@ EOF`);
733
703
  } catch {
734
704
  }
735
705
  }
736
- if (!processExists) {
737
- emit("provision", "started", `Creating PM2 process "${pm2Name}"...`);
738
- const eco = generateEcosystemConfig(config);
739
- let startCmd;
740
- if (eco.useNpx) {
741
- const { writeFileSync: wfs, mkdirSync: mks, readFileSync: rfs } = await import("fs");
742
- const amDir = resolve(homedir(), ".agenticmail");
743
- try {
744
- mks(amDir, { recursive: true });
745
- } catch {
746
- }
747
- const slug = config.name.split(/\s+/)[0].toLowerCase().replace(/[^a-z0-9-]/g, "");
748
- const agentEnvFile = resolve(amDir, `.env.${slug}`);
749
- const agentEnvVars = [
750
- `# Auto-generated for agent: ${config.displayName || config.name}`,
751
- `AGENTICMAIL_AGENT_ID=${config.id}`,
752
- `AGENTICMAIL_AGENT_NAME=${config.displayName || config.name}`,
753
- `AGENTICMAIL_MODEL=${config.model?.provider || "anthropic"}/${config.model?.modelId || "claude-sonnet-4-20250514"}`,
754
- `PORT=${config.deployment?.config?.local?.port || 3101}`
755
- ];
756
- if (config.model?.thinkingLevel) agentEnvVars.push(`AGENTICMAIL_THINKING=${config.model.thinkingLevel}`);
757
- const mainEnvFile = resolve(amDir, ".env");
706
+ if (processExists) {
707
+ emit("start", "started", `Stopping existing "${pm2Name}"...`);
708
+ await this.execCommand(`pm2 delete ${pm2Name}`);
709
+ }
710
+ emit("start", "started", `Starting "${pm2Name}" via PM2...`);
711
+ const startResult = await this.execCommand(`pm2 start "${provision.wrapperScript}" --name ${pm2Name}`);
712
+ if (!startResult.success) {
713
+ emit("start", "failed", `PM2 start failed: ${startResult.message}`);
714
+ return { success: false, events: [], error: startResult.message };
715
+ }
716
+ await this.execCommand("pm2 save");
717
+ emit("start", "completed", `PM2 process "${pm2Name}" started`);
718
+ emit("healthcheck", "started", "Waiting for agent to come online...");
719
+ let healthy = false;
720
+ for (let attempt = 0; attempt < 3; attempt++) {
721
+ await new Promise((r) => setTimeout(r, 5e3));
722
+ const status = await this.execCommand("pm2 jlist");
723
+ if (status.success) {
758
724
  try {
759
- const mainEnv = rfs(mainEnvFile, "utf8");
760
- for (const key of ["DATABASE_URL", "JWT_SECRET", "AGENTICMAIL_VAULT_KEY", "ORG_ID", "ENTERPRISE_URL"]) {
761
- const m = mainEnv.match(new RegExp(`^${key}=(.*)$`, "m"));
762
- if (m) agentEnvVars.push(`${key}=${m[1]}`);
725
+ const procs = JSON.parse(status.message);
726
+ const proc = procs.find((p) => p.name === pm2Name);
727
+ if (proc?.pm2_env?.status === "online") {
728
+ healthy = true;
729
+ break;
730
+ }
731
+ if (proc?.pm2_env?.status === "errored" || proc?.pm2_env?.status === "stopped") {
732
+ const logs = await this.execCommand(`pm2 logs ${pm2Name} --nostream --lines 5`);
733
+ emit("healthcheck", "failed", `Process ${proc.pm2_env.status}: ${logs.message?.slice(0, 200) || "check pm2 logs"}`);
734
+ return { success: false, events: [], error: `Agent process ${proc.pm2_env.status}. Check: pm2 logs ${pm2Name}` };
763
735
  }
764
736
  } catch {
765
737
  }
766
- wfs(agentEnvFile, agentEnvVars.join("\n") + "\n");
767
- const wrapperPath = resolve(amDir, `agent-${slug}.cjs`);
768
- const wrapperContent = [
769
- `// Auto-generated agent wrapper \u2014 do not edit`,
770
- `const { readFileSync } = require('fs');`,
771
- `const { join } = require('path');`,
772
- `try {`,
773
- ` const envFile = ${JSON.stringify(agentEnvFile)};`,
774
- ` const lines = readFileSync(envFile, 'utf8').split('\\n');`,
775
- ` for (const line of lines) {`,
776
- ` const m = line.match(/^([A-Z_][A-Z0-9_]*)=(.*)$/);`,
777
- ` if (m) process.env[m[1]] = m[2];`,
778
- ` }`,
779
- `} catch(e) { console.error('Failed to load env:', e.message); }`,
780
- `const { spawnSync } = require('child_process');`,
781
- `const r = spawnSync('npx', ['@agenticmail/enterprise', '${eco.args}'], {`,
782
- ` stdio: 'inherit', env: process.env, shell: process.platform === 'win32'`,
783
- `});`,
784
- `process.exit(r.status || 0);`
785
- ].join("\n");
786
- wfs(wrapperPath, wrapperContent);
787
- emit("provision", "started", `Created agent env (${agentEnvFile}) and wrapper (${wrapperPath})`);
788
- startCmd = ["pm2", "start", wrapperPath, "--name", pm2Name];
789
- } else {
790
- if (!existsSync(eco.script)) {
791
- emit("provision", "failed", `Script not found: ${eco.script}. Run "npm run build" first.`);
792
- return { success: false, events: [], error: `Script not found: ${eco.script}` };
793
- }
794
- const interpreterArgs = eco.envFile ? `--env-file=${eco.envFile}` : "";
795
- startCmd = [
796
- "pm2",
797
- "start",
798
- eco.script,
799
- "--name",
800
- pm2Name,
801
- "--cwd",
802
- eco.cwd,
803
- "--",
804
- eco.args
805
- ];
806
- if (interpreterArgs) {
807
- startCmd.splice(2, 0, "--interpreter-args", `"${interpreterArgs}"`);
808
- }
809
- }
810
- const createResult = await this.execCommand(startCmd.join(" "));
811
- if (!createResult.success) {
812
- emit("provision", "failed", `Failed to create PM2 process: ${createResult.message}`);
813
- return { success: false, events: [], error: createResult.message };
814
- }
815
- await this.execCommand("pm2 save");
816
- emit("provision", "completed", `PM2 process "${pm2Name}" created and saved`);
817
- } else {
818
- emit("provision", "completed", `PM2 process "${pm2Name}" found`);
819
- emit("start", "started", `Restarting ${pm2Name}...`);
820
- const result = await this.execCommand(`pm2 restart ${pm2Name}`);
821
- if (!result.success) {
822
- emit("start", "failed", `PM2 restart failed: ${result.message}`);
823
- return { success: false, events: [], error: result.message };
824
- }
825
- emit("start", "completed", `${pm2Name} restarted`);
826
- }
827
- emit("healthcheck", "started", "Checking process health...");
828
- await new Promise((r) => setTimeout(r, 3e3));
829
- const status = await this.execCommand(`pm2 jlist`);
830
- let healthy = false;
831
- if (status.success) {
832
- try {
833
- const procs = JSON.parse(status.message);
834
- const proc = procs.find((p) => p.name === pm2Name);
835
- healthy = proc?.pm2_env?.status === "online";
836
- } catch {
837
738
  }
838
739
  }
839
740
  if (healthy) {
@@ -356,7 +356,7 @@ function createRuntimeHooks(deps) {
356
356
  var injectedMessages = [...messages];
357
357
  if (deps.knowledgeBaseEnabled !== false) {
358
358
  try {
359
- var { knowledgeBase } = await import("./routes-FPNJY7MF.js");
359
+ var { knowledgeBase } = await import("./routes-OA6Y74YU.js");
360
360
  var kbs = await knowledgeBase.listForAgent(agentId);
361
361
  if (kbs.length > 0) {
362
362
  var contextParts = [];
@@ -389,7 +389,7 @@ ${contextParts.join("\n\n")}`;
389
389
  }
390
390
  if (deps.memoryEnabled !== false) {
391
391
  try {
392
- var { memoryManager } = await import("./routes-FPNJY7MF.js");
392
+ var { memoryManager } = await import("./routes-OA6Y74YU.js");
393
393
  var memories = await memoryManager.queryMemories({
394
394
  agentId,
395
395
  limit: 10,
@@ -410,7 +410,7 @@ ${memories.map(function(m) {
410
410
  }
411
411
  if (deps.policyEnabled !== false) {
412
412
  try {
413
- var { policyEngine } = await import("./routes-FPNJY7MF.js");
413
+ var { policyEngine } = await import("./routes-OA6Y74YU.js");
414
414
  var policies = await policyEngine.getAgentPolicies(agentId, deps.orgId);
415
415
  if (policies.length > 0) {
416
416
  var policyText = policies.map(function(p) {
@@ -435,7 +435,7 @@ ${policyText}`;
435
435
  // ─── Budget Check ──────────────────────────────
436
436
  async checkBudget(agentId, _orgId, _estimatedTokens) {
437
437
  try {
438
- var { lifecycle } = await import("./routes-FPNJY7MF.js");
438
+ var { lifecycle } = await import("./routes-OA6Y74YU.js");
439
439
  var now = Date.now();
440
440
  var cacheKey = `budget_sync_${agentId}`;
441
441
  var lastSync = globalThis[cacheKey] || 0;
@@ -528,7 +528,7 @@ ${policyText}`;
528
528
  // ─── Record LLM Usage ──────────────────────────
529
529
  async recordLLMUsage(agentId, orgId, usage) {
530
530
  try {
531
- var { lifecycle } = await import("./routes-FPNJY7MF.js");
531
+ var { lifecycle } = await import("./routes-OA6Y74YU.js");
532
532
  console.log(`[hooks] recordLLMUsage: agent=${agentId}, input=${usage.inputTokens}, output=${usage.outputTokens}`);
533
533
  await lifecycle.recordLLMUsage(agentId, {
534
534
  inputTokens: usage.inputTokens,
@@ -539,7 +539,7 @@ ${policyText}`;
539
539
  console.log(`[hooks] recordLLMUsage error: ${recordErr.message}`);
540
540
  }
541
541
  try {
542
- var { activity } = await import("./routes-FPNJY7MF.js");
542
+ var { activity } = await import("./routes-OA6Y74YU.js");
543
543
  await activity.record({
544
544
  agentId,
545
545
  orgId,
@@ -587,7 +587,7 @@ ${policyText}`;
587
587
  var cacheKey = `${ctx.agentId}:${ctx.toolName}`;
588
588
  var cached = getCachedPermission(cacheKey);
589
589
  if (cached) return cached;
590
- var { permissionEngine } = await import("./routes-FPNJY7MF.js");
590
+ var { permissionEngine } = await import("./routes-OA6Y74YU.js");
591
591
  var permResult = await permissionEngine.checkPermission(ctx.agentId, ctx.toolName);
592
592
  var result = {
593
593
  allowed: permResult.allowed,
@@ -596,7 +596,7 @@ ${policyText}`;
596
596
  };
597
597
  if (result.allowed && deps.guardrailsEnabled !== false) {
598
598
  try {
599
- var { guardrails } = await import("./routes-FPNJY7MF.js");
599
+ var { guardrails } = await import("./routes-OA6Y74YU.js");
600
600
  var status = await guardrails.getStatus(ctx.agentId);
601
601
  if (status.paused || status.offDuty) {
602
602
  result.allowed = false;
@@ -608,7 +608,7 @@ ${policyText}`;
608
608
  }
609
609
  if (result.allowed && deps.dlpEnabled !== false && ctx.parameters) {
610
610
  try {
611
- var { dlp } = await import("./routes-FPNJY7MF.js");
611
+ var { dlp } = await import("./routes-OA6Y74YU.js");
612
612
  var dlpResult = await dlp.scanParameters({
613
613
  orgId: ctx.orgId,
614
614
  agentId: ctx.agentId,
@@ -628,7 +628,7 @@ ${policyText}`;
628
628
  }
629
629
  if (result.requiresApproval && result.allowed) {
630
630
  try {
631
- var { approvals } = await import("./routes-FPNJY7MF.js");
631
+ var { approvals } = await import("./routes-OA6Y74YU.js");
632
632
  var approval = await approvals.createAndWait({
633
633
  agentId: ctx.agentId,
634
634
  orgId: ctx.orgId,
@@ -658,7 +658,7 @@ ${policyText}`;
658
658
  // ─── After Tool Call ────────────────────────────
659
659
  async afterToolCall(ctx, result) {
660
660
  try {
661
- var { activity } = await import("./routes-FPNJY7MF.js");
661
+ var { activity } = await import("./routes-OA6Y74YU.js");
662
662
  await activity.record({
663
663
  agentId: ctx.agentId,
664
664
  orgId: ctx.orgId,
@@ -675,7 +675,7 @@ ${policyText}`;
675
675
  } catch {
676
676
  }
677
677
  try {
678
- var { lifecycle } = await import("./routes-FPNJY7MF.js");
678
+ var { lifecycle } = await import("./routes-OA6Y74YU.js");
679
679
  await lifecycle.recordToolCall(ctx.agentId, {
680
680
  toolId: ctx.toolName,
681
681
  tokensUsed: 0,
@@ -687,7 +687,7 @@ ${policyText}`;
687
687
  }
688
688
  if (result.success && EXTERNAL_TOOLS.has(ctx.toolName)) {
689
689
  try {
690
- var { journal } = await import("./routes-FPNJY7MF.js");
690
+ var { journal } = await import("./routes-OA6Y74YU.js");
691
691
  await journal.record({
692
692
  orgId: ctx.orgId,
693
693
  agentId: ctx.agentId,
@@ -702,7 +702,7 @@ ${policyText}`;
702
702
  }
703
703
  if (result.success && COMMUNICATION_TOOLS.has(ctx.toolName)) {
704
704
  try {
705
- var { commBus } = await import("./routes-FPNJY7MF.js");
705
+ var { commBus } = await import("./routes-OA6Y74YU.js");
706
706
  await commBus.observeMessage({
707
707
  orgId: ctx.orgId,
708
708
  agentId: ctx.agentId,
@@ -716,7 +716,7 @@ ${policyText}`;
716
716
  // ─── Session Lifecycle ──────────────────────────
717
717
  async onSessionStart(sessionId, agentId, orgId) {
718
718
  try {
719
- var { activity } = await import("./routes-FPNJY7MF.js");
719
+ var { activity } = await import("./routes-OA6Y74YU.js");
720
720
  await activity.record({
721
721
  agentId,
722
722
  orgId,
@@ -729,7 +729,7 @@ ${policyText}`;
729
729
  },
730
730
  async onSessionEnd(sessionId, agentId, orgId) {
731
731
  try {
732
- var { activity } = await import("./routes-FPNJY7MF.js");
732
+ var { activity } = await import("./routes-OA6Y74YU.js");
733
733
  await activity.record({
734
734
  agentId,
735
735
  orgId,
@@ -743,7 +743,7 @@ ${policyText}`;
743
743
  // ─── Context Compaction ─────────────────────────
744
744
  async onContextCompaction(sessionId, agentId, summary) {
745
745
  try {
746
- var { memoryManager } = await import("./routes-FPNJY7MF.js");
746
+ var { memoryManager } = await import("./routes-OA6Y74YU.js");
747
747
  await memoryManager.createMemory({
748
748
  agentId,
749
749
  orgId: deps.orgId,
@@ -2518,7 +2518,7 @@ async function runAgentLoop(config, initialMessages, hooks, options) {
2518
2518
  console.log(`[agent-loop] \u2705 Tool ${toolCall.name} succeeded (${content.length} chars): ${content.slice(0, 300)}`);
2519
2519
  }
2520
2520
  try {
2521
- const { activity } = await import("./routes-FPNJY7MF.js");
2521
+ const { activity } = await import("./routes-OA6Y74YU.js");
2522
2522
  activity.recordToolCallCompact({
2523
2523
  agentId: config.agentId,
2524
2524
  orgId: config.orgId,
@@ -3385,7 +3385,7 @@ function createRequestToolsTool(allTools, activeSets, _context) {
3385
3385
  };
3386
3386
  }
3387
3387
  async function createToolsForContext(options, context, opts) {
3388
- const { createAllTools } = await import("./agent-tools-F3CYENMK.js");
3388
+ const { createAllTools } = await import("./agent-tools-KPMEG6GA.js");
3389
3389
  if (context === "full") {
3390
3390
  return createAllTools(options);
3391
3391
  }
@@ -1,3 +1,7 @@
1
+ import {
2
+ init_agent_tools,
3
+ init_types
4
+ } from "./chunk-3UAFHUEC.js";
1
5
  import {
2
6
  init_messaging_history,
3
7
  storeMessage
@@ -24,10 +28,6 @@ import {
24
28
  init_connection_manager,
25
29
  init_query_sanitizer
26
30
  } from "./chunk-WYDVMFGJ.js";
27
- import {
28
- init_agent_tools,
29
- init_types
30
- } from "./chunk-3UAFHUEC.js";
31
31
  import {
32
32
  BUILTIN_SKILLS,
33
33
  PRESET_PROFILES,
@@ -40,7 +40,7 @@ import {
40
40
  DeploymentEngine,
41
41
  init_agent_config,
42
42
  init_deployer
43
- } from "./chunk-HMTXNZ5P.js";
43
+ } from "./chunk-3IEMACO4.js";
44
44
  import {
45
45
  init_resilience,
46
46
  withRetry
@@ -6847,7 +6847,7 @@ function createAgentRoutes(opts) {
6847
6847
  });
6848
6848
  router.post("/system/install-pm2", async (c) => {
6849
6849
  try {
6850
- const { ensurePm2 } = await import("./deployer-UGWRNS6L.js");
6850
+ const { ensurePm2 } = await import("./deployer-JJYWIRFH.js");
6851
6851
  const result = await ensurePm2();
6852
6852
  if (result.installed) {
6853
6853
  return c.json({ success: true, message: `PM2 ${result.version} installed successfully` });
@@ -7103,7 +7103,7 @@ function createAgentRoutes(opts) {
7103
7103
  }
7104
7104
  const managedAgent = await lifecycle2.createAgent(orgId, config, actor);
7105
7105
  try {
7106
- const { knowledgeBase: kbEngine } = await import("./routes-FPNJY7MF.js");
7106
+ const { knowledgeBase: kbEngine } = await import("./routes-OA6Y74YU.js");
7107
7107
  const allKbs = kbEngine.getAllKnowledgeBases();
7108
7108
  const clientOrgId = managedAgent?.clientOrgId || config?.clientOrgId || null;
7109
7109
  let kbAssigned = 0;
@@ -1234,7 +1234,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1234
1234
  const { deployTarget, company, database, domain, tunnel, cloud } = config;
1235
1235
  if (deployTarget === "cloudflare-tunnel" && tunnel) {
1236
1236
  spinner.start(`Starting local server on port ${tunnel.port}...`);
1237
- const { createServer: createServer2 } = await import("./server-47UUSAA6.js");
1237
+ const { createServer: createServer2 } = await import("./server-Y7MTUIBX.js");
1238
1238
  const server2 = createServer2({ port: tunnel.port, db, jwtSecret });
1239
1239
  const handle2 = await server2.start();
1240
1240
  spinner.succeed("Server running");
@@ -1535,7 +1535,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1535
1535
  return {};
1536
1536
  }
1537
1537
  spinner.start("Starting local server...");
1538
- const { createServer } = await import("./server-47UUSAA6.js");
1538
+ const { createServer } = await import("./server-Y7MTUIBX.js");
1539
1539
  const server = createServer({ port: 3e3, db, jwtSecret });
1540
1540
  const handle = await server.start();
1541
1541
  spinner.succeed("Server running");
@@ -11,7 +11,7 @@ import {
11
11
  init_config_bus,
12
12
  init_routes,
13
13
  routes_exports
14
- } from "./chunk-2L5UZUQ7.js";
14
+ } from "./chunk-6IM6WMM7.js";
15
15
  import {
16
16
  CircuitBreaker,
17
17
  HealthMonitor,
@@ -4661,7 +4661,7 @@ function createServer(config) {
4661
4661
  let engineInitialized = false;
4662
4662
  api.all("/engine/*", async (c, _next) => {
4663
4663
  try {
4664
- const { engineRoutes, setEngineDb } = await import("./routes-FPNJY7MF.js");
4664
+ const { engineRoutes, setEngineDb } = await import("./routes-OA6Y74YU.js");
4665
4665
  const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
4666
4666
  if (!engineInitialized) {
4667
4667
  engineInitialized = true;
@@ -4691,13 +4691,13 @@ function createServer(config) {
4691
4691
  engineInitialized = true;
4692
4692
  if (config.runtime?.enabled) {
4693
4693
  try {
4694
- const { createAgentRuntime } = await import("./runtime-3AT5XRJJ.js");
4695
- const { mountRuntimeApp, setRuntime } = await import("./routes-FPNJY7MF.js");
4694
+ const { createAgentRuntime } = await import("./runtime-ONDAF63W.js");
4695
+ const { mountRuntimeApp, setRuntime } = await import("./routes-OA6Y74YU.js");
4696
4696
  let getEmailConfig;
4697
4697
  let onTokenRefresh;
4698
4698
  let agentMemoryMgr;
4699
4699
  try {
4700
- const { lifecycle: lc, memoryManager: mm } = await import("./routes-FPNJY7MF.js");
4700
+ const { lifecycle: lc, memoryManager: mm } = await import("./routes-OA6Y74YU.js");
4701
4701
  agentMemoryMgr = mm;
4702
4702
  if (lc) {
4703
4703
  getEmailConfig = (agentId) => {
@@ -4736,7 +4736,7 @@ function createServer(config) {
4736
4736
  }
4737
4737
  } catch {
4738
4738
  }
4739
- const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-FPNJY7MF.js");
4739
+ const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-OA6Y74YU.js");
4740
4740
  const runtime = createAgentRuntime({
4741
4741
  engineDb,
4742
4742
  adminDb: config.db,
@@ -4936,7 +4936,7 @@ function createServer(config) {
4936
4936
  });
4937
4937
  (async () => {
4938
4938
  try {
4939
- const { engineRoutes, setEngineDb } = await import("./routes-FPNJY7MF.js");
4939
+ const { engineRoutes, setEngineDb } = await import("./routes-OA6Y74YU.js");
4940
4940
  const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
4941
4941
  if (!engineInitialized) {
4942
4942
  engineInitialized = true;
@@ -4960,13 +4960,13 @@ function createServer(config) {
4960
4960
  await setEngineDb(engineDb, config.db);
4961
4961
  if (config.runtime?.enabled) {
4962
4962
  try {
4963
- const { createAgentRuntime } = await import("./runtime-3AT5XRJJ.js");
4964
- const { mountRuntimeApp, setRuntime } = await import("./routes-FPNJY7MF.js");
4963
+ const { createAgentRuntime } = await import("./runtime-ONDAF63W.js");
4964
+ const { mountRuntimeApp, setRuntime } = await import("./routes-OA6Y74YU.js");
4965
4965
  let getEmailConfig;
4966
4966
  let onTokenRefresh;
4967
4967
  let agentMemoryMgr;
4968
4968
  try {
4969
- const { lifecycle: lc, memoryManager: mm } = await import("./routes-FPNJY7MF.js");
4969
+ const { lifecycle: lc, memoryManager: mm } = await import("./routes-OA6Y74YU.js");
4970
4970
  agentMemoryMgr = mm;
4971
4971
  if (lc) {
4972
4972
  getEmailConfig = (agentId) => {
@@ -5005,7 +5005,7 @@ function createServer(config) {
5005
5005
  }
5006
5006
  } catch {
5007
5007
  }
5008
- const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-FPNJY7MF.js");
5008
+ const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-OA6Y74YU.js");
5009
5009
  const runtime = createAgentRuntime({
5010
5010
  engineDb,
5011
5011
  adminDb: config.db,
@@ -5017,7 +5017,7 @@ function createServer(config) {
5017
5017
  agentMemoryManager: agentMemoryMgr,
5018
5018
  vault: vaultRef2,
5019
5019
  permissionEngine: permRef2,
5020
- hierarchyManager: (await import("./routes-FPNJY7MF.js")).hierarchyManager ?? void 0,
5020
+ hierarchyManager: (await import("./routes-OA6Y74YU.js")).hierarchyManager ?? void 0,
5021
5021
  databaseManager: dbMgr2
5022
5022
  });
5023
5023
  await runtime.start();
@@ -5031,7 +5031,7 @@ function createServer(config) {
5031
5031
  }
5032
5032
  console.log("[engine] Eagerly initialized");
5033
5033
  try {
5034
- const { lifecycle: lcRef } = await import("./routes-FPNJY7MF.js");
5034
+ const { lifecycle: lcRef } = await import("./routes-OA6Y74YU.js");
5035
5035
  if (lcRef) {
5036
5036
  const agents = Array.from(lcRef.agents?.values?.() || []);
5037
5037
  const hasLocalPm2 = agents.some((a) => {
@@ -5040,7 +5040,7 @@ function createServer(config) {
5040
5040
  return target === "local" && (!pm || pm === "pm2");
5041
5041
  });
5042
5042
  if (hasLocalPm2) {
5043
- const { ensurePm2 } = await import("./deployer-UGWRNS6L.js");
5043
+ const { ensurePm2 } = await import("./deployer-JJYWIRFH.js");
5044
5044
  const pm2 = await ensurePm2();
5045
5045
  if (pm2.installed) {
5046
5046
  console.log(`[startup] PM2 v${pm2.version} available for local deployments`);
@@ -762,7 +762,7 @@ async function runAgent(_args) {
762
762
  const agent = agentRow[0];
763
763
  console.log(` Agent: ${agent.display_name || agent.name}`);
764
764
  console.log(` State: ${agent.state}`);
765
- const routes = await import("./routes-FPNJY7MF.js");
765
+ const routes = await import("./routes-OA6Y74YU.js");
766
766
  await routes.lifecycle.setDb(engineDb);
767
767
  await routes.lifecycle.loadFromDb();
768
768
  routes.lifecycle.standaloneMode = true;
@@ -820,10 +820,10 @@ async function runAgent(_args) {
820
820
  }
821
821
  } catch {
822
822
  }
823
- const { createAgentRuntime } = await import("./runtime-3AT5XRJJ.js");
823
+ const { createAgentRuntime } = await import("./runtime-ONDAF63W.js");
824
824
  let orgIntMgr = null;
825
825
  try {
826
- const { orgIntegrations: oi } = await import("./routes-FPNJY7MF.js");
826
+ const { orgIntegrations: oi } = await import("./routes-OA6Y74YU.js");
827
827
  orgIntMgr = oi;
828
828
  } catch {
829
829
  }
@@ -1222,7 +1222,7 @@ Please complete this task now.`,
1222
1222
  }
1223
1223
  if (scope === "all" || scope === "permissions") {
1224
1224
  try {
1225
- const { permissionEngine } = await import("./routes-FPNJY7MF.js");
1225
+ const { permissionEngine } = await import("./routes-OA6Y74YU.js");
1226
1226
  await permissionEngine.setDb(engineDb);
1227
1227
  reloaded.push("permissions");
1228
1228
  } catch {
@@ -1262,7 +1262,7 @@ Please complete this task now.`,
1262
1262
  }
1263
1263
  if (scope === "all" || scope === "guardrails") {
1264
1264
  try {
1265
- const { guardrails } = await import("./routes-FPNJY7MF.js");
1265
+ const { guardrails } = await import("./routes-OA6Y74YU.js");
1266
1266
  await guardrails.loadFromDb?.();
1267
1267
  reloaded.push("guardrails");
1268
1268
  } catch {
@@ -2190,7 +2190,7 @@ Available tools: gmail_send (to, subject, body) or agenticmail_send (to, subject
2190
2190
  console.log("[guardrails] Disabled via autonomy settings");
2191
2191
  }
2192
2192
  try {
2193
- const { AgentHeartbeatManager } = await import("./agent-heartbeat-YTW5OANI.js");
2193
+ const { AgentHeartbeatManager } = await import("./agent-heartbeat-DOMJAVCK.js");
2194
2194
  const hbOrgRows = await engineDb.query(`SELECT org_id FROM managed_agents WHERE id = $1`, [AGENT_ID]);
2195
2195
  const hbOrgId = hbOrgRows?.[0]?.org_id || "";
2196
2196
  const hbManagerEmail = config.managerEmail || (config.manager?.type === "external" ? config.manager.email : null);
@@ -94,7 +94,7 @@ async function runServe(_args) {
94
94
  process.exit(1);
95
95
  }
96
96
  const { createAdapter, smartDbConfig } = await import("./factory-RTZU2K54.js");
97
- const { createServer } = await import("./server-47UUSAA6.js");
97
+ const { createServer } = await import("./server-Y7MTUIBX.js");
98
98
  const db = await createAdapter(smartDbConfig(DATABASE_URL));
99
99
  await db.migrate();
100
100
  const server = createServer({
package/dist/cli.js CHANGED
@@ -57,14 +57,14 @@ Skill Development:
57
57
  break;
58
58
  case "serve":
59
59
  case "start":
60
- import("./cli-serve-BR5PXNTL.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
60
+ import("./cli-serve-RNQ3N477.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
61
61
  break;
62
62
  case "agent":
63
- import("./cli-agent-CQDER7ML.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
63
+ import("./cli-agent-AEG2ZSKO.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
64
64
  break;
65
65
  case "setup":
66
66
  default:
67
- import("./setup-YIVQCWWM.js").then((m) => m.runSetupWizard()).catch(fatal);
67
+ import("./setup-PLIKKNBE.js").then((m) => m.runSetupWizard()).catch(fatal);
68
68
  break;
69
69
  }
70
70
  function fatal(err) {
@@ -2,7 +2,7 @@ import {
2
2
  DeploymentEngine,
3
3
  ensurePm2,
4
4
  init_deployer
5
- } from "./chunk-HMTXNZ5P.js";
5
+ } from "./chunk-3IEMACO4.js";
6
6
  import "./chunk-KFQGP6VL.js";
7
7
  init_deployer();
8
8
  export {
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  provision,
15
15
  runSetupWizard
16
- } from "./chunk-PZK2IOQ3.js";
16
+ } from "./chunk-VQHMGRGD.js";
17
17
  import {
18
18
  AgentRuntime,
19
19
  EmailChannel,
@@ -28,7 +28,7 @@ import {
28
28
  executeTool,
29
29
  runAgentLoop,
30
30
  toolsToDefinitions
31
- } from "./chunk-H7W5YHOZ.js";
31
+ } from "./chunk-5IRAWWEJ.js";
32
32
  import {
33
33
  ValidationError,
34
34
  auditLogger,
@@ -42,7 +42,7 @@ import {
42
42
  requireRole,
43
43
  securityHeaders,
44
44
  validate
45
- } from "./chunk-LXIMVAED.js";
45
+ } from "./chunk-XI6E3OBF.js";
46
46
  import "./chunk-DJBCRQTD.js";
47
47
  import {
48
48
  PROVIDER_REGISTRY,
@@ -82,7 +82,8 @@ import {
82
82
  init_storage_manager,
83
83
  init_tenant,
84
84
  init_workforce
85
- } from "./chunk-2L5UZUQ7.js";
85
+ } from "./chunk-6IM6WMM7.js";
86
+ import "./chunk-3UAFHUEC.js";
86
87
  import {
87
88
  ENGINE_TABLES,
88
89
  ENGINE_TABLES_POSTGRES,
@@ -103,7 +104,6 @@ import "./chunk-74ZCQKYU.js";
103
104
  import "./chunk-Z6K5FKAB.js";
104
105
  import "./chunk-C6JP5NR6.js";
105
106
  import "./chunk-WYDVMFGJ.js";
106
- import "./chunk-3UAFHUEC.js";
107
107
  import {
108
108
  BUILTIN_SKILLS,
109
109
  PRESET_PROFILES,
@@ -115,7 +115,7 @@ import {
115
115
  DeploymentEngine,
116
116
  init_agent_config,
117
117
  init_deployer
118
- } from "./chunk-HMTXNZ5P.js";
118
+ } from "./chunk-3IEMACO4.js";
119
119
  import {
120
120
  CircuitBreaker,
121
121
  CircuitOpenError,
@@ -35,7 +35,8 @@ import {
35
35
  tenants,
36
36
  vault,
37
37
  workforce
38
- } from "./chunk-2L5UZUQ7.js";
38
+ } from "./chunk-6IM6WMM7.js";
39
+ import "./chunk-3UAFHUEC.js";
39
40
  import "./chunk-Z7NVD3OQ.js";
40
41
  import "./chunk-VSBC4SWO.js";
41
42
  import "./chunk-AF3WSNVX.js";
@@ -43,9 +44,8 @@ import "./chunk-74ZCQKYU.js";
43
44
  import "./chunk-Z6K5FKAB.js";
44
45
  import "./chunk-C6JP5NR6.js";
45
46
  import "./chunk-WYDVMFGJ.js";
46
- import "./chunk-3UAFHUEC.js";
47
47
  import "./chunk-NOAQG5CY.js";
48
- import "./chunk-HMTXNZ5P.js";
48
+ import "./chunk-3IEMACO4.js";
49
49
  import "./chunk-YDD5TC5Q.js";
50
50
  import "./chunk-FLQ5FLHW.js";
51
51
  import "./chunk-WUAWWKTN.js";
@@ -14,7 +14,7 @@ import {
14
14
  executeTool,
15
15
  runAgentLoop,
16
16
  toolsToDefinitions
17
- } from "./chunk-H7W5YHOZ.js";
17
+ } from "./chunk-5IRAWWEJ.js";
18
18
  import {
19
19
  PROVIDER_REGISTRY,
20
20
  listAllProviders,
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-LXIMVAED.js";
3
+ } from "./chunk-XI6E3OBF.js";
4
4
  import "./chunk-DJBCRQTD.js";
5
5
  import "./chunk-UF3ZJMJO.js";
6
- import "./chunk-2L5UZUQ7.js";
6
+ import "./chunk-6IM6WMM7.js";
7
+ import "./chunk-3UAFHUEC.js";
7
8
  import "./chunk-Z7NVD3OQ.js";
8
9
  import "./chunk-VSBC4SWO.js";
9
10
  import "./chunk-AF3WSNVX.js";
@@ -11,9 +12,8 @@ import "./chunk-74ZCQKYU.js";
11
12
  import "./chunk-Z6K5FKAB.js";
12
13
  import "./chunk-C6JP5NR6.js";
13
14
  import "./chunk-WYDVMFGJ.js";
14
- import "./chunk-3UAFHUEC.js";
15
15
  import "./chunk-NOAQG5CY.js";
16
- import "./chunk-HMTXNZ5P.js";
16
+ import "./chunk-3IEMACO4.js";
17
17
  import "./chunk-YDD5TC5Q.js";
18
18
  import "./chunk-37ABTUFU.js";
19
19
  import "./chunk-NU657BBQ.js";
@@ -6,7 +6,7 @@ import {
6
6
  promptRegistration,
7
7
  provision,
8
8
  runSetupWizard
9
- } from "./chunk-PZK2IOQ3.js";
9
+ } from "./chunk-VQHMGRGD.js";
10
10
  import "./chunk-Z3I6GNTS.js";
11
11
  import "./chunk-KFQGP6VL.js";
12
12
  export {
@@ -137,3 +137,7 @@
137
137
  2026-03-05 18:05:38: 2026-03-05T17:05:38Z ERR error="stream 9 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
138
138
  2026-03-05 18:05:38: 2026-03-05T17:05:38Z ERR Request failed error="stream 5 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=3eecd57d-03ae-440d-8945-5b35f43a8d90 event=0 ip=198.41.192.107 type=http
139
139
  2026-03-05 18:05:38: 2026-03-05T17:05:38Z ERR Request failed error="stream 9 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream?agentId=3eecd57d-03ae-440d-8945-5b35f43a8d90 event=0 ip=198.41.192.107 type=http
140
+ 2026-03-05 19:22:34: 2026-03-05T18:22:34Z ERR error="stream 365 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
141
+ 2026-03-05 19:22:34: 2026-03-05T18:22:34Z ERR Request failed error="stream 365 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/agent-status-stream event=0 ip=198.41.192.107 type=http
142
+ 2026-03-05 19:23:02: 2026-03-05T18:23:02Z ERR error="stream 357 canceled by remote with error code 0" connIndex=0 event=1 ingressRule=0 originService=http://localhost:3100
143
+ 2026-03-05 19:23:02: 2026-03-05T18:23:02Z ERR Request failed error="stream 357 canceled by remote with error code 0" connIndex=0 dest=https://enterprise.agenticmail.io/api/engine/cluster/stream event=0 ip=198.41.192.107 type=http
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.351",
3
+ "version": "0.5.353",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,6 +19,12 @@ import {
19
19
  wrapExternalContent,
20
20
  wrapWebContent
21
21
  } from "./chunk-ZB3VC2MR.js";
22
+ import {
23
+ detectCapabilities,
24
+ getCapabilitySummary,
25
+ init_environment,
26
+ resetCapabilitiesCache
27
+ } from "./chunk-KQWP5AE7.js";
22
28
  import {
23
29
  createTelegramTools,
24
30
  init_telegram
@@ -27,12 +33,6 @@ import {
27
33
  createWhatsAppTools,
28
34
  init_whatsapp
29
35
  } from "./chunk-P7UOSFIE.js";
30
- import {
31
- detectCapabilities,
32
- getCapabilitySummary,
33
- init_environment,
34
- resetCapabilitiesCache
35
- } from "./chunk-KQWP5AE7.js";
36
36
  import {
37
37
  MemorySearchIndex,
38
38
  init_text_search