@agenticmail/enterprise 0.5.172 → 0.5.173
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/chunk-BZM7M7ZD.js +2195 -0
- package/dist/chunk-EMSCGO7G.js +17682 -0
- package/dist/chunk-GKPFCKNU.js +898 -0
- package/dist/cli-agent-Y5PR3MEC.js +1007 -0
- package/dist/cli-serve-TLSS22GA.js +34 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +3 -3
- package/dist/routes-DCKRUU6E.js +6998 -0
- package/dist/runtime-2NMHFRUT.js +49 -0
- package/dist/server-U5J3SEZM.js +12 -0
- package/dist/setup-CEX46TOT.js +20 -0
- package/package.json +1 -1
- package/src/engine/agent-routes.ts +4 -1
- package/src/engine/oauth-connect-routes.ts +7 -2
|
@@ -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-EMSCGO7G.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-BZM7M7ZD.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-GKPFCKNU.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
|
@@ -737,7 +737,10 @@ export function createAgentRoutes(opts: {
|
|
|
737
737
|
|
|
738
738
|
const tokens = await tokenRes.json() as any;
|
|
739
739
|
emailConfig.oauthAccessToken = tokens.access_token;
|
|
740
|
-
|
|
740
|
+
// Only overwrite refresh_token if Google returned one (re-auth may not include it)
|
|
741
|
+
if (tokens.refresh_token) {
|
|
742
|
+
emailConfig.oauthRefreshToken = tokens.refresh_token;
|
|
743
|
+
}
|
|
741
744
|
emailConfig.oauthTokenExpiry = new Date(Date.now() + (tokens.expires_in * 1000)).toISOString();
|
|
742
745
|
|
|
743
746
|
// Get the user's email from Gmail
|
|
@@ -372,7 +372,9 @@ async function handleAgentEmailOAuthCallback(c: any, agentId: string, code: stri
|
|
|
372
372
|
}
|
|
373
373
|
const tokens = await tokenRes.json() as any;
|
|
374
374
|
emailConfig.oauthAccessToken = tokens.access_token;
|
|
375
|
-
|
|
375
|
+
if (tokens.refresh_token) {
|
|
376
|
+
emailConfig.oauthRefreshToken = tokens.refresh_token;
|
|
377
|
+
}
|
|
376
378
|
emailConfig.oauthTokenExpiry = new Date(Date.now() + (tokens.expires_in * 1000)).toISOString();
|
|
377
379
|
|
|
378
380
|
// Get user email from Graph
|
|
@@ -404,7 +406,10 @@ async function handleAgentEmailOAuthCallback(c: any, agentId: string, code: stri
|
|
|
404
406
|
}
|
|
405
407
|
const tokens = await tokenRes.json() as any;
|
|
406
408
|
emailConfig.oauthAccessToken = tokens.access_token;
|
|
407
|
-
|
|
409
|
+
// Only overwrite refresh_token if Google returned one (re-auth may not include it)
|
|
410
|
+
if (tokens.refresh_token) {
|
|
411
|
+
emailConfig.oauthRefreshToken = tokens.refresh_token;
|
|
412
|
+
}
|
|
408
413
|
emailConfig.oauthTokenExpiry = tokens.expires_in
|
|
409
414
|
? new Date(Date.now() + (tokens.expires_in * 1000)).toISOString()
|
|
410
415
|
: undefined;
|