@agenticmail/enterprise 0.5.401 → 0.5.403
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/{agent-heartbeat-LAWETDFL.js → agent-heartbeat-2P2LGVJA.js} +1 -1
- package/dist/{chunk-VWEYO2YP.js → chunk-3JIZOJPH.js} +13 -13
- package/dist/{chunk-VXX6CTZ2.js → chunk-LO5LOW2A.js} +19 -19
- package/dist/{chunk-3TFN5A7B.js → chunk-RK5UYRKG.js} +2 -2
- package/dist/{chunk-Z6K5FKAB.js → chunk-ZNLABJCS.js} +15 -1
- package/dist/{chunk-IIAY4DXV.js → chunk-ZZQWXIAX.js} +2 -2
- package/dist/{cli-agent-M2E24J3V.js → cli-agent-FKL5HTLS.js} +7 -7
- package/dist/cli-build-skill-ZTT3TXNU.js +1483 -0
- package/dist/{cli-serve-SZ5FUFGN.js → cli-serve-2ZI3K57V.js} +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.js +5 -5
- package/dist/{routes-EEUWXTHX.js → routes-UIUIEZKQ.js} +2 -2
- package/dist/{runtime-DS4SWATW.js → runtime-NOZFX4PB.js} +1 -1
- package/dist/{server-S4564LJA.js → server-2V62CIPS.js} +3 -3
- package/dist/{setup-6SPPY2QZ.js → setup-XUQEEZJV.js} +1 -1
- package/dist/{task-queue-O7IVZYUO.js → task-queue-Y2ERCCRY.js} +1 -1
- package/logs/cloudflared-error.log +14 -0
- package/logs/john-error.log +1 -0
- package/package.json +1 -1
|
@@ -466,7 +466,7 @@ var AgentHeartbeatManager = class {
|
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
468
|
try {
|
|
469
|
-
const { guardrails } = await import("./routes-
|
|
469
|
+
const { guardrails } = await import("./routes-UIUIEZKQ.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"}`);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
init_config_bus,
|
|
12
12
|
init_routes,
|
|
13
13
|
routes_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZZQWXIAX.js";
|
|
15
15
|
import {
|
|
16
16
|
SecureVault,
|
|
17
17
|
init_vault
|
|
@@ -4683,7 +4683,7 @@ function createServer(config) {
|
|
|
4683
4683
|
let engineInitialized = false;
|
|
4684
4684
|
api.all("/engine/*", async (c, _next) => {
|
|
4685
4685
|
try {
|
|
4686
|
-
const { engineRoutes, setEngineDb } = await import("./routes-
|
|
4686
|
+
const { engineRoutes, setEngineDb } = await import("./routes-UIUIEZKQ.js");
|
|
4687
4687
|
const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
|
|
4688
4688
|
if (!engineInitialized) {
|
|
4689
4689
|
engineInitialized = true;
|
|
@@ -4713,13 +4713,13 @@ function createServer(config) {
|
|
|
4713
4713
|
engineInitialized = true;
|
|
4714
4714
|
if (config.runtime?.enabled) {
|
|
4715
4715
|
try {
|
|
4716
|
-
const { createAgentRuntime } = await import("./runtime-
|
|
4717
|
-
const { mountRuntimeApp, setRuntime } = await import("./routes-
|
|
4716
|
+
const { createAgentRuntime } = await import("./runtime-NOZFX4PB.js");
|
|
4717
|
+
const { mountRuntimeApp, setRuntime } = await import("./routes-UIUIEZKQ.js");
|
|
4718
4718
|
let getEmailConfig;
|
|
4719
4719
|
let onTokenRefresh;
|
|
4720
4720
|
let agentMemoryMgr;
|
|
4721
4721
|
try {
|
|
4722
|
-
const { lifecycle: lc, memoryManager: mm } = await import("./routes-
|
|
4722
|
+
const { lifecycle: lc, memoryManager: mm } = await import("./routes-UIUIEZKQ.js");
|
|
4723
4723
|
agentMemoryMgr = mm;
|
|
4724
4724
|
if (lc) {
|
|
4725
4725
|
getEmailConfig = (agentId) => {
|
|
@@ -4758,7 +4758,7 @@ function createServer(config) {
|
|
|
4758
4758
|
}
|
|
4759
4759
|
} catch {
|
|
4760
4760
|
}
|
|
4761
|
-
const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-
|
|
4761
|
+
const { vault: vaultRef, permissionEngine: permRef, databaseManager: dbMgr } = await import("./routes-UIUIEZKQ.js");
|
|
4762
4762
|
const runtime = createAgentRuntime({
|
|
4763
4763
|
engineDb,
|
|
4764
4764
|
adminDb: config.db,
|
|
@@ -5009,7 +5009,7 @@ function createServer(config) {
|
|
|
5009
5009
|
});
|
|
5010
5010
|
(async () => {
|
|
5011
5011
|
try {
|
|
5012
|
-
const { engineRoutes, setEngineDb } = await import("./routes-
|
|
5012
|
+
const { engineRoutes, setEngineDb } = await import("./routes-UIUIEZKQ.js");
|
|
5013
5013
|
const { EngineDatabase } = await import("./db-adapter-2T56ORSD.js");
|
|
5014
5014
|
if (!engineInitialized) {
|
|
5015
5015
|
engineInitialized = true;
|
|
@@ -5033,13 +5033,13 @@ function createServer(config) {
|
|
|
5033
5033
|
await setEngineDb(engineDb, config.db);
|
|
5034
5034
|
if (config.runtime?.enabled) {
|
|
5035
5035
|
try {
|
|
5036
|
-
const { createAgentRuntime } = await import("./runtime-
|
|
5037
|
-
const { mountRuntimeApp, setRuntime } = await import("./routes-
|
|
5036
|
+
const { createAgentRuntime } = await import("./runtime-NOZFX4PB.js");
|
|
5037
|
+
const { mountRuntimeApp, setRuntime } = await import("./routes-UIUIEZKQ.js");
|
|
5038
5038
|
let getEmailConfig;
|
|
5039
5039
|
let onTokenRefresh;
|
|
5040
5040
|
let agentMemoryMgr;
|
|
5041
5041
|
try {
|
|
5042
|
-
const { lifecycle: lc, memoryManager: mm } = await import("./routes-
|
|
5042
|
+
const { lifecycle: lc, memoryManager: mm } = await import("./routes-UIUIEZKQ.js");
|
|
5043
5043
|
agentMemoryMgr = mm;
|
|
5044
5044
|
if (lc) {
|
|
5045
5045
|
getEmailConfig = (agentId) => {
|
|
@@ -5078,7 +5078,7 @@ function createServer(config) {
|
|
|
5078
5078
|
}
|
|
5079
5079
|
} catch {
|
|
5080
5080
|
}
|
|
5081
|
-
const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-
|
|
5081
|
+
const { vault: vaultRef2, permissionEngine: permRef2, databaseManager: dbMgr2 } = await import("./routes-UIUIEZKQ.js");
|
|
5082
5082
|
const runtime = createAgentRuntime({
|
|
5083
5083
|
engineDb,
|
|
5084
5084
|
adminDb: config.db,
|
|
@@ -5090,7 +5090,7 @@ function createServer(config) {
|
|
|
5090
5090
|
agentMemoryManager: agentMemoryMgr,
|
|
5091
5091
|
vault: vaultRef2,
|
|
5092
5092
|
permissionEngine: permRef2,
|
|
5093
|
-
hierarchyManager: (await import("./routes-
|
|
5093
|
+
hierarchyManager: (await import("./routes-UIUIEZKQ.js")).hierarchyManager ?? void 0,
|
|
5094
5094
|
databaseManager: dbMgr2
|
|
5095
5095
|
});
|
|
5096
5096
|
await runtime.start();
|
|
@@ -5104,7 +5104,7 @@ function createServer(config) {
|
|
|
5104
5104
|
}
|
|
5105
5105
|
console.log("[engine] Eagerly initialized");
|
|
5106
5106
|
try {
|
|
5107
|
-
const { lifecycle: lcRef } = await import("./routes-
|
|
5107
|
+
const { lifecycle: lcRef } = await import("./routes-UIUIEZKQ.js");
|
|
5108
5108
|
if (lcRef) {
|
|
5109
5109
|
const agents = Array.from(lcRef.agents?.values?.() || []);
|
|
5110
5110
|
const hasLocalPm2 = agents.some((a) => {
|
|
@@ -359,7 +359,7 @@ function createRuntimeHooks(deps) {
|
|
|
359
359
|
var injectedMessages = [...messages];
|
|
360
360
|
if (deps.knowledgeBaseEnabled !== false) {
|
|
361
361
|
try {
|
|
362
|
-
var { knowledgeBase } = await import("./routes-
|
|
362
|
+
var { knowledgeBase } = await import("./routes-UIUIEZKQ.js");
|
|
363
363
|
var kbs = await knowledgeBase.listForAgent(agentId);
|
|
364
364
|
if (kbs.length > 0) {
|
|
365
365
|
var contextParts = [];
|
|
@@ -392,7 +392,7 @@ ${contextParts.join("\n\n")}`;
|
|
|
392
392
|
}
|
|
393
393
|
if (deps.memoryEnabled !== false) {
|
|
394
394
|
try {
|
|
395
|
-
var { memoryManager } = await import("./routes-
|
|
395
|
+
var { memoryManager } = await import("./routes-UIUIEZKQ.js");
|
|
396
396
|
var memories = await memoryManager.queryMemories({
|
|
397
397
|
agentId,
|
|
398
398
|
limit: 10,
|
|
@@ -413,7 +413,7 @@ ${memories.map(function(m) {
|
|
|
413
413
|
}
|
|
414
414
|
if (deps.policyEnabled !== false) {
|
|
415
415
|
try {
|
|
416
|
-
var { policyEngine } = await import("./routes-
|
|
416
|
+
var { policyEngine } = await import("./routes-UIUIEZKQ.js");
|
|
417
417
|
var policies = await policyEngine.getAgentPolicies(agentId, deps.orgId);
|
|
418
418
|
if (policies.length > 0) {
|
|
419
419
|
var policyText = policies.map(function(p) {
|
|
@@ -438,7 +438,7 @@ ${policyText}`;
|
|
|
438
438
|
// ─── Budget Check ──────────────────────────────
|
|
439
439
|
async checkBudget(agentId, _orgId, _estimatedTokens) {
|
|
440
440
|
try {
|
|
441
|
-
var { lifecycle } = await import("./routes-
|
|
441
|
+
var { lifecycle } = await import("./routes-UIUIEZKQ.js");
|
|
442
442
|
var now = Date.now();
|
|
443
443
|
var cacheKey = `budget_sync_${agentId}`;
|
|
444
444
|
var lastSync = globalThis[cacheKey] || 0;
|
|
@@ -531,7 +531,7 @@ ${policyText}`;
|
|
|
531
531
|
// ─── Record LLM Usage ──────────────────────────
|
|
532
532
|
async recordLLMUsage(agentId, orgId, usage) {
|
|
533
533
|
try {
|
|
534
|
-
var { lifecycle } = await import("./routes-
|
|
534
|
+
var { lifecycle } = await import("./routes-UIUIEZKQ.js");
|
|
535
535
|
console.log(`[hooks] recordLLMUsage: agent=${agentId}, input=${usage.inputTokens}, output=${usage.outputTokens}`);
|
|
536
536
|
await lifecycle.recordLLMUsage(agentId, {
|
|
537
537
|
inputTokens: usage.inputTokens,
|
|
@@ -542,7 +542,7 @@ ${policyText}`;
|
|
|
542
542
|
console.log(`[hooks] recordLLMUsage error: ${recordErr.message}`);
|
|
543
543
|
}
|
|
544
544
|
try {
|
|
545
|
-
var { activity } = await import("./routes-
|
|
545
|
+
var { activity } = await import("./routes-UIUIEZKQ.js");
|
|
546
546
|
await activity.record({
|
|
547
547
|
agentId,
|
|
548
548
|
orgId,
|
|
@@ -590,7 +590,7 @@ ${policyText}`;
|
|
|
590
590
|
var cacheKey = `${ctx.agentId}:${ctx.toolName}`;
|
|
591
591
|
var cached = getCachedPermission(cacheKey);
|
|
592
592
|
if (cached) return cached;
|
|
593
|
-
var { permissionEngine } = await import("./routes-
|
|
593
|
+
var { permissionEngine } = await import("./routes-UIUIEZKQ.js");
|
|
594
594
|
var permResult = await permissionEngine.checkPermission(ctx.agentId, ctx.toolName);
|
|
595
595
|
var result = {
|
|
596
596
|
allowed: permResult.allowed,
|
|
@@ -599,7 +599,7 @@ ${policyText}`;
|
|
|
599
599
|
};
|
|
600
600
|
if (result.allowed && deps.guardrailsEnabled !== false) {
|
|
601
601
|
try {
|
|
602
|
-
var { guardrails } = await import("./routes-
|
|
602
|
+
var { guardrails } = await import("./routes-UIUIEZKQ.js");
|
|
603
603
|
var status = await guardrails.getStatus(ctx.agentId);
|
|
604
604
|
if (status.paused || status.offDuty) {
|
|
605
605
|
result.allowed = false;
|
|
@@ -611,7 +611,7 @@ ${policyText}`;
|
|
|
611
611
|
}
|
|
612
612
|
if (result.allowed && deps.dlpEnabled !== false && ctx.parameters) {
|
|
613
613
|
try {
|
|
614
|
-
var { dlp } = await import("./routes-
|
|
614
|
+
var { dlp } = await import("./routes-UIUIEZKQ.js");
|
|
615
615
|
var dlpResult = await dlp.scanParameters({
|
|
616
616
|
orgId: ctx.orgId,
|
|
617
617
|
agentId: ctx.agentId,
|
|
@@ -631,7 +631,7 @@ ${policyText}`;
|
|
|
631
631
|
}
|
|
632
632
|
if (result.requiresApproval && result.allowed) {
|
|
633
633
|
try {
|
|
634
|
-
var { approvals } = await import("./routes-
|
|
634
|
+
var { approvals } = await import("./routes-UIUIEZKQ.js");
|
|
635
635
|
var approval = await approvals.createAndWait({
|
|
636
636
|
agentId: ctx.agentId,
|
|
637
637
|
orgId: ctx.orgId,
|
|
@@ -661,7 +661,7 @@ ${policyText}`;
|
|
|
661
661
|
// ─── After Tool Call ────────────────────────────
|
|
662
662
|
async afterToolCall(ctx, result) {
|
|
663
663
|
try {
|
|
664
|
-
var { activity } = await import("./routes-
|
|
664
|
+
var { activity } = await import("./routes-UIUIEZKQ.js");
|
|
665
665
|
await activity.record({
|
|
666
666
|
agentId: ctx.agentId,
|
|
667
667
|
orgId: ctx.orgId,
|
|
@@ -678,7 +678,7 @@ ${policyText}`;
|
|
|
678
678
|
} catch {
|
|
679
679
|
}
|
|
680
680
|
try {
|
|
681
|
-
var { lifecycle } = await import("./routes-
|
|
681
|
+
var { lifecycle } = await import("./routes-UIUIEZKQ.js");
|
|
682
682
|
await lifecycle.recordToolCall(ctx.agentId, {
|
|
683
683
|
toolId: ctx.toolName,
|
|
684
684
|
tokensUsed: 0,
|
|
@@ -690,7 +690,7 @@ ${policyText}`;
|
|
|
690
690
|
}
|
|
691
691
|
if (result.success && EXTERNAL_TOOLS.has(ctx.toolName)) {
|
|
692
692
|
try {
|
|
693
|
-
var { journal } = await import("./routes-
|
|
693
|
+
var { journal } = await import("./routes-UIUIEZKQ.js");
|
|
694
694
|
await journal.record({
|
|
695
695
|
orgId: ctx.orgId,
|
|
696
696
|
agentId: ctx.agentId,
|
|
@@ -705,7 +705,7 @@ ${policyText}`;
|
|
|
705
705
|
}
|
|
706
706
|
if (result.success && COMMUNICATION_TOOLS.has(ctx.toolName)) {
|
|
707
707
|
try {
|
|
708
|
-
var { commBus } = await import("./routes-
|
|
708
|
+
var { commBus } = await import("./routes-UIUIEZKQ.js");
|
|
709
709
|
await commBus.observeMessage({
|
|
710
710
|
orgId: ctx.orgId,
|
|
711
711
|
agentId: ctx.agentId,
|
|
@@ -719,7 +719,7 @@ ${policyText}`;
|
|
|
719
719
|
// ─── Session Lifecycle ──────────────────────────
|
|
720
720
|
async onSessionStart(sessionId, agentId, orgId) {
|
|
721
721
|
try {
|
|
722
|
-
var { activity } = await import("./routes-
|
|
722
|
+
var { activity } = await import("./routes-UIUIEZKQ.js");
|
|
723
723
|
await activity.record({
|
|
724
724
|
agentId,
|
|
725
725
|
orgId,
|
|
@@ -732,7 +732,7 @@ ${policyText}`;
|
|
|
732
732
|
},
|
|
733
733
|
async onSessionEnd(sessionId, agentId, orgId) {
|
|
734
734
|
try {
|
|
735
|
-
var { activity } = await import("./routes-
|
|
735
|
+
var { activity } = await import("./routes-UIUIEZKQ.js");
|
|
736
736
|
await activity.record({
|
|
737
737
|
agentId,
|
|
738
738
|
orgId,
|
|
@@ -746,7 +746,7 @@ ${policyText}`;
|
|
|
746
746
|
// ─── Context Compaction ─────────────────────────
|
|
747
747
|
async onContextCompaction(sessionId, agentId, summary) {
|
|
748
748
|
try {
|
|
749
|
-
var { memoryManager } = await import("./routes-
|
|
749
|
+
var { memoryManager } = await import("./routes-UIUIEZKQ.js");
|
|
750
750
|
await memoryManager.createMemory({
|
|
751
751
|
agentId,
|
|
752
752
|
orgId: deps.orgId,
|
|
@@ -762,7 +762,7 @@ ${policyText}`;
|
|
|
762
762
|
console.warn(`[hooks] Failed to persist compaction summary: ${err?.message}`);
|
|
763
763
|
}
|
|
764
764
|
try {
|
|
765
|
-
var { TaskQueueManager } = await import("./task-queue-
|
|
765
|
+
var { TaskQueueManager } = await import("./task-queue-Y2ERCCRY.js");
|
|
766
766
|
var tq = new TaskQueueManager();
|
|
767
767
|
tq.db = deps.engineDb;
|
|
768
768
|
await tq.init();
|
|
@@ -2521,7 +2521,7 @@ async function runAgentLoop(config, initialMessages, hooks, options) {
|
|
|
2521
2521
|
console.log(`[agent-loop] \u2705 Tool ${toolCall.name} succeeded (${content.length} chars): ${content.slice(0, 300)}`);
|
|
2522
2522
|
}
|
|
2523
2523
|
try {
|
|
2524
|
-
const { activity } = await import("./routes-
|
|
2524
|
+
const { activity } = await import("./routes-UIUIEZKQ.js");
|
|
2525
2525
|
activity.recordToolCallCompact({
|
|
2526
2526
|
agentId: config.agentId,
|
|
2527
2527
|
orgId: config.orgId,
|
|
@@ -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-
|
|
1237
|
+
const { createServer: createServer2 } = await import("./server-2V62CIPS.js");
|
|
1238
1238
|
const server2 = createServer2({ port: tunnel.port, db, jwtSecret });
|
|
1239
1239
|
const handle2 = await server2.start();
|
|
1240
1240
|
spinner.succeed("Server running");
|
|
@@ -1536,7 +1536,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
|
|
|
1536
1536
|
return {};
|
|
1537
1537
|
}
|
|
1538
1538
|
spinner.start("Starting local server...");
|
|
1539
|
-
const { createServer } = await import("./server-
|
|
1539
|
+
const { createServer } = await import("./server-2V62CIPS.js");
|
|
1540
1540
|
const server = createServer({ port: 3e3, db, jwtSecret });
|
|
1541
1541
|
const handle = await server.start();
|
|
1542
1542
|
spinner.succeed("Server running");
|
|
@@ -110,6 +110,7 @@ var init_task_queue = __esm({
|
|
|
110
110
|
* Sync active tasks from database into memory.
|
|
111
111
|
* Called by the task poller before each cycle to catch externally-added or reset tasks.
|
|
112
112
|
*/
|
|
113
|
+
_startTime = Date.now();
|
|
113
114
|
async syncFromDb() {
|
|
114
115
|
if (!this.db) return;
|
|
115
116
|
try {
|
|
@@ -117,11 +118,23 @@ var init_task_queue = __esm({
|
|
|
117
118
|
`SELECT * FROM task_pipeline WHERE status IN ('created','assigned','in_progress') ORDER BY created_at DESC LIMIT 200`
|
|
118
119
|
);
|
|
119
120
|
if (!rows) return;
|
|
120
|
-
let added = 0;
|
|
121
|
+
let added = 0, skippedPreRestart = 0;
|
|
121
122
|
for (const row of rows) {
|
|
122
123
|
const existing = this.tasks.get(row.id);
|
|
123
124
|
const dbTask = this.rowToTask(row);
|
|
124
125
|
if (!existing) {
|
|
126
|
+
const createdMs = new Date(dbTask.createdAt).getTime();
|
|
127
|
+
if (createdMs < this._startTime - 6e4) {
|
|
128
|
+
try {
|
|
129
|
+
await this.db.run(
|
|
130
|
+
`UPDATE task_pipeline SET status = 'failed', error = 'Process restarted \u2014 task was not completed before restart' WHERE id = ?`,
|
|
131
|
+
[row.id]
|
|
132
|
+
);
|
|
133
|
+
} catch {
|
|
134
|
+
}
|
|
135
|
+
skippedPreRestart++;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
125
138
|
this.tasks.set(row.id, dbTask);
|
|
126
139
|
added++;
|
|
127
140
|
} else if (existing.status !== dbTask.status || existing.sessionId !== dbTask.sessionId) {
|
|
@@ -129,6 +142,7 @@ var init_task_queue = __esm({
|
|
|
129
142
|
}
|
|
130
143
|
}
|
|
131
144
|
if (added > 0) console.log(`[TaskQueue] syncFromDb: added ${added} tasks from DB`);
|
|
145
|
+
if (skippedPreRestart > 0) console.log(`[TaskQueue] syncFromDb: auto-failed ${skippedPreRestart} pre-restart tasks`);
|
|
132
146
|
} catch (e) {
|
|
133
147
|
console.error("[TaskQueue] syncFromDb error:", e.message);
|
|
134
148
|
}
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
TaskQueueManager,
|
|
31
31
|
init_task_queue
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZNLABJCS.js";
|
|
33
33
|
import {
|
|
34
34
|
AgentStatusTracker,
|
|
35
35
|
init_agent_status
|
|
@@ -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-
|
|
7106
|
+
const { knowledgeBase: kbEngine } = await import("./routes-UIUIEZKQ.js");
|
|
7107
7107
|
const allKbs = kbEngine.getAllKnowledgeBases();
|
|
7108
7108
|
const clientOrgId = managedAgent?.clientOrgId || config?.clientOrgId || null;
|
|
7109
7109
|
let kbAssigned = 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TaskQueueManager,
|
|
3
3
|
init_task_queue
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZNLABJCS.js";
|
|
5
5
|
import "./chunk-KFQGP6VL.js";
|
|
6
6
|
|
|
7
7
|
// src/cli-agent.ts
|
|
@@ -776,7 +776,7 @@ async function runAgent(_args) {
|
|
|
776
776
|
const agent = agentRow[0];
|
|
777
777
|
console.log(` Agent: ${agent.display_name || agent.name}`);
|
|
778
778
|
console.log(` State: ${agent.state}`);
|
|
779
|
-
const routes = await import("./routes-
|
|
779
|
+
const routes = await import("./routes-UIUIEZKQ.js");
|
|
780
780
|
await routes.lifecycle.setDb(engineDb);
|
|
781
781
|
await routes.lifecycle.loadFromDb();
|
|
782
782
|
routes.lifecycle.standaloneMode = true;
|
|
@@ -834,10 +834,10 @@ async function runAgent(_args) {
|
|
|
834
834
|
}
|
|
835
835
|
} catch {
|
|
836
836
|
}
|
|
837
|
-
const { createAgentRuntime } = await import("./runtime-
|
|
837
|
+
const { createAgentRuntime } = await import("./runtime-NOZFX4PB.js");
|
|
838
838
|
let orgIntMgr = null;
|
|
839
839
|
try {
|
|
840
|
-
const { orgIntegrations: oi } = await import("./routes-
|
|
840
|
+
const { orgIntegrations: oi } = await import("./routes-UIUIEZKQ.js");
|
|
841
841
|
orgIntMgr = oi;
|
|
842
842
|
} catch {
|
|
843
843
|
}
|
|
@@ -1236,7 +1236,7 @@ Please complete this task now.`,
|
|
|
1236
1236
|
}
|
|
1237
1237
|
if (scope === "all" || scope === "permissions") {
|
|
1238
1238
|
try {
|
|
1239
|
-
const { permissionEngine } = await import("./routes-
|
|
1239
|
+
const { permissionEngine } = await import("./routes-UIUIEZKQ.js");
|
|
1240
1240
|
await permissionEngine.setDb(engineDb);
|
|
1241
1241
|
reloaded.push("permissions");
|
|
1242
1242
|
} catch {
|
|
@@ -1276,7 +1276,7 @@ Please complete this task now.`,
|
|
|
1276
1276
|
}
|
|
1277
1277
|
if (scope === "all" || scope === "guardrails") {
|
|
1278
1278
|
try {
|
|
1279
|
-
const { guardrails } = await import("./routes-
|
|
1279
|
+
const { guardrails } = await import("./routes-UIUIEZKQ.js");
|
|
1280
1280
|
await guardrails.loadFromDb?.();
|
|
1281
1281
|
reloaded.push("guardrails");
|
|
1282
1282
|
} catch {
|
|
@@ -2216,7 +2216,7 @@ Available tools: ${providerType === "imap" ? "email_send (to, subject, body)" :
|
|
|
2216
2216
|
console.log("[guardrails] Disabled via autonomy settings");
|
|
2217
2217
|
}
|
|
2218
2218
|
try {
|
|
2219
|
-
const { AgentHeartbeatManager } = await import("./agent-heartbeat-
|
|
2219
|
+
const { AgentHeartbeatManager } = await import("./agent-heartbeat-2P2LGVJA.js");
|
|
2220
2220
|
const hbOrgRows = await engineDb.query(`SELECT org_id FROM managed_agents WHERE id = $1`, [AGENT_ID]);
|
|
2221
2221
|
const hbOrgId = hbOrgRows?.[0]?.org_id || "";
|
|
2222
2222
|
const hbManagerEmail = config.managerEmail || (config.manager?.type === "external" ? config.manager.email : null);
|