@agenticmail/enterprise 0.5.128 → 0.5.129
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-EUMQIDYD.js +2195 -0
- package/dist/chunk-I6X4KSPW.js +16167 -0
- package/dist/chunk-M6GX25GK.js +898 -0
- package/dist/cli-agent-EE2HIA5Y.js +576 -0
- package/dist/cli-serve-JWB66CU3.js +34 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +3 -3
- package/dist/runtime-A66NGCLG.js +49 -0
- package/dist/server-ZOAAIRVP.js +12 -0
- package/dist/setup-WCW5BH3U.js +20 -0
- package/package.json +1 -1
- package/src/agent-tools/tools/google/gmail.ts +10 -2
- package/src/cli-agent.ts +6 -0
|
@@ -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-I6X4KSPW.js";
|
|
18
|
+
import "./chunk-TYW5XTOW.js";
|
|
19
|
+
import "./chunk-AQH4DFYV.js";
|
|
20
|
+
import {
|
|
21
|
+
PROVIDER_REGISTRY,
|
|
22
|
+
listAllProviders,
|
|
23
|
+
resolveApiKeyForProvider,
|
|
24
|
+
resolveProvider
|
|
25
|
+
} from "./chunk-67KZYSLU.js";
|
|
26
|
+
import "./chunk-JLSQOQ5L.js";
|
|
27
|
+
import "./chunk-NRF3YRF7.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-EUMQIDYD.js";
|
|
4
|
+
import "./chunk-3SMTCIR4.js";
|
|
5
|
+
import "./chunk-RO537U6H.js";
|
|
6
|
+
import "./chunk-DRXMYYKN.js";
|
|
7
|
+
import "./chunk-67KZYSLU.js";
|
|
8
|
+
import "./chunk-JLSQOQ5L.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-M6GX25GK.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
|
@@ -355,9 +355,17 @@ export function createGmailTools(config: GoogleToolsConfig, _options?: ToolCreat
|
|
|
355
355
|
const original = await gmail(token, `/messages/${params.messageId}`, { query: { format: 'metadata', metadataHeaders: 'From,To,Cc,Subject,Message-ID,References' } });
|
|
356
356
|
const oh = extractHeaders(original.payload?.headers || [], ['From', 'To', 'Cc', 'Subject', 'Message-ID', 'References']);
|
|
357
357
|
|
|
358
|
+
// Extract clean email from From header (handles "Name <email>" format)
|
|
359
|
+
const extractEmail = (h: string) => {
|
|
360
|
+
const m = h.match(/<([^>]+)>/);
|
|
361
|
+
return m ? m[1] : h.trim();
|
|
362
|
+
};
|
|
358
363
|
const to = params.replyAll === 'true'
|
|
359
|
-
? [oh.From, ...(oh.To || '').split(','), ...(oh.Cc || '').split(',')]
|
|
360
|
-
|
|
364
|
+
? [oh.From, ...(oh.To || '').split(','), ...(oh.Cc || '').split(',')]
|
|
365
|
+
.map(e => extractEmail(e))
|
|
366
|
+
.filter(e => e && !e.includes(email || '___'))
|
|
367
|
+
.join(',')
|
|
368
|
+
: extractEmail(oh.From);
|
|
361
369
|
|
|
362
370
|
const subject = oh.Subject?.startsWith('Re:') ? oh.Subject : `Re: ${oh.Subject || ''}`;
|
|
363
371
|
const references = [oh.References, oh['Message-ID']].filter(Boolean).join(' ');
|
package/src/cli-agent.ts
CHANGED
|
@@ -643,6 +643,12 @@ IMPORTANT: Use gmail_reply, NOT gmail_send. gmail_send creates a new email threa
|
|
|
643
643
|
Be helpful, professional, and match the tone of the sender.
|
|
644
644
|
Keep responses concise but thorough. Sign off with your name: ${agentName}
|
|
645
645
|
|
|
646
|
+
FORMATTING RULES:
|
|
647
|
+
- NEVER use "--" or "---" or em dashes (—) in your emails
|
|
648
|
+
- NEVER use markdown formatting (no **, no ##, no bullet points with -)
|
|
649
|
+
- Write natural, flowing prose like a real human email
|
|
650
|
+
- Keep it warm and conversational, not robotic or formatted
|
|
651
|
+
|
|
646
652
|
DO NOT just generate text — you MUST call gmail_reply to actually send the reply.`;
|
|
647
653
|
|
|
648
654
|
const session = await runtime.spawnSession({
|