apteva 0.4.32 → 0.4.44

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 (113) hide show
  1. package/dist/ActivityPage.c48n83h2.js +3 -0
  2. package/dist/ApiDocsPage.yzcxx5ax.js +4 -0
  3. package/dist/App.09yb8t0b.js +1 -0
  4. package/dist/App.152mbs1r.js +4 -0
  5. package/dist/App.3a67nx9w.js +4 -0
  6. package/dist/App.9epx6785.js +4 -0
  7. package/dist/App.d8955awp.js +4 -0
  8. package/dist/App.drwb57jq.js +4 -0
  9. package/dist/App.gssbmajb.js +4 -0
  10. package/dist/App.qw70pc29.js +53 -0
  11. package/dist/App.qzbx5wtj.js +4 -0
  12. package/dist/App.r5serxkt.js +8 -0
  13. package/dist/App.tpmp9020.js +20 -0
  14. package/dist/App.v2wb4d7d.js +61 -0
  15. package/dist/App.vxmaaj0m.js +13 -0
  16. package/dist/App.w4p2tda9.js +4 -0
  17. package/dist/App.wv2ng55q.js +221 -0
  18. package/dist/App.yncnrn0f.js +4 -0
  19. package/dist/ConnectionsPage.k6cspyqq.js +3 -0
  20. package/dist/McpPage.cdxm48xj.js +3 -0
  21. package/dist/SettingsPage.evpv7c2y.js +3 -0
  22. package/dist/SkillsPage.pvzp6c1a.js +3 -0
  23. package/dist/TasksPage.6jnvbpsy.js +3 -0
  24. package/dist/TelemetryPage.t7vk24zc.js +3 -0
  25. package/dist/TestsPage.5x6658aa.js +3 -0
  26. package/dist/ThreadsPage.3fvhtevh.js +3 -0
  27. package/dist/apteva-kit.css +1 -1
  28. package/dist/index.html +1 -1
  29. package/dist/styles.css +1 -1
  30. package/package.json +10 -9
  31. package/src/crypto.ts +4 -3
  32. package/src/db.ts +171 -36
  33. package/src/integrations/agentdojo.ts +95 -12
  34. package/src/integrations/index.ts +7 -0
  35. package/src/mcp-platform.ts +870 -142
  36. package/src/openapi.ts +96 -0
  37. package/src/providers.ts +60 -34
  38. package/src/routes/api/agent-utils.ts +59 -47
  39. package/src/routes/api/agents.ts +71 -2
  40. package/src/routes/api/integrations.ts +11 -5
  41. package/src/routes/api/mcp.ts +5 -4
  42. package/src/routes/api/meta-agent.ts +37 -1
  43. package/src/routes/api/projects.ts +3 -3
  44. package/src/routes/api/providers.ts +121 -30
  45. package/src/routes/api/skills.ts +2 -3
  46. package/src/routes/api/system.ts +98 -14
  47. package/src/routes/api/telemetry.ts +19 -1
  48. package/src/routes/share.ts +85 -0
  49. package/src/server.ts +43 -32
  50. package/src/triggers/agentdojo.ts +2 -2
  51. package/src/web/App.tsx +107 -21
  52. package/src/web/components/activity/ActivityPage.tsx +242 -389
  53. package/src/web/components/agents/AgentCard.tsx +19 -27
  54. package/src/web/components/agents/AgentPanel.tsx +358 -198
  55. package/src/web/components/agents/AgentsView.tsx +4 -4
  56. package/src/web/components/agents/CreateAgentModal.tsx +21 -79
  57. package/src/web/components/api/ApiDocsPage.tsx +66 -66
  58. package/src/web/components/auth/CreateAccountStep.tsx +16 -16
  59. package/src/web/components/auth/LoginPage.tsx +10 -10
  60. package/src/web/components/common/Icons.tsx +8 -0
  61. package/src/web/components/common/LoadingSpinner.tsx +2 -2
  62. package/src/web/components/common/Modal.tsx +8 -8
  63. package/src/web/components/common/Select.tsx +11 -10
  64. package/src/web/components/connections/ConnectionsPage.tsx +4 -4
  65. package/src/web/components/connections/IntegrationsTab.tsx +18 -18
  66. package/src/web/components/connections/OverviewTab.tsx +13 -13
  67. package/src/web/components/connections/TriggersTab.tsx +99 -99
  68. package/src/web/components/dashboard/Dashboard.tsx +177 -52
  69. package/src/web/components/index.ts +1 -1
  70. package/src/web/components/layout/Header.tsx +50 -34
  71. package/src/web/components/layout/Sidebar.tsx +41 -16
  72. package/src/web/components/mcp/IntegrationsPanel.tsx +160 -69
  73. package/src/web/components/mcp/McpPage.tsx +218 -209
  74. package/src/web/components/meta-agent/MetaAgent.tsx +15 -11
  75. package/src/web/components/onboarding/OnboardingWizard.tsx +25 -25
  76. package/src/web/components/settings/SettingsPage.tsx +389 -221
  77. package/src/web/components/skills/SkillsPage.tsx +88 -88
  78. package/src/web/components/tasks/TasksPage.tsx +385 -68
  79. package/src/web/components/telemetry/TelemetryPage.tsx +294 -39
  80. package/src/web/components/tests/TestsPage.tsx +50 -50
  81. package/src/web/components/threads/ThreadsPage.tsx +315 -0
  82. package/src/web/context/AuthContext.tsx +3 -3
  83. package/src/web/context/ProjectContext.tsx +8 -3
  84. package/src/web/context/TelemetryContext.tsx +24 -6
  85. package/src/web/context/ThemeContext.tsx +69 -0
  86. package/src/web/context/index.ts +3 -1
  87. package/src/web/styles.css +25 -7
  88. package/src/web/themes.ts +99 -0
  89. package/src/web/types.ts +4 -7
  90. package/dist/ActivityPage.41nbye4r.js +0 -3
  91. package/dist/ApiDocsPage.4smnt8m3.js +0 -4
  92. package/dist/App.0sbax9et.js +0 -4
  93. package/dist/App.0ws427h8.js +0 -4
  94. package/dist/App.6q6bar8b.js +0 -4
  95. package/dist/App.80301vdb.js +0 -4
  96. package/dist/App.af2wg84v.js +0 -267
  97. package/dist/App.ca1rz1ph.js +0 -4
  98. package/dist/App.ensa6z0r.js +0 -4
  99. package/dist/App.f8g7tych.js +0 -13
  100. package/dist/App.mvtqv6qc.js +0 -20
  101. package/dist/App.ncgc9cxy.js +0 -4
  102. package/dist/App.p02f4ret.js +0 -1
  103. package/dist/App.p0fb1pds.js +0 -4
  104. package/dist/App.pmaq48sj.js +0 -4
  105. package/dist/App.yv87t9m5.js +0 -4
  106. package/dist/App.zjmfm8p6.js +0 -4
  107. package/dist/ConnectionsPage.anb3rv9a.js +0 -3
  108. package/dist/McpPage.y396h6fy.js +0 -3
  109. package/dist/SettingsPage.p1hc60gk.js +0 -3
  110. package/dist/SkillsPage.yj3xdsay.js +0 -3
  111. package/dist/TasksPage.sjv0khtv.js +0 -3
  112. package/dist/TelemetryPage.2qm4w16r.js +0 -3
  113. package/dist/TestsPage.zzs4qfj8.js +0 -3
