@agenticmail/enterprise 0.5.267 → 0.5.269
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-WYDQEOUY.js +510 -0
- package/dist/agent-heartbeat-XSVOI6UX.js +510 -0
- package/dist/chunk-536NATB3.js +3778 -0
- package/dist/chunk-HG24BS44.js +4732 -0
- package/dist/chunk-KP3ENFEU.js +3778 -0
- package/dist/chunk-NP3DMOZK.js +1224 -0
- package/dist/chunk-U3HRI65F.js +4732 -0
- package/dist/chunk-W4RALP6L.js +1224 -0
- package/dist/cli-agent-CJPLQBPU.js +1768 -0
- package/dist/cli-agent-ZCUKIB7S.js +1768 -0
- package/dist/cli-serve-3MWJHE34.js +114 -0
- package/dist/cli-serve-EN3QJFMF.js +114 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +3 -3
- package/dist/routes-73I4XP3E.js +14679 -0
- package/dist/routes-MUZXR6Y7.js +14679 -0
- package/dist/runtime-OSEI6HJT.js +45 -0
- package/dist/runtime-TDEJFLQ7.js +45 -0
- package/dist/server-ITW2PBD4.js +15 -0
- package/dist/server-JA5ZCBX2.js +15 -0
- package/dist/setup-M3URIOY7.js +20 -0
- package/dist/setup-RGSVF4GK.js +20 -0
- package/package.json +1 -1
- package/src/database-access/connection-manager.ts +14 -13
- package/src/engine/routes.ts +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
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-HG24BS44.js";
|
|
18
|
+
import {
|
|
19
|
+
PROVIDER_REGISTRY,
|
|
20
|
+
listAllProviders,
|
|
21
|
+
resolveApiKeyForProvider,
|
|
22
|
+
resolveProvider
|
|
23
|
+
} from "./chunk-UF3ZJMJO.js";
|
|
24
|
+
import "./chunk-KFQGP6VL.js";
|
|
25
|
+
export {
|
|
26
|
+
AgentRuntime,
|
|
27
|
+
EmailChannel,
|
|
28
|
+
FollowUpScheduler,
|
|
29
|
+
PROVIDER_REGISTRY,
|
|
30
|
+
SessionManager,
|
|
31
|
+
SubAgentManager,
|
|
32
|
+
ToolRegistry,
|
|
33
|
+
callLLM,
|
|
34
|
+
createAgentRuntime,
|
|
35
|
+
createNoopHooks,
|
|
36
|
+
createRuntimeHooks,
|
|
37
|
+
estimateMessageTokens,
|
|
38
|
+
estimateTokens,
|
|
39
|
+
executeTool,
|
|
40
|
+
listAllProviders,
|
|
41
|
+
resolveApiKeyForProvider,
|
|
42
|
+
resolveProvider,
|
|
43
|
+
runAgentLoop,
|
|
44
|
+
toolsToDefinitions
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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-U3HRI65F.js";
|
|
18
|
+
import {
|
|
19
|
+
PROVIDER_REGISTRY,
|
|
20
|
+
listAllProviders,
|
|
21
|
+
resolveApiKeyForProvider,
|
|
22
|
+
resolveProvider
|
|
23
|
+
} from "./chunk-UF3ZJMJO.js";
|
|
24
|
+
import "./chunk-KFQGP6VL.js";
|
|
25
|
+
export {
|
|
26
|
+
AgentRuntime,
|
|
27
|
+
EmailChannel,
|
|
28
|
+
FollowUpScheduler,
|
|
29
|
+
PROVIDER_REGISTRY,
|
|
30
|
+
SessionManager,
|
|
31
|
+
SubAgentManager,
|
|
32
|
+
ToolRegistry,
|
|
33
|
+
callLLM,
|
|
34
|
+
createAgentRuntime,
|
|
35
|
+
createNoopHooks,
|
|
36
|
+
createRuntimeHooks,
|
|
37
|
+
estimateMessageTokens,
|
|
38
|
+
estimateTokens,
|
|
39
|
+
executeTool,
|
|
40
|
+
listAllProviders,
|
|
41
|
+
resolveApiKeyForProvider,
|
|
42
|
+
resolveProvider,
|
|
43
|
+
runAgentLoop,
|
|
44
|
+
toolsToDefinitions
|
|
45
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-536NATB3.js";
|
|
4
|
+
import "./chunk-OF4MUWWS.js";
|
|
5
|
+
import "./chunk-UF3ZJMJO.js";
|
|
6
|
+
import "./chunk-3OC6RH7W.js";
|
|
7
|
+
import "./chunk-2DDKGTD6.js";
|
|
8
|
+
import "./chunk-YVK6F5OD.js";
|
|
9
|
+
import "./chunk-MKRNEM5A.js";
|
|
10
|
+
import "./chunk-DRXMYYKN.js";
|
|
11
|
+
import "./chunk-6WSX7QXF.js";
|
|
12
|
+
import "./chunk-KFQGP6VL.js";
|
|
13
|
+
export {
|
|
14
|
+
createServer
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-KP3ENFEU.js";
|
|
4
|
+
import "./chunk-OF4MUWWS.js";
|
|
5
|
+
import "./chunk-UF3ZJMJO.js";
|
|
6
|
+
import "./chunk-3OC6RH7W.js";
|
|
7
|
+
import "./chunk-2DDKGTD6.js";
|
|
8
|
+
import "./chunk-YVK6F5OD.js";
|
|
9
|
+
import "./chunk-MKRNEM5A.js";
|
|
10
|
+
import "./chunk-DRXMYYKN.js";
|
|
11
|
+
import "./chunk-6WSX7QXF.js";
|
|
12
|
+
import "./chunk-KFQGP6VL.js";
|
|
13
|
+
export {
|
|
14
|
+
createServer
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-W4RALP6L.js";
|
|
10
|
+
import "./chunk-ULRBF2T7.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-NP3DMOZK.js";
|
|
10
|
+
import "./chunk-ULRBF2T7.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
|
@@ -134,13 +134,14 @@ export class DatabaseConnectionManager {
|
|
|
134
134
|
|
|
135
135
|
private async ensureTable(): Promise<void> {
|
|
136
136
|
if (!this.engineDb) return;
|
|
137
|
-
// Detect dialect
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
// Detect dialect: try Postgres-style NOW() first, fall back to SQLite datetime('now')
|
|
138
|
+
let isPostgres = false;
|
|
139
|
+
try {
|
|
140
|
+
await this.dbRun(`SELECT NOW()`);
|
|
141
|
+
isPostgres = true;
|
|
142
|
+
} catch {
|
|
143
|
+
isPostgres = false;
|
|
144
|
+
}
|
|
144
145
|
const now = isPostgres ? 'NOW()' : "(datetime('now'))";
|
|
145
146
|
const jsonType = isPostgres ? 'JSONB' : 'TEXT';
|
|
146
147
|
const boolType = isPostgres ? 'BOOLEAN' : 'INTEGER';
|
|
@@ -220,7 +221,7 @@ export class DatabaseConnectionManager {
|
|
|
220
221
|
private async loadAgentAccess(): Promise<void> {
|
|
221
222
|
if (!this.engineDb) return;
|
|
222
223
|
try {
|
|
223
|
-
const rows = await this.dbAll('SELECT * FROM agent_database_access WHERE enabled
|
|
224
|
+
const rows = await this.dbAll('SELECT * FROM agent_database_access WHERE enabled IS NOT FALSE');
|
|
224
225
|
for (const row of (rows || [])) {
|
|
225
226
|
const access = this.rowToAccess(row);
|
|
226
227
|
const list = this.agentAccess.get(access.agentId) || [];
|
|
@@ -343,8 +344,8 @@ export class DatabaseConnectionManager {
|
|
|
343
344
|
[
|
|
344
345
|
id, full.orgId, full.agentId, full.connectionId,
|
|
345
346
|
JSON.stringify(full.permissions), JSON.stringify(full.queryLimits || null),
|
|
346
|
-
JSON.stringify(full.schemaAccess || null), full.logAllQueries
|
|
347
|
-
full.requireApproval
|
|
347
|
+
JSON.stringify(full.schemaAccess || null), full.logAllQueries,
|
|
348
|
+
full.requireApproval, full.enabled, now, now,
|
|
348
349
|
]
|
|
349
350
|
);
|
|
350
351
|
}
|
|
@@ -386,8 +387,8 @@ export class DatabaseConnectionManager {
|
|
|
386
387
|
`UPDATE agent_database_access SET permissions = ?, query_limits = ?, schema_access = ?, log_all_queries = ?, require_approval = ?, enabled = ?, updated_at = ? WHERE agent_id = ? AND connection_id = ?`,
|
|
387
388
|
[
|
|
388
389
|
JSON.stringify(updated.permissions), JSON.stringify(updated.queryLimits || null),
|
|
389
|
-
JSON.stringify(updated.schemaAccess || null), updated.logAllQueries
|
|
390
|
-
updated.requireApproval
|
|
390
|
+
JSON.stringify(updated.schemaAccess || null), updated.logAllQueries,
|
|
391
|
+
updated.requireApproval, updated.enabled, updated.updatedAt,
|
|
391
392
|
agentId, connectionId,
|
|
392
393
|
]
|
|
393
394
|
);
|
|
@@ -664,7 +665,7 @@ export class DatabaseConnectionManager {
|
|
|
664
665
|
[
|
|
665
666
|
queryId, config.orgId, query.agentId, query.connectionId, config.name,
|
|
666
667
|
operation, sanitizeForLogging(query.sql || ''), (query.params || []).length,
|
|
667
|
-
rowsAffected, Date.now() - startMs, success
|
|
668
|
+
rowsAffected, Date.now() - startMs, success, error || null,
|
|
668
669
|
new Date().toISOString(),
|
|
669
670
|
]
|
|
670
671
|
);
|
package/src/engine/routes.ts
CHANGED
|
@@ -757,7 +757,7 @@ export async function setEngineDb(
|
|
|
757
757
|
storageManager.setDb(db),
|
|
758
758
|
policyImporter.setDb(db),
|
|
759
759
|
(async () => { (taskQueue as any).db = (db as any)?.db || db; await taskQueue.init(); })(),
|
|
760
|
-
databaseManager.setDb(
|
|
760
|
+
databaseManager.setDb(db),
|
|
761
761
|
]);
|
|
762
762
|
// Initialize hierarchy manager + start background task monitor
|
|
763
763
|
hierarchyManager = new AgentHierarchyManager(db);
|