@agenticmail/enterprise 0.5.142 → 0.5.143

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/cli.js CHANGED
@@ -47,14 +47,14 @@ Skill Development:
47
47
  `);
48
48
  break;
49
49
  case "serve":
50
- import("./cli-serve-I3FC42N6.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
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-VA44G3Y3.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
53
+ import("./cli-agent-ZOM2OKCD.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
54
54
  break;
55
55
  case "setup":
56
56
  default:
57
- import("./setup-RUEF6SOK.js").then((m) => m.runSetupWizard()).catch(fatal);
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-ADBY6MKH.js";
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-5ZHZZO2E.js";
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-JOJUWZ3A.js";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.142",
3
+ "version": "0.5.143",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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,28 @@ 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
- When you receive work requests, action items, or follow-ups:
706
- - Use google_tasks_create to track them (title, notes, due date)
707
- - Check google_tasks_list at the start of interactions to see pending work
708
- - Use google_tasks_complete when done with items
709
- This helps you stay organized and ensures nothing falls through the cracks.`;
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.`;
710
726
 
711
727
  const session = await runtime.spawnSession({
712
728
  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
  }