@@ -1,6 +1,6 @@
1
- import React, { useState, useEffect } from "react";
1
+ import React from "react";
2
2
  import { MemoryIcon, TasksIcon, VisionIcon, OperatorIcon, McpIcon, RealtimeIcon, FilesIcon, MultiAgentIcon, SkillsIcon, ActivityIcon } from "../common/Icons";
3
- import { useAgentActivity, useProjects, useAuth } from "../../context";
3
+ import { useAgentActivity, useProjects } from "../../context";
4
4
  import type { Agent, AgentFeatures } from "../../types";
5
5
 
6
6
  interface AgentCardProps {
@@ -22,41 +22,33 @@ const FEATURE_ICONS: { key: keyof AgentFeatures; icon: React.ComponentType<{ cla
22
22
  { key: "agents", icon: MultiAgentIcon, label: "Multi-Agent" },
23
23
  ];
24
24
 
25
- export function AgentCard({ agent, selected, onSelect, onToggle, showProject }: AgentCardProps) {
25
+ export const AgentCard = React.memo(function AgentCard({ agent, selected, onSelect, onToggle, showProject }: AgentCardProps) {
26
26
  const enabledFeatures = FEATURE_ICONS.filter(f => agent.features?.[f.key]);
27
27
  const mcpServers = agent.mcpServerDetails || [];
28
28
  const skills = agent.skillDetails || [];
29
29
  const { isActive, label: activityLabel } = useAgentActivity(agent.id);
30
30
  const { projects } = useProjects();
31
- const { authFetch } = useAuth();
32
31
  const project = agent.projectId ? projects.find(p => p.id === agent.projectId) : null;
33
- const [subscriptions, setSubscriptions] = useState<{ id: string; trigger_slug: string; enabled: boolean }[]>([]);
34
-
35
- useEffect(() => {
36
- authFetch(`/api/subscriptions?agent_id=${agent.id}`)
37
- .then(res => res.ok ? res.json() : { subscriptions: [] })
38
- .then(data => setSubscriptions(data.subscriptions || []))
39
- .catch(() => {});
40
- }, [agent.id, authFetch]);
32
+ const subscriptions = agent.subscriptions || [];
41
33
 
42
34
  return (
43
35
  <div
44
36
  onClick={onSelect}
45
- className={`bg-[#111] rounded p-5 border transition cursor-pointer flex flex-col h-full ${
37
+ className={`bg-[var(--color-surface)] rounded p-5 border transition cursor-pointer flex flex-col h-full ${
46
38
  selected
47
- ? 'border-[#f97316]'
48
- : 'border-[#1a1a1a] hover:border-[#333]'
39
+ ? 'border-[var(--color-accent)]'
40
+ : 'border-[var(--color-border)] hover:border-[var(--color-border-light)]'
49
41
  }`}
50
42
  >
51
43
  <div className="flex items-start justify-between mb-3">
52
44
  <div>
53
45
  <h3 className="font-semibold text-lg">{agent.name}</h3>
54
- <p className="text-sm text-[#666]">
46
+ <p className="text-sm text-[var(--color-text-muted)]">
55
47
  {agent.provider} / {agent.model}
56
- {agent.port && <span className="text-[#444]"> · :{agent.port}</span>}
48
+ {agent.port && <span className="text-[var(--color-text-faint)]"> · :{agent.port}</span>}
57
49
  </p>
58
50
  {showProject && project && (
59
- <p className="text-sm text-[#666] flex items-center gap-1.5 mt-1">
51
+ <p className="text-sm text-[var(--color-text-muted)] flex items-center gap-1.5 mt-1">
60
52
  <span className="w-2 h-2 rounded-full" style={{ backgroundColor: project.color }} />
61
53
  {project.name}
62
54
  </p>
@@ -70,7 +62,7 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
70
62
  {enabledFeatures.map(({ key, icon: Icon, label }) => (
71
63
  <span
72
64
  key={key}
73
- className="inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs"
65
+ className="inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[var(--color-accent-10)] text-[var(--color-accent-70)] text-xs"
74
66
  title={label}
75
67
  >
76
68
  <Icon className="w-3 h-3" />
@@ -92,7 +84,7 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
92
84
  className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${
93
85
  isAvailable
94
86
  ? "bg-green-500/10 text-green-400"
95
- : "bg-[#222] text-[#666]"
87
+ : "bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]"
96
88
  }`}
97
89
  title={`MCP: ${server.name} (${isAvailable ? "available" : server.status})`}
98
90
  >
@@ -113,7 +105,7 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
113
105
  className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${
114
106
  skill.enabled
115
107
  ? "bg-purple-500/10 text-purple-400"
116
- : "bg-[#222] text-[#666]"
108
+ : "bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]"
117
109
  }`}
118
110
  title={`Skill: ${skill.name} v${skill.version}`}
119
111
  >
@@ -133,7 +125,7 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
133
125
  className={`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${
134
126
  sub.enabled
135
127
  ? "bg-cyan-500/10 text-cyan-400"
136
- : "bg-[#222] text-[#666]"
128
+ : "bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]"
137
129
  }`}
138
130
  title={`Trigger: ${sub.trigger_slug.replace(/_/g, " ")}`}
139
131
  >
@@ -144,7 +136,7 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
144
136
  </div>
145
137
  )}
146
138
 
147
- <p className="text-sm text-[#666] line-clamp-2 mb-4 flex-1">
139
+ <p className="text-sm text-[var(--color-text-muted)] line-clamp-2 mb-4 flex-1">
148
140
  {agent.systemPrompt}
149
141
  </p>
150
142
 
@@ -153,9 +145,9 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
153
145
  disabled={agent.status === "starting" || agent.status === "stopping"}
154
146
  className={`w-full px-3 py-1.5 rounded text-sm font-medium transition mt-auto ${
155
147
  agent.status === "starting" || agent.status === "stopping"
156
- ? "bg-[#333] text-[#666] cursor-wait"
148
+ ? "bg-[var(--color-surface-raised)] text-[var(--color-text-muted)] cursor-wait"
157
149
  : agent.status === "running"
158
- ? "bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30"
150
+ ? "bg-red-500/15 text-red-500 hover:bg-red-500/25 border border-red-500/20"
159
151
  : "bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"
160
152
  }`}
161
153
  >
@@ -163,7 +155,7 @@ export function AgentCard({ agent, selected, onSelect, onToggle, showProject }:
163
155
  </button>
164
156
  </div>
165
157
  );
166
- }
158
+ });
167
159
 
168
160
  function StatusBadge({ status, isActive, activityLabel }: { status: Agent["status"]; isActive?: boolean; activityLabel?: string }) {
169
161
  if (status === "running" && isActive && activityLabel) {
@@ -183,7 +175,7 @@ function StatusBadge({ status, isActive, activityLabel }: { status: Agent["statu
183
175
  ? "bg-yellow-500/20 text-yellow-400 animate-pulse"
184
176
  : status === "running"
185
177
  ? "bg-[#3b82f6]/20 text-[#3b82f6]"
186
- : "bg-[#333] text-[#666]"
178
+ : "bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]"
187
179
  }`}
188
180
  >
189
181
  {status}