@agenticmail/enterprise 0.5.199 → 0.5.201

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.
Files changed (110) hide show
  1. package/dist/agent-heartbeat-EGMBRD3R.js +510 -0
  2. package/dist/chunk-5C3SCMY5.js +4457 -0
  3. package/dist/chunk-6OZYUTPL.js +1224 -0
  4. package/dist/chunk-ZR4Z42HT.js +3679 -0
  5. package/dist/cli-agent-PLMDHMRR.js +1602 -0
  6. package/dist/cli-serve-PLBAWN7N.js +114 -0
  7. package/dist/cli.js +3 -3
  8. package/dist/dashboard/app.js +3 -0
  9. package/dist/dashboard/components/icons.js +1 -0
  10. package/dist/dashboard/pages/activity.js +14 -1
  11. package/dist/dashboard/pages/agent-detail/activity.js +17 -1
  12. package/dist/dashboard/pages/agent-detail/autonomy.js +17 -1
  13. package/dist/dashboard/pages/agent-detail/budget.js +25 -2
  14. package/dist/dashboard/pages/agent-detail/channels.js +10 -1
  15. package/dist/dashboard/pages/agent-detail/communication.js +10 -1
  16. package/dist/dashboard/pages/agent-detail/configuration.js +42 -1
  17. package/dist/dashboard/pages/agent-detail/deployment.js +147 -16
  18. package/dist/dashboard/pages/agent-detail/email.js +10 -1
  19. package/dist/dashboard/pages/agent-detail/guardrails.js +27 -3
  20. package/dist/dashboard/pages/agent-detail/manager.js +15 -1
  21. package/dist/dashboard/pages/agent-detail/meeting-browser.js +14 -2
  22. package/dist/dashboard/pages/agent-detail/memory.js +24 -5
  23. package/dist/dashboard/pages/agent-detail/overview.js +159 -21
  24. package/dist/dashboard/pages/agent-detail/permissions.js +28 -7
  25. package/dist/dashboard/pages/agent-detail/personal-details.js +17 -1
  26. package/dist/dashboard/pages/agent-detail/security.js +21 -5
  27. package/dist/dashboard/pages/agent-detail/skills-section.js +9 -1
  28. package/dist/dashboard/pages/agent-detail/tool-security.js +35 -8
  29. package/dist/dashboard/pages/agent-detail/tools.js +10 -1
  30. package/dist/dashboard/pages/agent-detail/whatsapp.js +11 -1
  31. package/dist/dashboard/pages/agent-detail/workforce.js +19 -4
  32. package/dist/dashboard/pages/agents.js +15 -1
  33. package/dist/dashboard/pages/approvals.js +15 -1
  34. package/dist/dashboard/pages/audit.js +23 -1
  35. package/dist/dashboard/pages/compliance.js +24 -2
  36. package/dist/dashboard/pages/dashboard.js +25 -6
  37. package/dist/dashboard/pages/dlp.js +23 -2
  38. package/dist/dashboard/pages/domain-status.js +51 -7
  39. package/dist/dashboard/pages/guardrails.js +29 -3
  40. package/dist/dashboard/pages/journal.js +24 -4
  41. package/dist/dashboard/pages/knowledge-contributions.js +69 -3
  42. package/dist/dashboard/pages/knowledge-import.js +6 -1
  43. package/dist/dashboard/pages/knowledge.js +51 -9
  44. package/dist/dashboard/pages/messages.js +28 -5
  45. package/dist/dashboard/pages/org-chart.js +18 -1
  46. package/dist/dashboard/pages/settings.js +30 -6
  47. package/dist/dashboard/pages/skill-connections.js +18 -4
  48. package/dist/dashboard/pages/skills.js +11 -1
  49. package/dist/dashboard/pages/task-pipeline.js +455 -0
  50. package/dist/dashboard/pages/users.js +14 -1
  51. package/dist/dashboard/pages/vault.js +22 -2
  52. package/dist/dashboard/pages/workforce.js +17 -1
  53. package/dist/index.js +3 -3
  54. package/dist/routes-KHABOHOV.js +13273 -0
  55. package/dist/runtime-6WFHCG3N.js +45 -0
  56. package/dist/server-BENJQHTB.js +15 -0
  57. package/dist/setup-7RQIFV5Y.js +20 -0
  58. package/package.json +1 -1
  59. package/src/dashboard/HELP-TOOLTIPS-GUIDE.md +45 -0
  60. package/src/dashboard/app.js +3 -0
  61. package/src/dashboard/components/icons.js +1 -0
  62. package/src/dashboard/pages/activity.js +14 -1
  63. package/src/dashboard/pages/agent-detail/activity.js +17 -1
  64. package/src/dashboard/pages/agent-detail/autonomy.js +17 -1
  65. package/src/dashboard/pages/agent-detail/budget.js +25 -2
  66. package/src/dashboard/pages/agent-detail/channels.js +10 -1
  67. package/src/dashboard/pages/agent-detail/communication.js +10 -1
  68. package/src/dashboard/pages/agent-detail/configuration.js +42 -1
  69. package/src/dashboard/pages/agent-detail/deployment.js +147 -16
  70. package/src/dashboard/pages/agent-detail/email.js +10 -1
  71. package/src/dashboard/pages/agent-detail/guardrails.js +27 -3
  72. package/src/dashboard/pages/agent-detail/manager.js +15 -1
  73. package/src/dashboard/pages/agent-detail/meeting-browser.js +14 -2
  74. package/src/dashboard/pages/agent-detail/memory.js +24 -5
  75. package/src/dashboard/pages/agent-detail/overview.js +159 -21
  76. package/src/dashboard/pages/agent-detail/permissions.js +28 -7
  77. package/src/dashboard/pages/agent-detail/personal-details.js +17 -1
  78. package/src/dashboard/pages/agent-detail/security.js +21 -5
  79. package/src/dashboard/pages/agent-detail/skills-section.js +9 -1
  80. package/src/dashboard/pages/agent-detail/tool-security.js +35 -8
  81. package/src/dashboard/pages/agent-detail/tools.js +10 -1
  82. package/src/dashboard/pages/agent-detail/whatsapp.js +11 -1
  83. package/src/dashboard/pages/agent-detail/workforce.js +19 -4
  84. package/src/dashboard/pages/agents.js +15 -1
  85. package/src/dashboard/pages/approvals.js +15 -1
  86. package/src/dashboard/pages/audit.js +23 -1
  87. package/src/dashboard/pages/compliance.js +24 -2
  88. package/src/dashboard/pages/dashboard.js +25 -6
  89. package/src/dashboard/pages/dlp.js +23 -2
  90. package/src/dashboard/pages/domain-status.js +51 -7
  91. package/src/dashboard/pages/guardrails.js +29 -3
  92. package/src/dashboard/pages/journal.js +24 -4
  93. package/src/dashboard/pages/knowledge-contributions.js +69 -3
  94. package/src/dashboard/pages/knowledge-import.js +6 -1
  95. package/src/dashboard/pages/knowledge.js +51 -9
  96. package/src/dashboard/pages/messages.js +28 -5
  97. package/src/dashboard/pages/org-chart.js +18 -1
  98. package/src/dashboard/pages/settings.js +30 -6
  99. package/src/dashboard/pages/skill-connections.js +18 -4
  100. package/src/dashboard/pages/skills.js +11 -1
  101. package/src/dashboard/pages/task-pipeline.js +455 -0
  102. package/src/dashboard/pages/users.js +14 -1
  103. package/src/dashboard/pages/vault.js +22 -2
  104. package/src/dashboard/pages/workforce.js +17 -1
  105. package/src/engine/model-fallback.ts +141 -0
  106. package/src/engine/routes.ts +5 -0
  107. package/src/engine/task-queue-after-spawn.ts +66 -0
  108. package/src/engine/task-queue-before-spawn.ts +109 -0
  109. package/src/engine/task-queue-routes.ts +133 -0
  110. package/src/engine/task-queue.ts +369 -0
