@agenticmail/enterprise 0.5.254 → 0.5.256

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.
@@ -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-HE4H2WNG.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-TOD2HH7L.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-75FNJLUP.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,7 @@
1
+ import {
2
+ TaskQueueManager
3
+ } from "./chunk-APCWGN56.js";
4
+ import "./chunk-KFQGP6VL.js";
5
+ export {
6
+ TaskQueueManager
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.254",
3
+ "version": "0.5.256",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -121,15 +121,17 @@ function layoutChains(tasks) {
121
121
  y += maxH + V_GAP + 8; // space between chains
122
122
  });
123
123
 
124
- // Layout orphans as simple rows per agent
125
- orphansByAgent.forEach(function(agentTasks, agentId) {
124
+ // Layout orphans horizontally in a single row (with wrap if too many)
125
+ var orphanList = [];
126
+ orphansByAgent.forEach(function(agentTasks) { orphanList = orphanList.concat(agentTasks); });
127
+ if (orphanList.length > 0) {
126
128
  var x = PAD;
127
- agentTasks.forEach(function(t) {
129
+ orphanList.forEach(function(t) {
128
130
  allNodes.push({ id: t.id, task: t, x: x, y: y, w: NODE_W, h: NODE_H, isAgent: false, chainId: null });
129
131
  x += NODE_W + H_GAP;
130
132
  });
131
133
  y += NODE_H + V_GAP;
132
- });
134
+ }
133
135
 
134
136
  var maxX = 0;
135
137
  allNodes.forEach(function(n) { maxX = Math.max(maxX, n.x + n.w); });
@@ -707,11 +709,11 @@ export function TaskPipelinePage() {
707
709
  // Canvas
708
710
  h('div', {
709
711
  ref: containerRef,
710
- style: { flex: 1, overflow: 'hidden', cursor: dragging ? 'grabbing' : 'grab', position: 'relative' },
712
+ style: { flex: 1, overflow: 'auto', cursor: dragging ? 'grabbing' : 'grab', position: 'relative' },
711
713
  onMouseDown: handleMouseDown,
712
714
  onWheel: handleWheel,
713
715
  },
714
- h('div', { style: { transform: 'translate(' + pan.x + 'px, ' + pan.y + 'px) scale(' + zoom + ')', transformOrigin: '0 0', position: 'absolute', top: 0, left: 0 } },
716
+ h('div', { style: { transform: 'translate(' + pan.x + 'px, ' + pan.y + 'px) scale(' + zoom + ')', transformOrigin: '0 0', position: 'relative', minWidth: (treeW + PAD * 2) * zoom, minHeight: (treeH + PAD * 2) * zoom } },
715
717
 
716
718
  // Chain labels (left side)
717
719
  chainInfos.map(function(ci, i) {
@@ -315,7 +315,7 @@ export class TaskQueueManager {
315
315
  return chain.sort((a, b) => (a.chainSeq || 0) - (b.chainSeq || 0));
316
316
  }
317
317
 
318
- async updateTask(taskId: string, updates: Partial<Pick<TaskRecord, 'status' | 'progress' | 'result' | 'error' | 'modelUsed' | 'tokensUsed' | 'costUsd' | 'sessionId' | 'title' | 'description' | 'priority'>>): Promise<TaskRecord | null> {
318
+ async updateTask(taskId: string, updates: Partial<Pick<TaskRecord, 'status' | 'progress' | 'result' | 'error' | 'modelUsed' | 'tokensUsed' | 'costUsd' | 'sessionId' | 'title' | 'description' | 'priority' | 'activityLog'>>): Promise<TaskRecord | null> {
319
319
  await this.init();
320
320
  const task = this.tasks.get(taskId);
321
321
  if (!task) return null;
@@ -328,7 +328,18 @@ export class TaskQueueManager {
328
328
  if (updates.status === 'completed' || updates.status === 'failed' || updates.status === 'cancelled') {
329
329
  task.completedAt = now;
330
330
  if (task.startedAt) task.actualDurationMs = new Date(now).getTime() - new Date(task.startedAt).getTime();
331
- if (updates.status === 'completed') task.progress = 100;
331
+ if (updates.status === 'completed') {
332
+ task.progress = 100;
333
+ const dur = task.actualDurationMs ? ` in ${Math.round(task.actualDurationMs / 1000)}s` : '';
334
+ const tokens = updates.tokensUsed ? ` (${updates.tokensUsed.toLocaleString()} tokens` + (updates.costUsd ? `, $${updates.costUsd.toFixed(4)}` : '') + ')' : '';
335
+ task.activityLog.push({ ts: now, type: 'completed', agent: task.assignedTo, detail: `Task completed${dur}${tokens}` });
336
+ }
337
+ if (updates.status === 'failed') {
338
+ task.activityLog.push({ ts: now, type: 'failed', agent: task.assignedTo, detail: `Task failed: ${updates.error || 'Unknown error'}` });
339
+ }
340
+ if (updates.status === 'cancelled') {
341
+ task.activityLog.push({ ts: now, type: 'cancelled', agent: task.assignedTo, detail: 'Task cancelled' });
342
+ }
332
343
  }
333
344
 
334
345
  Object.assign(task, updates);