@agenticmail/enterprise 0.5.142 → 0.5.144
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-4ULAQ227.js +898 -0
- package/dist/chunk-CHVDUKNZ.js +2195 -0
- package/dist/chunk-OH37XJUB.js +16419 -0
- package/dist/cli-agent-QK675YSQ.js +665 -0
- package/dist/cli-agent-ZOM2OKCD.js +647 -0
- package/dist/cli-serve-VLFLQMN4.js +34 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +3 -3
- package/dist/runtime-UKT3M4N2.js +49 -0
- package/dist/server-JTSBKY34.js +12 -0
- package/dist/setup-4VWIYEYP.js +20 -0
- package/package.json +1 -1
- package/src/agent-tools/tools/google/tasks.ts +1 -3
- package/src/cli-agent.ts +40 -6
- package/src/runtime/tool-executor.ts +6 -0
package/dist/cli.js
CHANGED
|
@@ -47,14 +47,14 @@ Skill Development:
|
|
|
47
47
|
`);
|
|
48
48
|
break;
|
|
49
49
|
case "serve":
|
|
50
|
-
import("./cli-serve-
|
|
50
|
+
import("./cli-serve-VLFLQMN4.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
|
|
51
51
|
break;
|
|
52
52
|
case "agent":
|
|
53
|
-
import("./cli-agent-
|
|
53
|
+
import("./cli-agent-QK675YSQ.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
|
|
54
54
|
break;
|
|
55
55
|
case "setup":
|
|
56
56
|
default:
|
|
57
|
-
import("./setup-
|
|
57
|
+
import("./setup-4VWIYEYP.js").then((m) => m.runSetupWizard()).catch(fatal);
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
60
|
function fatal(err) {
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
provision,
|
|
15
15
|
runSetupWizard
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4ULAQ227.js";
|
|
17
17
|
import {
|
|
18
18
|
ActionJournal,
|
|
19
19
|
ActivityTracker,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
executeTool,
|
|
61
61
|
runAgentLoop,
|
|
62
62
|
toolsToDefinitions
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-OH37XJUB.js";
|
|
64
64
|
import "./chunk-TYW5XTOW.js";
|
|
65
65
|
import "./chunk-AQH4DFYV.js";
|
|
66
66
|
import {
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
requireRole,
|
|
77
77
|
securityHeaders,
|
|
78
78
|
validate
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-CHVDUKNZ.js";
|
|
80
80
|
import "./chunk-3SMTCIR4.js";
|
|
81
81
|
import "./chunk-RO537U6H.js";
|
|
82
82
|
import "./chunk-DRXMYYKN.js";
|
|
@@ -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-OH37XJUB.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-CHVDUKNZ.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-4ULAQ227.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
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import type { AnyAgentTool } from '../../types.js';
|
|
9
9
|
import type { TokenProvider } from './index.js';
|
|
10
|
+
import { jsonResult, errorResult } from '../../common.js';
|
|
10
11
|
|
|
11
12
|
// ─── Helper ─────────────────────────────────────────────
|
|
12
13
|
|
|
@@ -29,9 +30,6 @@ async function tasks(token: string, path: string, opts?: { method?: string; body
|
|
|
29
30
|
return res.json();
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
function jsonResult(data: any) { return { success: true, output: JSON.stringify(data, null, 2) }; }
|
|
33
|
-
function errorResult(msg: string) { return { success: false, output: `Error: ${msg}` }; }
|
|
34
|
-
|
|
35
33
|
// ─── Tool Definitions ───────────────────────────────────
|
|
36
34
|
|
|
37
35
|
export function createGoogleTasksTools(tp: TokenProvider): AnyAgentTool[] {
|
package/src/cli-agent.ts
CHANGED
|
@@ -701,12 +701,46 @@ FORMATTING RULES (STRICTLY ENFORCED):
|
|
|
701
701
|
|
|
702
702
|
CRITICAL: You MUST call gmail_reply EXACTLY ONCE to send your reply. Do NOT call it multiple times. Do NOT just generate text without calling the tool.
|
|
703
703
|
|
|
704
|
-
== TASK MANAGEMENT ==
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
704
|
+
== TASK MANAGEMENT (MANDATORY) ==
|
|
705
|
+
You MUST use Google Tasks to track ALL work. This is NOT optional.
|
|
706
|
+
|
|
707
|
+
BEFORE doing any work:
|
|
708
|
+
1. Call google_tasks_list_tasklists to find your "Work Tasks" list (create it with google_tasks_create_list if it doesn't exist)
|
|
709
|
+
2. Call google_tasks_list with that taskListId to check pending tasks
|
|
710
|
+
|
|
711
|
+
FOR EVERY email or request you handle:
|
|
712
|
+
1. FIRST: Create a task with google_tasks_create (include the taskListId for "Work Tasks", a clear title, notes with context, and a due date)
|
|
713
|
+
2. THEN: Do the actual work (research, reply, etc.)
|
|
714
|
+
3. FINALLY: Call google_tasks_complete to mark the task done
|
|
715
|
+
|
|
716
|
+
When you have MULTIPLE things to do (multiple emails, multi-step requests):
|
|
717
|
+
- Create a separate task for EACH item BEFORE starting any of them
|
|
718
|
+
- Work through them one by one
|
|
719
|
+
- Mark each task complete as you finish it
|
|
720
|
+
|
|
721
|
+
If a task requires research or follow-up later:
|
|
722
|
+
- Create the task with a future due date and detailed notes
|
|
723
|
+
- Do NOT mark it complete until fully resolved
|
|
724
|
+
|
|
725
|
+
This is how you stay organized. Every piece of work gets a task. No exceptions.
|
|
726
|
+
|
|
727
|
+
== GOOGLE DRIVE FILE MANAGEMENT (MANDATORY) ==
|
|
728
|
+
ALL documents, spreadsheets, and files you create MUST be organized on Google Drive.
|
|
729
|
+
|
|
730
|
+
FOLDER STRUCTURE:
|
|
731
|
+
- Use google_drive_create with mimeType "application/vnd.google-apps.folder" to create a "Work" folder (if it doesn't exist)
|
|
732
|
+
- Inside "Work", create sub-folders by category: "Research", "Templates", "Reports", "Customer Issues", etc.
|
|
733
|
+
- EVERY file you create must be moved into the appropriate folder using google_drive_move
|
|
734
|
+
|
|
735
|
+
WORKFLOW for creating documents:
|
|
736
|
+
1. Check if your "Work" folder exists (google_drive_list with query "name='Work' and mimeType='application/vnd.google-apps.folder'")
|
|
737
|
+
2. If not, create it with google_drive_create (name: "Work", mimeType: "application/vnd.google-apps.folder")
|
|
738
|
+
3. Check/create the appropriate sub-folder inside "Work" (e.g. "Research", "Templates")
|
|
739
|
+
4. Create the document (google_docs_create, google_sheets_create, etc.)
|
|
740
|
+
5. Move the document into the correct folder (google_drive_move with the folder ID as destination)
|
|
741
|
+
6. Share with your manager if requested
|
|
742
|
+
|
|
743
|
+
NEVER leave files in the Drive root. Always organize into folders.`;
|
|
710
744
|
|
|
711
745
|
const session = await runtime.spawnSession({
|
|
712
746
|
agentId,
|
|
@@ -179,6 +179,12 @@ async function executeWithTimeout<T>(
|
|
|
179
179
|
// ─── Result Formatting ──────────────────────────────────
|
|
180
180
|
|
|
181
181
|
function formatToolResult(result: ToolResult): string {
|
|
182
|
+
// Handle tools that return { output: '...' } instead of { content: [...] }
|
|
183
|
+
var anyResult = result as any;
|
|
184
|
+
if ((!result.content || result.content.length === 0) && anyResult.output) {
|
|
185
|
+
return String(anyResult.output);
|
|
186
|
+
}
|
|
187
|
+
|
|
182
188
|
if (!result.content || result.content.length === 0) {
|
|
183
189
|
return '(no output)';
|
|
184
190
|
}
|