@agenticmail/enterprise 0.5.160 → 0.5.162
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-memory-SKXFRT3G.js +10 -0
- package/dist/agent-memory-THPQOED2.js +10 -0
- package/dist/chunk-5BNEWSIW.js +16421 -0
- package/dist/chunk-AJHHR4YN.js +573 -0
- package/dist/chunk-DH5KEO76.js +898 -0
- package/dist/chunk-EYR7ODKB.js +577 -0
- package/dist/chunk-I4U36SLL.js +16421 -0
- package/dist/chunk-JHOLP2JO.js +2195 -0
- package/dist/chunk-KFEFITDX.js +2195 -0
- package/dist/chunk-RXW67YOT.js +898 -0
- package/dist/cli-agent-MBPQJIWE.js +873 -0
- package/dist/cli-agent-TNLWMEER.js +873 -0
- package/dist/cli-serve-POCQTG4P.js +34 -0
- package/dist/cli-serve-X4N3OAE4.js +34 -0
- package/dist/cli.js +3 -3
- package/dist/dashboard/pages/agent-detail.js +1 -1
- package/dist/index.js +4 -4
- package/dist/routes-PUSWVYKW.js +6986 -0
- package/dist/routes-R4LPPGRI.js +6986 -0
- package/dist/runtime-KXL4R74S.js +49 -0
- package/dist/runtime-ZFNYFWMT.js +49 -0
- package/dist/server-3Z7G6IVQ.js +12 -0
- package/dist/server-NVDICD55.js +12 -0
- package/dist/setup-STGQHEJ4.js +20 -0
- package/dist/setup-UVV2HF6P.js +20 -0
- package/package.json +1 -1
- package/src/cli-agent.ts +6 -0
- package/src/dashboard/pages/agent-detail.js +1 -1
- package/src/engine/agent-memory.ts +30 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentRuntime,
|
|
3
|
+
EmailChannel,
|
|
4
|
+
FollowUpScheduler,
|
|
5
|
+
SessionManager,
|
|
6
|
+
SubAgentManager,
|
|
7
|
+
ToolRegistry,
|
|
8
|
+
callLLM,
|
|
9
|
+
createAgentRuntime,
|
|
10
|
+
createNoopHooks,
|
|
11
|
+
createRuntimeHooks,
|
|
12
|
+
estimateMessageTokens,
|
|
13
|
+
estimateTokens,
|
|
14
|
+
executeTool,
|
|
15
|
+
runAgentLoop,
|
|
16
|
+
toolsToDefinitions
|
|
17
|
+
} from "./chunk-I4U36SLL.js";
|
|
18
|
+
import "./chunk-AQH4DFYV.js";
|
|
19
|
+
import "./chunk-JLSQOQ5L.js";
|
|
20
|
+
import {
|
|
21
|
+
PROVIDER_REGISTRY,
|
|
22
|
+
listAllProviders,
|
|
23
|
+
resolveApiKeyForProvider,
|
|
24
|
+
resolveProvider
|
|
25
|
+
} from "./chunk-67KZYSLU.js";
|
|
26
|
+
import "./chunk-NRF3YRF7.js";
|
|
27
|
+
import "./chunk-TYW5XTOW.js";
|
|
28
|
+
import "./chunk-KFQGP6VL.js";
|
|
29
|
+
export {
|
|
30
|
+
AgentRuntime,
|
|
31
|
+
EmailChannel,
|
|
32
|
+
FollowUpScheduler,
|
|
33
|
+
PROVIDER_REGISTRY,
|
|
34
|
+
SessionManager,
|
|
35
|
+
SubAgentManager,
|
|
36
|
+
ToolRegistry,
|
|
37
|
+
callLLM,
|
|
38
|
+
createAgentRuntime,
|
|
39
|
+
createNoopHooks,
|
|
40
|
+
createRuntimeHooks,
|
|
41
|
+
estimateMessageTokens,
|
|
42
|
+
estimateTokens,
|
|
43
|
+
executeTool,
|
|
44
|
+
listAllProviders,
|
|
45
|
+
resolveApiKeyForProvider,
|
|
46
|
+
resolveProvider,
|
|
47
|
+
runAgentLoop,
|
|
48
|
+
toolsToDefinitions
|
|
49
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentRuntime,
|
|
3
|
+
EmailChannel,
|
|
4
|
+
FollowUpScheduler,
|
|
5
|
+
SessionManager,
|
|
6
|
+
SubAgentManager,
|
|
7
|
+
ToolRegistry,
|
|
8
|
+
callLLM,
|
|
9
|
+
createAgentRuntime,
|
|
10
|
+
createNoopHooks,
|
|
11
|
+
createRuntimeHooks,
|
|
12
|
+
estimateMessageTokens,
|
|
13
|
+
estimateTokens,
|
|
14
|
+
executeTool,
|
|
15
|
+
runAgentLoop,
|
|
16
|
+
toolsToDefinitions
|
|
17
|
+
} from "./chunk-5BNEWSIW.js";
|
|
18
|
+
import "./chunk-AQH4DFYV.js";
|
|
19
|
+
import "./chunk-JLSQOQ5L.js";
|
|
20
|
+
import {
|
|
21
|
+
PROVIDER_REGISTRY,
|
|
22
|
+
listAllProviders,
|
|
23
|
+
resolveApiKeyForProvider,
|
|
24
|
+
resolveProvider
|
|
25
|
+
} from "./chunk-67KZYSLU.js";
|
|
26
|
+
import "./chunk-NRF3YRF7.js";
|
|
27
|
+
import "./chunk-TYW5XTOW.js";
|
|
28
|
+
import "./chunk-KFQGP6VL.js";
|
|
29
|
+
export {
|
|
30
|
+
AgentRuntime,
|
|
31
|
+
EmailChannel,
|
|
32
|
+
FollowUpScheduler,
|
|
33
|
+
PROVIDER_REGISTRY,
|
|
34
|
+
SessionManager,
|
|
35
|
+
SubAgentManager,
|
|
36
|
+
ToolRegistry,
|
|
37
|
+
callLLM,
|
|
38
|
+
createAgentRuntime,
|
|
39
|
+
createNoopHooks,
|
|
40
|
+
createRuntimeHooks,
|
|
41
|
+
estimateMessageTokens,
|
|
42
|
+
estimateTokens,
|
|
43
|
+
executeTool,
|
|
44
|
+
listAllProviders,
|
|
45
|
+
resolveApiKeyForProvider,
|
|
46
|
+
resolveProvider,
|
|
47
|
+
runAgentLoop,
|
|
48
|
+
toolsToDefinitions
|
|
49
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-KFEFITDX.js";
|
|
4
|
+
import "./chunk-3SMTCIR4.js";
|
|
5
|
+
import "./chunk-JLSQOQ5L.js";
|
|
6
|
+
import "./chunk-RO537U6H.js";
|
|
7
|
+
import "./chunk-DRXMYYKN.js";
|
|
8
|
+
import "./chunk-67KZYSLU.js";
|
|
9
|
+
import "./chunk-KFQGP6VL.js";
|
|
10
|
+
export {
|
|
11
|
+
createServer
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-JHOLP2JO.js";
|
|
4
|
+
import "./chunk-3SMTCIR4.js";
|
|
5
|
+
import "./chunk-JLSQOQ5L.js";
|
|
6
|
+
import "./chunk-RO537U6H.js";
|
|
7
|
+
import "./chunk-DRXMYYKN.js";
|
|
8
|
+
import "./chunk-67KZYSLU.js";
|
|
9
|
+
import "./chunk-KFQGP6VL.js";
|
|
10
|
+
export {
|
|
11
|
+
createServer
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-DH5KEO76.js";
|
|
10
|
+
import "./chunk-MHIFVS5L.js";
|
|
11
|
+
import "./chunk-KFQGP6VL.js";
|
|
12
|
+
export {
|
|
13
|
+
promptCompanyInfo,
|
|
14
|
+
promptDatabase,
|
|
15
|
+
promptDeployment,
|
|
16
|
+
promptDomain,
|
|
17
|
+
promptRegistration,
|
|
18
|
+
provision,
|
|
19
|
+
runSetupWizard
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-RXW67YOT.js";
|
|
10
|
+
import "./chunk-MHIFVS5L.js";
|
|
11
|
+
import "./chunk-KFQGP6VL.js";
|
|
12
|
+
export {
|
|
13
|
+
promptCompanyInfo,
|
|
14
|
+
promptDatabase,
|
|
15
|
+
promptDeployment,
|
|
16
|
+
promptDomain,
|
|
17
|
+
promptRegistration,
|
|
18
|
+
provision,
|
|
19
|
+
runSetupWizard
|
|
20
|
+
};
|
package/package.json
CHANGED
package/src/cli-agent.ts
CHANGED
|
@@ -852,6 +852,12 @@ When you receive an email containing a meeting link (meet.google.com, zoom.us, t
|
|
|
852
852
|
});
|
|
853
853
|
|
|
854
854
|
console.log(`[email-poll] Session ${session.id} created for email from ${senderEmail}`);
|
|
855
|
+
// Track session count
|
|
856
|
+
const ag = lifecycle.getAgent(agentId);
|
|
857
|
+
if (ag?.usage) {
|
|
858
|
+
ag.usage.totalSessionsToday = (ag.usage.totalSessionsToday || 0) + 1;
|
|
859
|
+
ag.usage.activeSessionCount = (ag.usage.activeSessionCount || 0) + 1;
|
|
860
|
+
}
|
|
855
861
|
} catch (sessErr: any) {
|
|
856
862
|
console.error(`[email-poll] Failed to create session: ${sessErr.message}`);
|
|
857
863
|
}
|
|
@@ -231,7 +231,7 @@ function OverviewSection(props) {
|
|
|
231
231
|
var uu = usageData?.usage || usageData || {};
|
|
232
232
|
var tokensToday = uu.tokensToday || uu.today?.tokens || 0;
|
|
233
233
|
var costToday = uu.costToday || uu.today?.cost || 0;
|
|
234
|
-
var uptime = uu.uptime || uu.uptimeSeconds || usageData?.uptime || 0;
|
|
234
|
+
var uptime = uu.uptime || uu.uptimeSeconds || usageData?.health?.uptime || usageData?.uptime || 0;
|
|
235
235
|
var errorRate = uu.errorRate || uu.today?.errorRate || 0;
|
|
236
236
|
var activeSessions = uu.activeSessionCount || uu.activeSessions || uu.sessions?.active || 0;
|
|
237
237
|
|
|
@@ -155,14 +155,15 @@ export class AgentMemoryManager {
|
|
|
155
155
|
if (!this.engineDb) return;
|
|
156
156
|
try {
|
|
157
157
|
const rows = await this.engineDb.query<any>('SELECT * FROM agent_memory');
|
|
158
|
+
console.log(`[memory] Loaded ${rows.length} memories from DB`);
|
|
158
159
|
for (const r of rows) {
|
|
159
160
|
const entry = this.rowToEntry(r);
|
|
160
161
|
this.memories.set(entry.id, entry);
|
|
161
162
|
this.indexAdd(entry.agentId, entry.id);
|
|
162
163
|
this.searchIndex.addDocument(entry.id, entry);
|
|
163
164
|
}
|
|
164
|
-
} catch {
|
|
165
|
-
|
|
165
|
+
} catch (loadErr: any) {
|
|
166
|
+
console.error('[memory] loadFromDb failed:', loadErr.message);
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
|
|
@@ -348,6 +349,26 @@ export class AgentMemoryManager {
|
|
|
348
349
|
async queryMemories(opts: MemoryQueryOptions): Promise<AgentMemoryEntry[]> {
|
|
349
350
|
let results = this.getAgentMemories(opts.agentId);
|
|
350
351
|
|
|
352
|
+
// If in-memory is empty for this agent, try loading from DB (agent machine writes directly)
|
|
353
|
+
if (results.length === 0 && this.engineDb && opts.agentId) {
|
|
354
|
+
try {
|
|
355
|
+
const rows = await this.engineDb.query<any>(
|
|
356
|
+
'SELECT * FROM agent_memory WHERE agent_id = ?',
|
|
357
|
+
[opts.agentId]
|
|
358
|
+
);
|
|
359
|
+
console.log(`[memory] Lazy-loaded ${rows.length} memories for agent ${opts.agentId}`);
|
|
360
|
+
for (const r of rows) {
|
|
361
|
+
const entry = this.rowToEntry(r);
|
|
362
|
+
this.memories.set(entry.id, entry);
|
|
363
|
+
this.indexAdd(entry.agentId, entry.id);
|
|
364
|
+
this.searchIndex.addDocument(entry.id, entry);
|
|
365
|
+
}
|
|
366
|
+
results = this.getAgentMemories(opts.agentId);
|
|
367
|
+
} catch (e: any) {
|
|
368
|
+
console.error('[memory] Lazy-load failed:', e.message);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
351
372
|
if (opts.category) {
|
|
352
373
|
results = results.filter((m) => m.category === opts.category);
|
|
353
374
|
}
|
|
@@ -632,7 +653,13 @@ export class AgentMemoryManager {
|
|
|
632
653
|
* Returns aggregate statistics for a specific agent's memory entries.
|
|
633
654
|
*/
|
|
634
655
|
async getStats(agentId: string): Promise<MemoryStats> {
|
|
635
|
-
|
|
656
|
+
let entries = this.getAgentMemories(agentId);
|
|
657
|
+
// Lazy-load from DB if in-memory is empty
|
|
658
|
+
if (entries.length === 0 && this.engineDb) {
|
|
659
|
+
await this.queryMemories({ agentId, limit: 1000 }); // triggers DB load
|
|
660
|
+
entries = this.getAgentMemories(agentId);
|
|
661
|
+
}
|
|
662
|
+
return this.computeStats(entries);
|
|
636
663
|
}
|
|
637
664
|
|
|
638
665
|
/**
|