@agenticmail/enterprise 0.5.219 → 0.5.221

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-VDUO74IR.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-2C7ONND4.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-JVWGO6JN.js";
10
+ import "./chunk-VQQ4SYYQ.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.219",
3
+ "version": "0.5.221",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -532,6 +532,17 @@ export function TaskPipelinePage() {
532
532
  }, [treeW, treeH]);
533
533
  useEffect(function() { if (nodes.length > 0) fitToView(); }, [nodes.length]);
534
534
 
535
+ // Auto-pan to first active (in_progress) task so it's always visible
536
+ useEffect(function() {
537
+ if (!containerRef.current || !nodes.length) return;
538
+ var activeNode = nodes.find(function(n) { return n.task && n.task.status === 'in_progress'; });
539
+ if (!activeNode) return;
540
+ var rect = containerRef.current.getBoundingClientRect();
541
+ var targetX = -(activeNode.x * zoom) + rect.width * 0.3;
542
+ var targetY = -(activeNode.y * zoom) + rect.height * 0.4;
543
+ setPan({ x: Math.min(targetX, 16), y: Math.min(targetY, 16) });
544
+ }, [nodes.length, zoom]);
545
+
535
546
  // Highlight connected chain on hover
536
547
  var hoveredChainId = null;
537
548
  if (hoveredId) {
@@ -786,8 +797,11 @@ export function TaskPipelinePage() {
786
797
  // SVG arrows
787
798
  h('svg', { width: totalW, height: STEP_H + 8, style: { position: 'absolute', top: 0, left: 0, pointerEvents: 'none' } },
788
799
  h('defs', null,
789
- h('marker', { id: 'fc-arr', markerWidth: 6, markerHeight: 4, refX: 6, refY: 2, orient: 'auto' },
790
- h('polygon', { points: '0 0, 6 2, 0 4', fill: 'rgba(99,102,241,0.5)' })
800
+ h('marker', { id: 'fc-arr', markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: 'auto' },
801
+ h('polygon', { points: '0 0, 8 3, 0 6', fill: 'var(--tp-text-dim, rgba(99,102,241,0.6))' })
802
+ ),
803
+ h('marker', { id: 'fc-arr-active', markerWidth: 8, markerHeight: 6, refX: 8, refY: 3, orient: 'auto' },
804
+ h('polygon', { points: '0 0, 8 3, 0 6', fill: STATUS_COLORS.in_progress })
791
805
  )
792
806
  ),
793
807
  steps.map(function(step, i) {
@@ -798,9 +812,11 @@ export function TaskPipelinePage() {
798
812
  var arrowColor = DELEGATION_COLORS[step.arrow] || 'rgba(99,102,241,0.5)';
799
813
  var nextStep = steps[i + 1];
800
814
  var isFlowActive = step.status === 'in_progress' || (nextStep && nextStep.status === 'in_progress');
815
+ var midX = x1 + (x2 - x1) * 0.5;
816
+ var d = 'M ' + x1 + ' ' + y + ' C ' + midX + ' ' + y + ', ' + midX + ' ' + y + ', ' + x2 + ' ' + y;
801
817
  return h(Fragment, { key: 'a' + i },
802
- h('line', { x1: x1, y1: y, x2: x2, y2: y, stroke: arrowColor + '88', strokeWidth: 2, markerEnd: 'url(#fc-arr)' }),
803
- isFlowActive && h('line', { x1: x1, y1: y, x2: x2, y2: y, stroke: STATUS_COLORS.in_progress, strokeWidth: 2, strokeDasharray: '4 12', className: 'tp-flow-active', style: { opacity: 0.7 } }),
818
+ h('path', { d: d, stroke: arrowColor, strokeWidth: 2, fill: 'none', markerEnd: 'url(#fc-arr)' }),
819
+ isFlowActive && h('path', { d: d, stroke: STATUS_COLORS.in_progress, strokeWidth: 2, fill: 'none', strokeDasharray: '4 12', className: 'tp-flow-active', style: { opacity: 0.7 }, markerEnd: 'url(#fc-arr-active)' }),
804
820
  step.arrow !== 'assigned' && step.arrow !== 'delegation' && h('text', { x: (x1 + x2) / 2, y: y - 6, fill: arrowColor, fontSize: 8, textAnchor: 'middle', fontWeight: 600 }, step.arrow)
805
821
  );
806
822
  })
@@ -821,7 +837,7 @@ export function TaskPipelinePage() {
821
837
  className: 'tp-node',
822
838
  onClick: function(e) { e.stopPropagation(); if (step.taskId) { var ct = expandedChain.find(function(c) { return c.id === step.taskId; }); if (ct) openTaskDetail(ct); } },
823
839
  style: {
824
- position: 'absolute', left: x, top: 4, width: STEP_W, height: STEP_H,
840
+ position: 'absolute', left: x, top: 4, width: isTerminal ? 'auto' : STEP_W, minWidth: isTerminal ? 90 : undefined, height: STEP_H,
825
841
  background: isTerminal ? sc + '15' : isMe ? 'rgba(255,255,255,0.06)' : 'rgba(255,255,255,0.02)',
826
842
  border: '1px solid ' + (isTerminal ? sc + '44' : isMe ? sc : 'rgba(255,255,255,0.1)'),
827
843
  borderRadius: isTerminal ? 18 : 6,
@@ -850,7 +866,7 @@ export function TaskPipelinePage() {
850
866
  })(),
851
867
  // Info
852
868
  h('div', { style: { overflow: 'hidden', flex: 1, minWidth: 0 } },
853
- h('div', { style: { fontSize: 10, fontWeight: 600, color: isTerminal ? sc : '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, step.label),
869
+ h('div', { style: { fontSize: 10, fontWeight: 600, color: isTerminal ? sc : 'var(--tp-text)', whiteSpace: 'nowrap', overflow: isTerminal ? 'visible' : 'hidden', textOverflow: isTerminal ? 'unset' : 'ellipsis' } }, step.label),
854
870
  !isTerminal && h('div', { style: { fontSize: 8, color: 'var(--tp-text-dim)', marginTop: 1 } },
855
871
  step.type === 'person' || step.isHuman ? 'Human' : step.type === 'system' ? 'System' : 'Agent',
856
872
  step.duration ? ' \u00B7 ' + formatDuration(step.duration) : '',
@@ -152,9 +152,7 @@ export class TaskQueueManager {
152
152
  await this.db.run(`CREATE INDEX IF NOT EXISTS idx_task_pipeline_agent ON task_pipeline(assigned_to)`);
153
153
  await this.db.run(`CREATE INDEX IF NOT EXISTS idx_task_pipeline_status ON task_pipeline(status)`);
154
154
  await this.db.run(`CREATE INDEX IF NOT EXISTS idx_task_pipeline_created ON task_pipeline(created_at)`);
155
- await this.db.run(`CREATE INDEX IF NOT EXISTS idx_task_pipeline_chain ON task_pipeline(chain_id)`);
156
-
157
- // Add new columns to existing tables (safe — IF NOT EXISTS not available for columns, so catch errors)
155
+ // Add new columns to existing tables (safe catch errors if already exist)
158
156
  for (const col of [
159
157
  ['chain_id', 'TEXT'], ['chain_seq', 'INTEGER DEFAULT 0'], ['delegated_from', 'TEXT'],
160
158
  ['delegated_to', 'TEXT'], ['delegation_type', 'TEXT'], ['customer_context', 'TEXT'],
@@ -163,6 +161,9 @@ export class TaskQueueManager {
163
161
  try { await this.db.run(`ALTER TABLE task_pipeline ADD COLUMN ${col[0]} ${col[1]}`); } catch { /* already exists */ }
164
162
  }
165
163
 
164
+ // Create chain index AFTER columns are ensured
165
+ try { await this.db.run(`CREATE INDEX IF NOT EXISTS idx_task_pipeline_chain ON task_pipeline(chain_id)`); } catch { /* already exists */ }
166
+
166
167
  // Load recent tasks into memory
167
168
  const cutoff = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString();
168
169
  const rows = await this.db.all(`SELECT * FROM task_pipeline WHERE status IN ('created','assigned','in_progress') OR created_at > ? ORDER BY created_at DESC LIMIT 500`, [cutoff]);