@@ -3,6 +3,7 @@ import { I } from '../../components/icons.js';
3
3
  import { E } from '../../assets/icons/emoji-icons.js';
4
4
  import { Badge, EmptyState } from './shared.js?v=4';
5
5
  import { BrowserConfigCard, ToolRestrictionsCard } from './meeting-browser.js?v=4';
6
+ import { HelpButton } from '../../components/help-button.js';
6
7
 
7
8
  // ════════════════════════════════════════════════════════════
8
9
  // TOOL SECURITY SECTION
@@ -166,7 +167,15 @@ export function ToolsSection(props) {
166
167
  // Stats bar
167
168
  h('div', { style: { display: 'flex', gap: 16, marginBottom: 16, flexWrap: 'wrap', alignItems: 'center' } },
168
169
  h('div', { className: 'card', style: { padding: '12px 16px', flex: '1 1 auto', minWidth: 150 } },
169
- h('div', { style: { fontSize: 24, fontWeight: 700, color: 'var(--accent)' } }, stats.enabled || 0),
170
+ h('div', { style: { fontSize: 24, fontWeight: 700, color: 'var(--accent)', display: 'flex', alignItems: 'center' } }, stats.enabled || 0, h(HelpButton, { label: 'Tools' },
171
+ h('p', null, 'Tools are the individual functions an agent can call — like sending email, reading files, searching the web, or executing commands.'),
172
+ h('ul', { style: { paddingLeft: 20, margin: '4px 0 8px' } },
173
+ h('li', null, h('strong', null, 'Always On'), ' — Core tools that cannot be disabled (e.g., memory, basic utilities).'),
174
+ h('li', null, h('strong', null, 'OAuth Required'), ' — Tools that need an OAuth connection (e.g., Google Workspace).'),
175
+ h('li', null, h('strong', null, 'Integration'), ' — Tools requiring external service configuration.')
176
+ ),
177
+ h('div', { style: { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 } }, h('strong', null, 'Tip: '), 'Click any tool category to expand and see the individual tools it contains. Use the toggle to enable/disable entire categories at once.')
178
+ )),
170
179
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'of ' + (stats.total || 0) + ' tools enabled')
171
180
  ),
172
181
  h('div', { style: { display: 'flex', gap: 8 } },
@@ -1,5 +1,6 @@
1
1
  import { h, useState, useEffect, Fragment, useApp, engineCall } from '../../components/utils.js';
2
2
  import { E } from '../../assets/icons/emoji-icons.js';
3
+ import { HelpButton } from '../../components/help-button.js';
3
4
 
4
5
  // ─── Styles ───
5
6
  var card = { background: 'var(--bg-secondary)', borderRadius: '12px', padding: '24px', marginBottom: '16px', border: '1px solid var(--border)' };
@@ -775,7 +776,16 @@ export function WhatsAppSection(props) {
775
776
  h('div', { style: { display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '20px' } },
776
777
  E.whatsapp(28),
777
778
  h('div', null,
778
- h('h2', { style: { margin: 0, fontSize: '20px' } }, 'WhatsApp Business'),
779
+ h('h2', { style: { margin: 0, fontSize: '20px', display: 'flex', alignItems: 'center' } }, 'WhatsApp Business', h(HelpButton, { label: 'WhatsApp Business' },
780
+ h('p', null, 'Connect a dedicated business phone number for customer support. Customers message this number and your agent handles their queries automatically.'),
781
+ h('ul', { style: { paddingLeft: 20, margin: '4px 0 8px' } },
782
+ h('li', null, h('strong', null, 'Same number mode'), ' — Use your personal WhatsApp for both personal and business messages. The agent recognizes your manager number.'),
783
+ h('li', null, h('strong', null, 'Separate number'), ' — Dedicated business number. Personal WhatsApp stays private.'),
784
+ h('li', null, h('strong', null, 'Customer pairing'), ' — New customers get a code and await approval before chatting.'),
785
+ h('li', null, h('strong', null, 'Prompt injection protection'), ' — Customer messages are sandboxed to prevent manipulation.')
786
+ ),
787
+ h('div', { style: { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 } }, h('strong', null, 'Tip: '), 'Start with same-number mode for simplicity. Switch to a separate number when you need clear separation between personal and business messages.')
788
+ )),
779
789
  h('p', { style: { margin: 0, fontSize: '13px', color: 'var(--text-secondary)' } }, 'Connect a dedicated business number for customer support \u2014 separate from your personal WhatsApp')
780
790
  )
781
791
  ),
@@ -3,6 +3,7 @@ import { I } from '../../components/icons.js';
3
3
  import { E } from '../../assets/icons/emoji-icons.js';
4
4
  import { TimezoneSelect } from '../../components/timezones.js';
5
5
  import { Badge, StatCard, EmptyState, formatTime } from './shared.js?v=4';
6
+ import { HelpButton } from '../../components/help-button.js';
6
7
 
7
8
  // ════════════════════════════════════════════════════════════
8
9
  // WORKFORCE SECTION
@@ -212,7 +213,10 @@ export function WorkforceSection(props) {
212
213
  // ─── Status Card (Real-Time) ──────────────────────────
213
214
  h('div', { className: 'card', style: { marginBottom: 20 } },
214
215
  h('div', { className: 'card-header', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
215
- h('span', null, 'Agent Status'),
216
+ h('span', { style: { display: 'flex', alignItems: 'center' } }, 'Agent Status', h(HelpButton, { label: 'Agent Status' },
217
+ h('p', null, 'Real-time status of this agent. Shows whether the agent is online, idle, or has errors. Clock in/out controls the agent\'s work schedule.'),
218
+ h('div', { style: { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 } }, h('strong', null, 'Tip: '), 'Clock-in/out can be enforced by the schedule. When clocked out, the agent pauses or queues incoming work depending on off-hours settings.')
219
+ )),
216
220
  h('div', { style: { display: 'flex', gap: 8, alignItems: 'center' } },
217
221
  rtStatus && h('span', {
218
222
  className: 'badge badge-' + (rtStatus.status === 'online' ? 'success' : rtStatus.status === 'idle' ? 'info' : rtStatus.status === 'error' ? 'danger' : 'neutral'),
@@ -242,7 +246,14 @@ export function WorkforceSection(props) {
242
246
  // ─── Schedule Card ──────────────────────────────────
243
247
  h('div', { className: 'card', style: { marginBottom: 20 } },
244
248
  h('div', { className: 'card-header', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
245
- h('span', null, 'Schedule'),
249
+ h('span', { style: { display: 'flex', alignItems: 'center' } }, 'Schedule', h(HelpButton, { label: 'Schedule' },
250
+ h('p', null, 'Define when this agent is active. Supports standard hours (e.g., 9-5 M-F), shift patterns, or custom schedules.'),
251
+ h('ul', { style: { paddingLeft: 20, margin: '4px 0 8px' } },
252
+ h('li', null, h('strong', null, 'Enforce Clock-In/Out'), ' — Agent must be clocked in to work.'),
253
+ h('li', null, h('strong', null, 'Auto-Wake'), ' — Automatically start the agent at schedule start.'),
254
+ h('li', null, h('strong', null, 'Off-Hours Action'), ' — Pause, stop, or queue work outside schedule.')
255
+ )
256
+ )),
246
257
  !editing && h('button', { className: 'btn btn-ghost btn-sm', onClick: startEdit }, I.edit(), schedule ? ' Edit' : ' Configure')
247
258
  ),
248
259
  h('div', { className: 'card-body' },
@@ -392,7 +403,9 @@ export function WorkforceSection(props) {
392
403
  // ─── Task Queue ─────────────────────────────────────
393
404
  h('div', { className: 'card', style: { marginBottom: 20 } },
394
405
  h('div', { className: 'card-header', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
395
- h('span', null, 'Task Queue'),
406
+ h('span', { style: { display: 'flex', alignItems: 'center' } }, 'Task Queue', h(HelpButton, { label: 'Task Queue' },
407
+ h('p', null, 'Manually assign tasks to this agent. Tasks have priority (urgent/high/normal/low) and type (email/research/communication/general). The agent processes tasks based on priority order.')
408
+ )),
396
409
  h('button', { className: 'btn btn-primary btn-sm', onClick: function() { setShowAddTask(true); } }, I.plus(), ' Add Task')
397
410
  ),
398
411
  tasks.length > 0
@@ -457,7 +470,9 @@ export function WorkforceSection(props) {
457
470
 
458
471
  return h('div', { className: 'card', style: { marginBottom: 20 } },
459
472
  h('div', { className: 'card-header', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
460
- h('span', null, 'Clock History'),
473
+ h('span', { style: { display: 'flex', alignItems: 'center' } }, 'Clock History', h(HelpButton, { label: 'Clock History' },
474
+ h('p', null, 'Complete record of all clock-in and clock-out events for this agent. Useful for tracking work hours, debugging scheduling issues, and generating time reports. Click any record for details.')
475
+ )),
461
476
  h('span', { style: { fontSize: 12, color: 'var(--text-muted)' } }, totalFiltered + ' record' + (totalFiltered !== 1 ? 's' : ''))
462
477
  ),
463
478
  // Filters
@@ -2,6 +2,7 @@ import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall, engineC
2
2
  import { I } from '../components/icons.js';
3
3
  import { E } from '../assets/icons/emoji-icons.js';
4
4
  import { CULTURES, LANGUAGES, PersonaForm } from '../components/persona-fields.js';
5
+ import { HelpButton } from '../components/help-button.js';
5
6
 
6
7
  // ════════════════════════════════════════════════════════════
7
8
  // DEPLOY MODAL
@@ -1133,9 +1134,22 @@ export function AgentsPage({ onSelectAgent }) {
1133
1134
 
1134
1135
  // Delete moved to agent detail overview tab with triple confirmation
1135
1136
 
1137
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
1138
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
1139
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
1140
+
1136
1141
  return h(Fragment, null,
1137
1142
  h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 } },
1138
- h('div', null, h('h1', { style: { fontSize: 20, fontWeight: 700 } }, 'Agents'), h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Manage your AI agents — create, configure, deploy, and monitor')),
1143
+ h('div', null, h('h1', { style: { fontSize: 20, fontWeight: 700, display: 'flex', alignItems: 'center' } }, 'Agents', h(HelpButton, { label: 'Agents' },
1144
+ h('p', null, 'Your AI workforce. Each agent has its own email identity, personality, skills, permissions, and deployment target.'),
1145
+ h('h4', { style: _h4 }, 'Agent lifecycle'),
1146
+ h('ul', { style: _ul },
1147
+ h('li', null, h('strong', null, 'Create'), ' — Use the wizard to pick a role template, configure skills and permissions.'),
1148
+ h('li', null, h('strong', null, 'Deploy'), ' — Send the agent to Fly.io, Docker, Railway, VPS, or run locally.'),
1149
+ h('li', null, h('strong', null, 'Monitor'), ' — Click any agent to see their activity, emails, sessions, and journal.')
1150
+ ),
1151
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Click an agent\'s name to access their full detail page with logs, email, workforce schedule, and more.')
1152
+ )), h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Manage your AI agents — create, configure, deploy, and monitor')),
1139
1153
  h('button', { className: 'btn btn-primary', onClick: () => setCreating(true) }, I.plus(), ' Create Agent')
1140
1154
  ),
1141
1155
  creating && h(CreateAgentWizard, { onClose: () => setCreating(false), onCreated: load, toast }),
@@ -1,5 +1,6 @@
1
1
  import { h, useState, useEffect, Fragment, useApp, engineCall, showConfirm, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
+ import { HelpButton } from '../components/help-button.js';
3
4
 
4
5
  export function ApprovalsPage() {
5
6
  const { toast } = useApp();
@@ -27,9 +28,22 @@ export function ApprovalsPage() {
27
28
  } catch (e) { toast(e.message, 'error'); }
28
29
  };
29
30
 
31
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
32
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
33
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
34
+
30
35
  return h(Fragment, null,
31
36
  h('div', { style: { marginBottom: 20 } },
32
- h('h1', { style: { fontSize: 20, fontWeight: 700 } }, 'Approvals'),
37
+ h('h1', { style: { fontSize: 20, fontWeight: 700, display: 'flex', alignItems: 'center' } }, 'Approvals', h(HelpButton, { label: 'Approvals' },
38
+ h('p', null, 'The human-in-the-loop checkpoint. When agents attempt sensitive actions (based on your permission settings), they pause and wait for your approval here.'),
39
+ h('h4', { style: _h4 }, 'How it works'),
40
+ h('ul', { style: _ul },
41
+ h('li', null, h('strong', null, 'Agent triggers action'), ' — e.g., sending an email, deleting data, or making a financial call.'),
42
+ h('li', null, h('strong', null, 'Request appears here'), ' — with full context: which agent, what action, risk level.'),
43
+ h('li', null, h('strong', null, 'You decide'), ' — approve or reject. The agent resumes or aborts accordingly.')
44
+ ),
45
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Configure which actions require approval in each agent\'s Permissions settings. Start strict, then loosen as you build trust.')
46
+ )),
33
47
  h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Review and approve agent actions that require human oversight')
34
48
  ),
35
49
  h('div', { className: 'tabs' },
@@ -1,6 +1,7 @@
1
1
  import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
3
  import { DetailModal } from '../components/modal.js';
4
+ import { HelpButton } from '../components/help-button.js';
4
5
 
5
6
  var PAGE_SIZE = 50;
6
7
 
@@ -78,10 +79,31 @@ export function AuditPage() {
78
79
 
79
80
  var totalPages = Math.max(1, Math.ceil((total || (hasMore ? (page + 2) * PAGE_SIZE : (page + 1) * PAGE_SIZE)) / PAGE_SIZE));
80
81
 
82
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
83
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
84
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
85
+
81
86
  return h(Fragment, null,
82
87
  h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 } },
83
88
  h('div', null,
84
- h('h1', { style: { fontSize: 20, fontWeight: 700 } }, 'Audit Log'),
89
+ h('h1', { style: { fontSize: 20, fontWeight: 700, display: 'flex', alignItems: 'center' } }, 'Audit Log', h(HelpButton, { label: 'Audit Log' },
90
+ h('p', null, 'A tamper-evident record of every administrative action performed in your organization. Essential for security investigations, compliance audits, and change tracking.'),
91
+ h('h4', { style: _h4 }, 'What gets logged'),
92
+ h('ul', { style: _ul },
93
+ h('li', null, h('strong', null, 'User actions'), ' — logins, role changes, user creation/deletion.'),
94
+ h('li', null, h('strong', null, 'Agent changes'), ' — configuration updates, deployments, pauses, kills.'),
95
+ h('li', null, h('strong', null, 'Policy updates'), ' — guardrail rule changes, DLP rule modifications.'),
96
+ h('li', null, h('strong', null, 'System events'), ' — automated interventions, scheduled tasks.')
97
+ ),
98
+ h('h4', { style: _h4 }, 'Color coding'),
99
+ h('ul', { style: _ul },
100
+ h('li', null, h('strong', null, 'Green'), ' — Create/add actions.'),
101
+ h('li', null, h('strong', null, 'Red'), ' — Delete/remove/revoke actions.'),
102
+ h('li', null, h('strong', null, 'Yellow'), ' — Update/edit actions.'),
103
+ h('li', null, h('strong', null, 'Blue'), ' — Login/auth actions.')
104
+ ),
105
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use the filter box to search across actions, users, and targets. Click any row to see full details including IP address and metadata.')
106
+ )),
85
107
  h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Complete record of all administrative actions and changes')
86
108
  ),
87
109
  h('div', { style: { display: 'flex', gap: 8, alignItems: 'center' } },
@@ -1,5 +1,6 @@
1
1
  import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
+ import { HelpButton } from '../components/help-button.js';
3
4
 
4
5
  export function CompliancePage() {
5
6
  const { toast } = useApp();
@@ -34,14 +35,35 @@ export function CompliancePage() {
34
35
  window.open('/api/engine/compliance/reports/' + id + '/download?format=' + format, '_blank');
35
36
  };
36
37
 
38
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
39
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
40
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
41
+
37
42
  return h('div', { className: 'page-inner' },
38
- h('div', { className: 'page-header' }, h('h1', null, 'Compliance Reporting')),
43
+ h('div', { className: 'page-header' }, h('h1', { style: { display: 'flex', alignItems: 'center' } }, 'Compliance Reporting', h(HelpButton, { label: 'Compliance Reporting' },
44
+ h('p', null, 'Generate and manage compliance reports for regulatory frameworks. Supports SOC2 summaries, GDPR data exports, and audit summaries.'),
45
+ h('h4', { style: _h4 }, 'Report types'),
46
+ h('ul', { style: _ul },
47
+ h('li', null, h('strong', null, 'SOC2 Summary'), ' — Documents security controls, access patterns, and policy enforcement for SOC2 auditors.'),
48
+ h('li', null, h('strong', null, 'GDPR Export'), ' — Generates a data subject access report for a specific agent, showing all personal data processed.'),
49
+ h('li', null, h('strong', null, 'Audit Summary'), ' — Aggregated view of all administrative actions over a date range.')
50
+ ),
51
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Generate reports before compliance audits. Download in JSON for programmatic processing or CSV for spreadsheet review.')
52
+ ))),
39
53
  h('div', { className: 'tabs', style: { marginBottom: 16 } },
40
54
  ['reports', 'generate'].map(t => h('button', { key: t, className: 'tab' + (tab === t ? ' active' : ''), onClick: () => setTab(t) }, t.charAt(0).toUpperCase() + t.slice(1)))
41
55
  ),
42
56
  tab === 'generate' && h('div', { className: 'card' },
43
57
  h('div', { className: 'card-body' },
44
- h('h3', { style: { marginBottom: 16 } }, 'Generate Report'),
58
+ h('h3', { style: { marginBottom: 16, display: 'flex', alignItems: 'center' } }, 'Generate Report', h(HelpButton, { label: 'Generate Report' },
59
+ h('p', null, 'Create a new compliance report. Select the report type, date range, and optionally scope to a specific agent.'),
60
+ h('ul', { style: _ul },
61
+ h('li', null, 'SOC2 and Audit reports use a date range to scope the data.'),
62
+ h('li', null, 'GDPR exports require selecting a specific agent.'),
63
+ h('li', null, 'Reports are generated asynchronously and appear in the Reports tab when complete.')
64
+ ),
65
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'For SOC2 audits, generate monthly reports to maintain a continuous compliance record.')
66
+ )),
45
67
  h('label', { className: 'field-label' }, 'Report Type'),
46
68
  h('select', { className: 'input', value: form.type, onChange: e => setForm({ ...form, type: e.target.value }) }, h('option', { value: 'soc2' }, 'SOC2 Summary'), h('option', { value: 'gdpr' }, 'GDPR Export'), h('option', { value: 'audit' }, 'Audit Summary')),
47
69
  form.type !== 'gdpr' && h('div', { style: { display: 'flex', gap: 12, marginTop: 8 } },
@@ -1,6 +1,7 @@
1
1
  import { h, useState, useEffect, Fragment, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId, useApp, apiCall, engineCall } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
3
  import { DetailModal } from '../components/modal.js';
4
+ import { HelpButton } from '../components/help-button.js';
4
5
 
5
6
  export function SetupChecklist({ onNavigate }) {
6
7
  const [status, setStatus] = useState(null);
@@ -67,18 +68,33 @@ export function DashboardPage() {
67
68
  const agentData = buildAgentDataMap(mergedForMap);
68
69
  const { setPage: navTo } = useApp();
69
70
 
71
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
72
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
73
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
74
+
70
75
  return h(Fragment, null,
71
76
  h(SetupChecklist, { onNavigate: function(pg) { if (navTo) navTo(pg); } }),
72
77
  h('div', { className: 'stat-grid' },
73
- h('div', { className: 'stat-card' }, h('div', { className: 'stat-label' }, 'Total Agents'), h('div', { className: 'stat-value' }, stats?.totalAgents ?? agents.length ?? '-')),
74
- h('div', { className: 'stat-card' }, h('div', { className: 'stat-label' }, 'Active Agents'), h('div', { className: 'stat-value', style: { color: 'var(--success)' } }, (stats?.activeAgents ?? agents.filter(function(a) { return a.status === 'active'; }).length) || '-')),
75
- h('div', { className: 'stat-card' }, h('div', { className: 'stat-label' }, 'Users'), h('div', { className: 'stat-value' }, stats?.totalUsers ?? '-')),
76
- h('div', { className: 'stat-card' }, h('div', { className: 'stat-label' }, 'Audit Events'), h('div', { className: 'stat-value' }, stats?.totalAuditEvents ?? '-'))
78
+ h('div', { className: 'stat-card' }, h('div', { className: 'stat-label', style: { display: 'flex', alignItems: 'center' } }, 'Total Agents', h(HelpButton, { label: 'Total Agents' },
79
+ h('p', null, 'The total number of agents created in your organization, including active, paused, and archived agents.')
80
+ )), h('div', { className: 'stat-value' }, stats?.totalAgents ?? agents.length ?? '-')),
81
+ h('div', { className: 'stat-card' }, h('div', { className: 'stat-label', style: { display: 'flex', alignItems: 'center' } }, 'Active Agents', h(HelpButton, { label: 'Active Agents' },
82
+ h('p', null, 'Agents currently running and available to process tasks. If this is lower than Total Agents, some agents may be paused or archived.')
83
+ )), h('div', { className: 'stat-value', style: { color: 'var(--success)' } }, (stats?.activeAgents ?? agents.filter(function(a) { return a.status === 'active'; }).length) || '-')),
84
+ h('div', { className: 'stat-card' }, h('div', { className: 'stat-label', style: { display: 'flex', alignItems: 'center' } }, 'Users', h(HelpButton, { label: 'Users' },
85
+ h('p', null, 'Human team members with access to this dashboard. Manage users and invite team members from the Users page.')
86
+ )), h('div', { className: 'stat-value' }, stats?.totalUsers ?? '-')),
87
+ h('div', { className: 'stat-card' }, h('div', { className: 'stat-label', style: { display: 'flex', alignItems: 'center' } }, 'Audit Events', h(HelpButton, { label: 'Audit Events' },
88
+ h('p', null, 'Total logged events across all agents — tool calls, deployments, errors, etc. Visit the Activity page for full details.')
89
+ )), h('div', { className: 'stat-value' }, stats?.totalAuditEvents ?? '-'))
77
90
  ),
78
91
 
79
92
  h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 16 } },
80
93
  h('div', { className: 'card' },
81
- h('div', { className: 'card-header' }, h('h3', null, 'Agents'), h('button', { className: 'btn btn-sm btn-secondary', onClick: function() { navTo('agents'); } }, 'View all')),
94
+ h('div', { className: 'card-header' }, h('h3', { style: { display: 'flex', alignItems: 'center' } }, 'Agents', h(HelpButton, { label: 'Agents' },
95
+ h('p', null, 'A quick overview of your agents. Click "View all" to manage them — create new agents, configure skills, deploy, and monitor.'),
96
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Click an agent\'s name to see their full detail page with logs, email, sessions, and more.')
97
+ )), h('button', { className: 'btn btn-sm btn-secondary', onClick: function() { navTo('agents'); } }, 'View all')),
82
98
  h('div', { className: 'card-body-flush' },
83
99
  agents.length === 0
84
100
  ? h('div', { className: 'empty-state' }, h('h3', null, 'No agents yet'), h('p', null, 'Create your first agent to get started'))
@@ -96,7 +112,10 @@ export function DashboardPage() {
96
112
  ),
97
113
 
98
114
  h('div', { className: 'card' },
99
- h('div', { className: 'card-header' }, h('h3', null, 'Recent Activity'), h('button', { className: 'btn btn-sm btn-secondary', onClick: function() { navTo('activity'); } }, 'View all')),
115
+ h('div', { className: 'card-header' }, h('h3', { style: { display: 'flex', alignItems: 'center' } }, 'Recent Activity', h(HelpButton, { label: 'Recent Activity' },
116
+ h('p', null, 'The latest events across all agents — deployments, tool calls, errors, and status changes. Shows the 8 most recent events.'),
117
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Click any event to see its full details. Red badges indicate errors that may need attention.')
118
+ )), h('button', { className: 'btn btn-sm btn-secondary', onClick: function() { navTo('activity'); } }, 'View all')),
100
119
  h('div', { className: 'card-body' },
101
120
  events.length === 0
102
121
  ? h('div', { style: { textAlign: 'center', padding: 24, color: 'var(--text-muted)', fontSize: 13 } }, 'No activity yet')
@@ -1,5 +1,6 @@
1
1
  import { h, useState, useEffect, Fragment, useApp, engineCall, buildAgentEmailMap, buildAgentDataMap, resolveAgentEmail, renderAgentBadge, getOrgId } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
+ import { HelpButton } from '../components/help-button.js';
3
4
 
4
5
  export function DLPPage() {
5
6
  const { toast } = useApp();
@@ -36,8 +37,25 @@ export function DLPPage() {
36
37
 
37
38
  const severityColor = (s) => s === 'critical' ? 'var(--danger)' : s === 'high' ? 'var(--warning)' : s === 'medium' ? 'var(--info)' : 'var(--text-muted)';
38
39
 
40
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
41
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
42
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
43
+
39
44
  return h('div', { className: 'page-inner' },
40
- h('div', { className: 'page-header' }, h('h1', null, 'Data Loss Prevention'), h('button', { className: 'btn btn-primary', onClick: () => setShowModal(true) }, I.plus(), ' Add Rule')),
45
+ h('div', { className: 'page-header' }, h('h1', { style: { display: 'flex', alignItems: 'center' } }, 'Data Loss Prevention', h(HelpButton, { label: 'Data Loss Prevention' },
46
+ h('p', null, 'DLP prevents agents from accidentally leaking sensitive data like API keys, passwords, credit card numbers, or personal information in emails and tool outputs.'),
47
+ h('h4', { style: _h4 }, 'How it works'),
48
+ h('ul', { style: _ul },
49
+ h('li', null, h('strong', null, 'Rules'), ' — Define patterns (regex, keywords, or PII types) to detect sensitive data.'),
50
+ h('li', null, h('strong', null, 'Actions'), ' — Block, redact, warn, or log when a match is found.'),
51
+ h('li', null, h('strong', null, 'Violations'), ' — Every detection is logged for audit and investigation.')
52
+ ),
53
+ h('h4', { style: _h4 }, 'Built-in PII types'),
54
+ h('ul', { style: _ul },
55
+ h('li', null, 'email, ssn, credit_card, phone, api_key, aws_key')
56
+ ),
57
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use the Test tab to validate your rules against sample content before deploying them.')
58
+ )), h('button', { className: 'btn btn-primary', onClick: () => setShowModal(true) }, I.plus(), ' Add Rule')),
41
59
  h('div', { className: 'tabs', style: { marginBottom: 16 } },
42
60
  ['rules', 'violations', 'test'].map(t => h('button', { key: t, className: 'tab' + (tab === t ? ' active' : ''), onClick: () => setTab(t) }, t.charAt(0).toUpperCase() + t.slice(1)))
43
61
  ),
@@ -75,7 +93,10 @@ export function DLPPage() {
75
93
  ),
76
94
  tab === 'test' && h('div', { className: 'card' },
77
95
  h('div', { className: 'card-body' },
78
- h('h3', { style: { marginBottom: 12 } }, 'Test DLP Scan'),
96
+ h('h3', { style: { marginBottom: 12, display: 'flex', alignItems: 'center' } }, 'Test DLP Scan', h(HelpButton, { label: 'Test DLP Scan' },
97
+ h('p', null, 'Paste any content here to test it against all active DLP rules. Shows which rules match and how many times.'),
98
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Test with realistic data samples before deploying new rules to avoid false positives.')
99
+ )),
79
100
  h('textarea', { className: 'input', style: { minHeight: 100, marginBottom: 12 }, placeholder: 'Paste content to test against DLP rules...', value: testContent, onChange: (e) => setTestContent(e.target.value) }),
80
101
  h('button', { className: 'btn btn-primary', onClick: testScan }, 'Run Scan'),
81
102
  testResults && h('div', { style: { marginTop: 16 } },
@@ -1,6 +1,7 @@
1
1
  import { h, useState, useEffect, useCallback, Fragment, useApp, apiCall, showConfirm } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
3
  import { E } from '../assets/icons/emoji-icons.js';
4
+ import { HelpButton } from '../components/help-button.js';
4
5
 
5
6
  export function DomainStatusPage() {
6
7
  var { toast } = useApp();
@@ -165,6 +166,9 @@ export function DomainStatusPage() {
165
166
  var sub = data && data.subdomain;
166
167
 
167
168
  // ─── Styles ──────────────────────────────────
169
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
170
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
171
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
168
172
  var card = { padding: 24, background: 'var(--bg-secondary)', borderRadius: 'var(--radius-lg)', border: '1px solid var(--border)', marginBottom: 16 };
169
173
  var labelSt = { fontSize: 11, fontWeight: 700, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.8, marginBottom: 10 };
170
174
  var rowSt = { display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '10px 0', borderBottom: '1px solid var(--border)' };
@@ -172,7 +176,18 @@ export function DomainStatusPage() {
172
176
  return h(Fragment, null,
173
177
  // ─── Page Header ──────────────────────────────
174
178
  h('div', { style: { marginBottom: 24 } },
175
- h('h1', { style: { fontSize: 20, fontWeight: 700 } }, 'Domain & Deployment'),
179
+ h('h1', { style: { fontSize: 20, fontWeight: 700, display: 'flex', alignItems: 'center' } }, 'Domain & Deployment', h(HelpButton, { label: 'Domain & Deployment' },
180
+ h('p', null, 'Configure how your AgenticMail Enterprise instance is accessed on the internet. Set up subdomains, custom domains, CORS policies, and deployment tunnels.'),
181
+ h('h4', { style: _h4 }, 'Sections'),
182
+ h('ul', { style: _ul },
183
+ h('li', null, h('strong', null, 'Current Deployment'), ' — The URL where your dashboard is running right now.'),
184
+ h('li', null, h('strong', null, 'Subdomain'), ' — Your free agenticmail.io subdomain.'),
185
+ h('li', null, h('strong', null, 'Custom Domain'), ' — Use your own domain with DNS verification.'),
186
+ h('li', null, h('strong', null, 'CORS'), ' — Control which origins can make API requests.'),
187
+ h('li', null, h('strong', null, 'Migration'), ' — Move your deployment to another machine.')
188
+ ),
189
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'If running locally, use the "Deploy to Production" section to expose your instance via a Cloudflare Tunnel.')
190
+ )),
176
191
  h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Manage the domain and URL for your AgenticMail Enterprise deployment')
177
192
  ),
178
193
 
@@ -185,7 +200,10 @@ export function DomainStatusPage() {
185
200
  // SECTION 1: Current Deployment
186
201
  // ═══════════════════════════════════════════════
187
202
  h('div', { style: card },
188
- h('div', { style: labelSt }, 'Current Deployment'),
203
+ h('div', { style: Object.assign({}, labelSt, { display: 'flex', alignItems: 'center' }) }, 'Current Deployment', h(HelpButton, { label: 'Current Deployment' },
204
+ h('p', null, 'This shows the URL you\'re currently accessing the dashboard from. This is where your team and agents connect.'),
205
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Share this URL with your team. If it shows localhost, you\'ll need to set up a tunnel or deploy to a server for external access.')
206
+ )),
189
207
  h('div', { style: { padding: '14px 16px', background: 'var(--bg-primary)', borderRadius: 'var(--radius)', display: 'flex', alignItems: 'center', justifyContent: 'space-between', border: '1px solid var(--border)', marginBottom: 12 } },
190
208
  h('span', { style: { fontSize: 15, fontFamily: 'var(--font-mono, monospace)', color: 'var(--accent)', wordBreak: 'break-all' } }, actualUrl),
191
209
  h('button', { className: 'btn btn-sm', onClick: function() { navigator.clipboard.writeText(actualUrl); toast('Copied!', 'success'); } }, 'Copy')
@@ -200,7 +218,10 @@ export function DomainStatusPage() {
200
218
  // ═══════════════════════════════════════════════
201
219
  h('div', { style: card },
202
220
  h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 12 } },
203
- h('div', { style: labelSt }, 'AgenticMail Subdomain'),
221
+ h('div', { style: Object.assign({}, labelSt, { display: 'flex', alignItems: 'center' }) }, 'AgenticMail Subdomain', h(HelpButton, { label: 'AgenticMail Subdomain' },
222
+ h('p', null, 'A free subdomain on agenticmail.io (e.g., yourcompany.agenticmail.io). This gives you a public URL without needing your own domain.'),
223
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Changing the subdomain requires updating DNS records and any bookmarks or integrations that reference the old URL.')
224
+ )),
204
225
  !showEditSub && sub && h('button', { className: 'btn btn-sm', onClick: function() { setShowEditSub(true); setNewSub(sub || ''); setSubError(''); } }, 'Change')
205
226
  ),
206
227
 
@@ -268,7 +289,16 @@ export function DomainStatusPage() {
268
289
  h('div', { style: card },
269
290
  h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 16 } },
270
291
  h('div', null,
271
- h('div', { style: labelSt }, 'Custom Domain'),
292
+ h('div', { style: Object.assign({}, labelSt, { display: 'flex', alignItems: 'center' }) }, 'Custom Domain', h(HelpButton, { label: 'Custom Domain' },
293
+ h('p', null, 'Use your own domain (e.g., agents.yourcompany.com) for a professional, branded deployment. Requires DNS verification to prove ownership.'),
294
+ h('h4', { style: _h4 }, 'Setup Process'),
295
+ h('ul', { style: _ul },
296
+ h('li', null, h('strong', null, 'Register'), ' — Enter your domain and get DNS challenge records.'),
297
+ h('li', null, h('strong', null, 'Add DNS records'), ' — Add TXT (verification) and CNAME/A (routing) records at your DNS provider.'),
298
+ h('li', null, h('strong', null, 'Verify'), ' — Click "Verify DNS Now" once records propagate (up to 48 hours).')
299
+ ),
300
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use a subdomain like agents.yourcompany.com instead of the root domain — it\'s easier to set up and doesn\'t affect your main website.')
301
+ )),
272
302
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)', marginTop: -6 } }, 'Deploy on your own domain — either a subdomain (agents.yourcompany.com) or root domain (yourcompany.com)')
273
303
  )
274
304
  ),
@@ -399,7 +429,15 @@ export function DomainStatusPage() {
399
429
  // ═══════════════════════════════════════════════
400
430
  h('div', { style: card },
401
431
  h('div', { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 12 } },
402
- h('div', { style: labelSt }, 'Allowed Origins (CORS)'),
432
+ h('div', { style: Object.assign({}, labelSt, { display: 'flex', alignItems: 'center' }) }, 'Allowed Origins (CORS)', h(HelpButton, { label: 'Allowed Origins (CORS)' },
433
+ h('p', null, 'CORS (Cross-Origin Resource Sharing) controls which websites can make API requests to your AgenticMail server. This is a security measure to prevent unauthorized access.'),
434
+ h('h4', { style: _h4 }, 'What This Means'),
435
+ h('ul', { style: _ul },
436
+ h('li', null, h('strong', null, 'No origins listed'), ' — Any website can make API requests (open access). Fine for development, risky for production.'),
437
+ h('li', null, h('strong', null, 'Origins listed'), ' — Only those specific domains can make API requests.')
438
+ ),
439
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'CORS is auto-updated when you change your subdomain or custom domain. For manual control, go to Settings → Network & Firewall.')
440
+ )),
403
441
  h('a', { href: '/dashboard/settings#network', style: { fontSize: 12, color: 'var(--accent)', textDecoration: 'none', fontWeight: 500 } }, 'Manage in Settings \u2192')
404
442
  ),
405
443
  corsOrigins.length === 0
@@ -424,7 +462,10 @@ export function DomainStatusPage() {
424
462
  h('div', { style: { display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 } },
425
463
  h('span', { style: { fontSize: 20 } }, '\uD83D\uDCE6'),
426
464
  h('div', null,
427
- h('div', { style: { fontSize: 14, fontWeight: 700 } }, 'Migrate to Another Machine'),
465
+ h('div', { style: { fontSize: 14, fontWeight: 700, display: 'flex', alignItems: 'center' } }, 'Migrate to Another Machine', h(HelpButton, { label: 'Migration' },
466
+ h('p', null, 'Move your entire AgenticMail deployment to a different server or computer. All you need is the .env file — it contains all configuration and encryption keys.'),
467
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Always back up your .env file securely. Without the VAULT_KEY, encrypted credentials cannot be recovered.')
468
+ )),
428
469
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Move your entire deployment to a new server or computer')
429
470
  )
430
471
  ),
@@ -467,7 +508,10 @@ export function DomainStatusPage() {
467
508
  // CLI Reference
468
509
  // ═══════════════════════════════════════════════
469
510
  h('div', { style: card },
470
- h('div', { style: labelSt }, 'CLI Commands'),
511
+ h('div', { style: Object.assign({}, labelSt, { display: 'flex', alignItems: 'center' }) }, 'CLI Commands', h(HelpButton, { label: 'CLI Commands' },
512
+ h('p', null, 'Common command-line commands for managing your AgenticMail Enterprise installation. Run these in your terminal on the server where AgenticMail is installed.'),
513
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Use "npx @agenticmail/enterprise@latest" to always run the latest version without manually updating.')
514
+ )),
471
515
  h('div', { style: { display: 'grid', gap: 8 } },
472
516
  cliRow('Initial setup', 'npx @agenticmail/enterprise setup'),
473
517
  cliRow('Start server', 'npx @agenticmail/enterprise start'),
@@ -1,5 +1,6 @@
1
1
  import { h, useState, useEffect, useCallback, Fragment, useApp, engineCall, buildAgentEmailMap, resolveAgentEmail, buildAgentDataMap, renderAgentBadge, getOrgId } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
+ import { HelpButton } from '../components/help-button.js';
3
4
 
4
5
  // ─── Constants ──────────────────────────────────────────
5
6
 
@@ -111,8 +112,23 @@ export function GuardrailsPage() {
111
112
  { id: 'rules', label: 'Rules & Interventions' },
112
113
  ];
113
114
 
115
+ var _h4 = { marginTop: 16, marginBottom: 8, fontSize: 14 };
116
+ var _ul = { paddingLeft: 20, margin: '4px 0 8px' };
117
+ var _tip = { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 };
118
+
114
119
  return h('div', { className: 'page-inner' },
115
- h('div', { className: 'page-header' }, h('h1', null, 'Guardrails & Intervention')),
120
+ h('div', { className: 'page-header' }, h('h1', { style: { display: 'flex', alignItems: 'center' } }, 'Guardrails & Intervention', h(HelpButton, { label: 'Guardrails & Intervention' },
121
+ h('p', null, 'Central control panel for agent safety. Define policies agents must follow, configure automated rules that trigger interventions, manage onboarding, and inspect agent memory.'),
122
+ h('h4', { style: _h4 }, 'Tabs overview'),
123
+ h('ul', { style: _ul },
124
+ h('li', null, h('strong', null, 'Overview'), ' — Quick stats, agent controls (pause/resume/kill), onboarding status, and recent interventions.'),
125
+ h('li', null, h('strong', null, 'Policies'), ' — Define behavioral rules agents must acknowledge and follow.'),
126
+ h('li', null, h('strong', null, 'Onboarding'), ' — Track which agents have acknowledged org policies.'),
127
+ h('li', null, h('strong', null, 'Agent Memory'), ' — View and manage what agents remember.'),
128
+ h('li', null, h('strong', null, 'Rules & Interventions'), ' — Automated guardrail rules, anomaly detection, and intervention history.')
129
+ ),
130
+ h('div', { style: _tip }, h('strong', null, 'Tip: '), 'Start with the Overview tab for a quick health check, then drill into specific tabs for detailed management.')
131
+ ))),
116
132
  h('div', { className: 'tabs', style: { marginBottom: 16 } },
117
133
  TABS.map(function(t) { return h('button', { key: t.id, className: 'tab' + (activeTab === t.id ? ' active' : ''), onClick: function() { setTab(t.id); } }, t.label); })
118
134
  ),
@@ -208,7 +224,14 @@ function OverviewTab(props) {
208
224
  ),
209
225
  // Onboarding progress summary
210
226
  onboardingData.length > 0 && h('div', { className: 'card', style: { marginBottom: 16 } },
211
- h('div', { className: 'card-header' }, h('h3', null, 'Agent Onboarding Status')),
227
+ h('div', { className: 'card-header' }, h('h3', { style: { display: 'flex', alignItems: 'center' } }, 'Agent Onboarding Status', h(HelpButton, { label: 'Agent Onboarding Status' },
228
+ h('p', null, 'Shows which agents have acknowledged your organization\'s policies. Agents must complete onboarding before they can operate fully.'),
229
+ h('ul', { style: { paddingLeft: 20, margin: '4px 0 8px' } },
230
+ h('li', null, h('strong', null, 'Green'), ' — Completed all required policy acknowledgments.'),
231
+ h('li', null, h('strong', null, 'Yellow'), ' — In progress, some policies still pending.'),
232
+ h('li', null, h('strong', null, 'Red'), ' — Needs renewal due to policy changes.')
233
+ )
234
+ ))),
212
235
  h('div', { className: 'card-body' },
213
236
  onboardingData.slice(0, 8).map(function(ag) {
214
237
  var statusColor = ag.overallStatus === 'completed' ? '#10b981' : ag.overallStatus === 'in_progress' ? '#f59e0b' : ag.overallStatus === 'needs_renewal' ? '#ef4444' : '#64748b';
@@ -223,7 +246,10 @@ function OverviewTab(props) {
223
246
  ),
224
247
  // Recent interventions
225
248
  h('div', { className: 'card' },
226
- h('div', { className: 'card-header' }, h('h3', null, 'Recent Interventions')),
249
+ h('div', { className: 'card-header' }, h('h3', { style: { display: 'flex', alignItems: 'center' } }, 'Recent Interventions', h(HelpButton, { label: 'Recent Interventions' },
250
+ h('p', null, 'Log of recent agent interventions — pauses, kills, and resumes. Shows what happened, which agent was affected, and who triggered it.'),
251
+ h('div', { style: { marginTop: 12, padding: 12, background: 'var(--bg-secondary, #1e293b)', borderRadius: 'var(--radius, 8px)', fontSize: 13 } }, h('strong', null, 'Tip: '), 'If an agent was paused by an automated rule, you can resume it directly from the Actions column.')
252
+ ))),
227
253
  interventions.length === 0
228
254
  ? h(EmptyState, { message: 'No interventions recorded' })
229
255
  : h('table', { className: 'data-table' },