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.
- package/dist/ActivityPage.c48n83h2.js +3 -0
- package/dist/ApiDocsPage.yzcxx5ax.js +4 -0
- package/dist/App.09yb8t0b.js +1 -0
- package/dist/App.152mbs1r.js +4 -0
- package/dist/App.3a67nx9w.js +4 -0
- package/dist/App.9epx6785.js +4 -0
- package/dist/App.d8955awp.js +4 -0
- package/dist/App.drwb57jq.js +4 -0
- package/dist/App.gssbmajb.js +4 -0
- package/dist/App.qw70pc29.js +53 -0
- package/dist/App.qzbx5wtj.js +4 -0
- package/dist/App.r5serxkt.js +8 -0
- package/dist/App.tpmp9020.js +20 -0
- package/dist/App.v2wb4d7d.js +61 -0
- package/dist/App.vxmaaj0m.js +13 -0
- package/dist/App.w4p2tda9.js +4 -0
- package/dist/App.wv2ng55q.js +221 -0
- package/dist/App.yncnrn0f.js +4 -0
- package/dist/ConnectionsPage.k6cspyqq.js +3 -0
- package/dist/McpPage.cdxm48xj.js +3 -0
- package/dist/SettingsPage.evpv7c2y.js +3 -0
- package/dist/SkillsPage.pvzp6c1a.js +3 -0
- package/dist/TasksPage.6jnvbpsy.js +3 -0
- package/dist/TelemetryPage.t7vk24zc.js +3 -0
- package/dist/TestsPage.5x6658aa.js +3 -0
- package/dist/ThreadsPage.3fvhtevh.js +3 -0
- package/dist/apteva-kit.css +1 -1
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +10 -9
- package/src/crypto.ts +4 -3
- package/src/db.ts +171 -36
- package/src/integrations/agentdojo.ts +95 -12
- package/src/integrations/index.ts +7 -0
- package/src/mcp-platform.ts +870 -142
- package/src/openapi.ts +96 -0
- package/src/providers.ts +60 -34
- package/src/routes/api/agent-utils.ts +59 -47
- package/src/routes/api/agents.ts +71 -2
- package/src/routes/api/integrations.ts +11 -5
- package/src/routes/api/mcp.ts +5 -4
- package/src/routes/api/meta-agent.ts +37 -1
- package/src/routes/api/projects.ts +3 -3
- package/src/routes/api/providers.ts +121 -30
- package/src/routes/api/skills.ts +2 -3
- package/src/routes/api/system.ts +98 -14
- package/src/routes/api/telemetry.ts +19 -1
- package/src/routes/share.ts +85 -0
- package/src/server.ts +43 -32
- package/src/triggers/agentdojo.ts +2 -2
- package/src/web/App.tsx +107 -21
- package/src/web/components/activity/ActivityPage.tsx +242 -389
- package/src/web/components/agents/AgentCard.tsx +19 -27
- package/src/web/components/agents/AgentPanel.tsx +358 -198
- package/src/web/components/agents/AgentsView.tsx +4 -4
- package/src/web/components/agents/CreateAgentModal.tsx +21 -79
- package/src/web/components/api/ApiDocsPage.tsx +66 -66
- package/src/web/components/auth/CreateAccountStep.tsx +16 -16
- package/src/web/components/auth/LoginPage.tsx +10 -10
- package/src/web/components/common/Icons.tsx +8 -0
- package/src/web/components/common/LoadingSpinner.tsx +2 -2
- package/src/web/components/common/Modal.tsx +8 -8
- package/src/web/components/common/Select.tsx +11 -10
- package/src/web/components/connections/ConnectionsPage.tsx +4 -4
- package/src/web/components/connections/IntegrationsTab.tsx +18 -18
- package/src/web/components/connections/OverviewTab.tsx +13 -13
- package/src/web/components/connections/TriggersTab.tsx +99 -99
- package/src/web/components/dashboard/Dashboard.tsx +177 -52
- package/src/web/components/index.ts +1 -1
- package/src/web/components/layout/Header.tsx +50 -34
- package/src/web/components/layout/Sidebar.tsx +41 -16
- package/src/web/components/mcp/IntegrationsPanel.tsx +160 -69
- package/src/web/components/mcp/McpPage.tsx +218 -209
- package/src/web/components/meta-agent/MetaAgent.tsx +15 -11
- package/src/web/components/onboarding/OnboardingWizard.tsx +25 -25
- package/src/web/components/settings/SettingsPage.tsx +389 -221
- package/src/web/components/skills/SkillsPage.tsx +88 -88
- package/src/web/components/tasks/TasksPage.tsx +385 -68
- package/src/web/components/telemetry/TelemetryPage.tsx +294 -39
- package/src/web/components/tests/TestsPage.tsx +50 -50
- package/src/web/components/threads/ThreadsPage.tsx +315 -0
- package/src/web/context/AuthContext.tsx +3 -3
- package/src/web/context/ProjectContext.tsx +8 -3
- package/src/web/context/TelemetryContext.tsx +24 -6
- package/src/web/context/ThemeContext.tsx +69 -0
- package/src/web/context/index.ts +3 -1
- package/src/web/styles.css +25 -7
- package/src/web/themes.ts +99 -0
- package/src/web/types.ts +4 -7
- package/dist/ActivityPage.41nbye4r.js +0 -3
- package/dist/ApiDocsPage.4smnt8m3.js +0 -4
- package/dist/App.0sbax9et.js +0 -4
- package/dist/App.0ws427h8.js +0 -4
- package/dist/App.6q6bar8b.js +0 -4
- package/dist/App.80301vdb.js +0 -4
- package/dist/App.af2wg84v.js +0 -267
- package/dist/App.ca1rz1ph.js +0 -4
- package/dist/App.ensa6z0r.js +0 -4
- package/dist/App.f8g7tych.js +0 -13
- package/dist/App.mvtqv6qc.js +0 -20
- package/dist/App.ncgc9cxy.js +0 -4
- package/dist/App.p02f4ret.js +0 -1
- package/dist/App.p0fb1pds.js +0 -4
- package/dist/App.pmaq48sj.js +0 -4
- package/dist/App.yv87t9m5.js +0 -4
- package/dist/App.zjmfm8p6.js +0 -4
- package/dist/ConnectionsPage.anb3rv9a.js +0 -3
- package/dist/McpPage.y396h6fy.js +0 -3
- package/dist/SettingsPage.p1hc60gk.js +0 -3
- package/dist/SkillsPage.yj3xdsay.js +0 -3
- package/dist/TasksPage.sjv0khtv.js +0 -3
- package/dist/TelemetryPage.2qm4w16r.js +0 -3
- package/dist/TestsPage.zzs4qfj8.js +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useState, useEffect, useMemo, createContext, useContext, type ReactNode } from "react";
|
|
1
|
+
import React, { useState, useEffect, useMemo, useCallback, createContext, useContext, type ReactNode } from "react";
|
|
2
2
|
import { Chat } from "@apteva/apteva-kit";
|
|
3
|
-
import { useAuth, useProjects } from "../../context";
|
|
3
|
+
import { useAuth, useProjects, useTriggerRefresh, useTheme } from "../../context";
|
|
4
4
|
|
|
5
5
|
interface MetaAgentStatus {
|
|
6
6
|
enabled: boolean;
|
|
@@ -112,8 +112,8 @@ export function MetaAgentButton() {
|
|
|
112
112
|
onClick={ctx.toggle}
|
|
113
113
|
className={`hidden md:flex items-center gap-2 px-3 py-2 rounded transition ${
|
|
114
114
|
ctx.isOpen
|
|
115
|
-
? "bg-[
|
|
116
|
-
: "bg-[
|
|
115
|
+
? "bg-[var(--color-accent)] text-white"
|
|
116
|
+
: "bg-[var(--color-bg-secondary)] hover:bg-[var(--color-surface-raised)] text-[var(--color-text-secondary)] hover:text-white"
|
|
117
117
|
}`}
|
|
118
118
|
title="Apteva Assistant"
|
|
119
119
|
>
|
|
@@ -128,8 +128,10 @@ export function MetaAgentButton() {
|
|
|
128
128
|
|
|
129
129
|
// Chat panel component - renders as a right-side drawer
|
|
130
130
|
export function MetaAgentPanel() {
|
|
131
|
+
const { theme } = useTheme();
|
|
131
132
|
const ctx = useMetaAgent();
|
|
132
133
|
const { currentProjectId, currentProject } = useProjects();
|
|
134
|
+
const triggerRefresh = useTriggerRefresh();
|
|
133
135
|
if (!ctx?.isAvailable || !ctx.isOpen) return null;
|
|
134
136
|
|
|
135
137
|
const { agent, isRunning, error, isStarting, startAgent, close } = ctx;
|
|
@@ -156,16 +158,16 @@ export function MetaAgentPanel() {
|
|
|
156
158
|
/>
|
|
157
159
|
|
|
158
160
|
{/* Drawer Panel */}
|
|
159
|
-
<div className="hidden md:flex fixed top-0 right-0 h-full w-[480px] lg:w-[540px] bg-[
|
|
161
|
+
<div className="hidden md:flex fixed top-0 right-0 h-full w-[480px] lg:w-[540px] bg-[var(--color-bg)] border-l border-[var(--color-border)] shadow-2xl z-50 flex-col">
|
|
160
162
|
{/* Header */}
|
|
161
|
-
<div className="flex items-center justify-between px-4 py-3 border-b border-[
|
|
163
|
+
<div className="flex items-center justify-between px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-surface)]">
|
|
162
164
|
<div className="flex items-center gap-2">
|
|
163
|
-
<div className={`w-2 h-2 rounded-full ${isRunning ? "bg-green-400" : "bg-[
|
|
165
|
+
<div className={`w-2 h-2 rounded-full ${isRunning ? "bg-green-400" : "bg-[var(--color-scrollbar)]"}`} />
|
|
164
166
|
<span className="font-medium text-sm">Apteva Assistant</span>
|
|
165
167
|
</div>
|
|
166
168
|
<button
|
|
167
169
|
onClick={close}
|
|
168
|
-
className="text-[
|
|
170
|
+
className="text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition"
|
|
169
171
|
>
|
|
170
172
|
<CloseIcon />
|
|
171
173
|
</button>
|
|
@@ -179,14 +181,16 @@ export function MetaAgentPanel() {
|
|
|
179
181
|
apiUrl={`/api/agents/${agent!.id}`}
|
|
180
182
|
placeholder="Ask me anything about Apteva..."
|
|
181
183
|
variant="terminal"
|
|
184
|
+
theme={theme.id as "light" | "dark"}
|
|
182
185
|
showHeader={false}
|
|
183
186
|
context={chatContext}
|
|
187
|
+
onToolResult={triggerRefresh}
|
|
184
188
|
/>
|
|
185
189
|
) : (
|
|
186
190
|
<div className="flex-1 flex flex-col items-center justify-center p-6 text-center">
|
|
187
|
-
<AssistantIcon className="w-12 h-12 text-[
|
|
191
|
+
<AssistantIcon className="w-12 h-12 text-[var(--color-border-light)] mb-4" />
|
|
188
192
|
<h3 className="font-medium mb-2">Apteva Assistant</h3>
|
|
189
|
-
<p className="text-sm text-[
|
|
193
|
+
<p className="text-sm text-[var(--color-text-muted)] mb-6">
|
|
190
194
|
I can help you navigate Apteva, create agents, set up MCP servers, and more.
|
|
191
195
|
</p>
|
|
192
196
|
{error && (
|
|
@@ -195,7 +199,7 @@ export function MetaAgentPanel() {
|
|
|
195
199
|
<button
|
|
196
200
|
onClick={startAgent}
|
|
197
201
|
disabled={isStarting}
|
|
198
|
-
className="bg-[
|
|
202
|
+
className="bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-white px-6 py-2 rounded font-medium transition"
|
|
199
203
|
>
|
|
200
204
|
{isStarting ? "Starting..." : "Start Assistant"}
|
|
201
205
|
</button>
|
|
@@ -125,31 +125,31 @@ export function OnboardingWizard({ onComplete, needsAccount = false }: Onboardin
|
|
|
125
125
|
const currentStep = needsAccount ? step : step - 1;
|
|
126
126
|
|
|
127
127
|
return (
|
|
128
|
-
<div className="min-h-screen bg-[
|
|
128
|
+
<div className="min-h-screen bg-[var(--color-bg)] text-[var(--color-text)] font-mono flex items-center justify-center p-8">
|
|
129
129
|
<div className="w-full max-w-2xl">
|
|
130
130
|
{/* Logo */}
|
|
131
131
|
<div className="text-center mb-8">
|
|
132
132
|
<div className="flex items-center justify-center gap-2 mb-2">
|
|
133
|
-
<span className="text-[
|
|
133
|
+
<span className="text-[var(--color-accent)] text-3xl">>_</span>
|
|
134
134
|
<span className="text-3xl tracking-wider">apteva</span>
|
|
135
135
|
</div>
|
|
136
|
-
<p className="text-[
|
|
136
|
+
<p className="text-[var(--color-text-muted)]">Run AI agents locally</p>
|
|
137
137
|
</div>
|
|
138
138
|
|
|
139
139
|
{/* Progress */}
|
|
140
140
|
<div className="flex items-center justify-center gap-2 mb-8">
|
|
141
141
|
{needsAccount && (
|
|
142
142
|
<>
|
|
143
|
-
<div className={`w-3 h-3 rounded-full ${step >= 0 ? 'bg-[
|
|
144
|
-
<div className={`w-16 h-0.5 ${step >= 1 ? 'bg-[
|
|
143
|
+
<div className={`w-3 h-3 rounded-full ${step >= 0 ? 'bg-[var(--color-accent)]' : 'bg-[var(--color-surface-raised)]'}`} />
|
|
144
|
+
<div className={`w-16 h-0.5 ${step >= 1 ? 'bg-[var(--color-accent)]' : 'bg-[var(--color-surface-raised)]'}`} />
|
|
145
145
|
</>
|
|
146
146
|
)}
|
|
147
|
-
<div className={`w-3 h-3 rounded-full ${step >= 1 ? 'bg-[
|
|
148
|
-
<div className={`w-16 h-0.5 ${step >= 2 ? 'bg-[
|
|
149
|
-
<div className={`w-3 h-3 rounded-full ${step >= 2 ? 'bg-[
|
|
147
|
+
<div className={`w-3 h-3 rounded-full ${step >= 1 ? 'bg-[var(--color-accent)]' : 'bg-[var(--color-surface-raised)]'}`} />
|
|
148
|
+
<div className={`w-16 h-0.5 ${step >= 2 ? 'bg-[var(--color-accent)]' : 'bg-[var(--color-surface-raised)]'}`} />
|
|
149
|
+
<div className={`w-3 h-3 rounded-full ${step >= 2 ? 'bg-[var(--color-accent)]' : 'bg-[var(--color-surface-raised)]'}`} />
|
|
150
150
|
</div>
|
|
151
151
|
|
|
152
|
-
<div className="bg-[
|
|
152
|
+
<div className="bg-[var(--color-surface)] rounded-lg border border-[var(--color-border)] p-8">
|
|
153
153
|
{step === 0 && needsAccount && (
|
|
154
154
|
<CreateAccountStep onComplete={handleAccountCreated} />
|
|
155
155
|
)}
|
|
@@ -220,16 +220,16 @@ function Step1AddKeys({
|
|
|
220
220
|
return (
|
|
221
221
|
<>
|
|
222
222
|
<h2 className="text-2xl font-semibold mb-2">Add {selectedProviderData.name} Key</h2>
|
|
223
|
-
<p className="text-[
|
|
223
|
+
<p className="text-[var(--color-text-muted)] mb-6">
|
|
224
224
|
Enter your API key below. It will be encrypted and stored locally.
|
|
225
225
|
</p>
|
|
226
226
|
|
|
227
227
|
<div className="mb-6">
|
|
228
|
-
<div className="p-4 rounded border border-[
|
|
228
|
+
<div className="p-4 rounded border border-[var(--color-accent)] bg-[var(--color-accent-5)] mb-4">
|
|
229
229
|
<div className="flex items-center justify-between">
|
|
230
230
|
<div>
|
|
231
231
|
<p className="font-medium">{selectedProviderData.name}</p>
|
|
232
|
-
<p className="text-sm text-[
|
|
232
|
+
<p className="text-sm text-[var(--color-text-muted)]">
|
|
233
233
|
{selectedProviderData.models.length} models available
|
|
234
234
|
</p>
|
|
235
235
|
</div>
|
|
@@ -251,7 +251,7 @@ function Step1AddKeys({
|
|
|
251
251
|
onChange={e => onApiKeyChange(e.target.value)}
|
|
252
252
|
placeholder="Enter your API key..."
|
|
253
253
|
autoFocus
|
|
254
|
-
className="w-full bg-[
|
|
254
|
+
className="w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-4 py-3 focus:outline-none focus:border-[var(--color-accent)] text-lg"
|
|
255
255
|
/>
|
|
256
256
|
{error && <p className="text-red-400 text-sm">{error}</p>}
|
|
257
257
|
{success && <p className="text-green-400 text-sm">{success}</p>}
|
|
@@ -264,14 +264,14 @@ function Step1AddKeys({
|
|
|
264
264
|
onSelectProvider(null);
|
|
265
265
|
onApiKeyChange("");
|
|
266
266
|
}}
|
|
267
|
-
className="flex-1 border border-[
|
|
267
|
+
className="flex-1 border border-[var(--color-border-light)] hover:border-[var(--color-text-muted)] px-4 py-3 rounded font-medium transition"
|
|
268
268
|
>
|
|
269
269
|
Back
|
|
270
270
|
</button>
|
|
271
271
|
<button
|
|
272
272
|
onClick={onSaveKey}
|
|
273
273
|
disabled={!apiKey || saving}
|
|
274
|
-
className="flex-1 bg-[
|
|
274
|
+
className="flex-1 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition"
|
|
275
275
|
>
|
|
276
276
|
{testing ? "Testing..." : saving ? "Saving..." : "Save API Key"}
|
|
277
277
|
</button>
|
|
@@ -284,7 +284,7 @@ function Step1AddKeys({
|
|
|
284
284
|
return (
|
|
285
285
|
<>
|
|
286
286
|
<h2 className="text-2xl font-semibold mb-2">Welcome to apteva</h2>
|
|
287
|
-
<p className="text-[
|
|
287
|
+
<p className="text-[var(--color-text-muted)] mb-6">
|
|
288
288
|
To get started, you'll need to add at least one AI provider API key.
|
|
289
289
|
Your keys are encrypted and stored locally.
|
|
290
290
|
</p>
|
|
@@ -303,7 +303,7 @@ function Step1AddKeys({
|
|
|
303
303
|
<button
|
|
304
304
|
onClick={onContinue}
|
|
305
305
|
disabled={configuredProviders.length === 0}
|
|
306
|
-
className="w-full bg-[
|
|
306
|
+
className="w-full bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] disabled:opacity-50 disabled:cursor-not-allowed px-4 py-3 rounded font-medium transition"
|
|
307
307
|
>
|
|
308
308
|
{configuredProviders.length === 0
|
|
309
309
|
? "Add at least one API key to continue"
|
|
@@ -328,14 +328,14 @@ function ProviderCard({ provider, selected, onSelect }: ProviderCardProps) {
|
|
|
328
328
|
provider.hasKey
|
|
329
329
|
? 'border-green-500/30 bg-green-500/5'
|
|
330
330
|
: selected
|
|
331
|
-
? 'border-[
|
|
332
|
-
: 'border-[
|
|
331
|
+
? 'border-[var(--color-accent)] bg-[var(--color-accent-5)]'
|
|
332
|
+
: 'border-[var(--color-border-light)] hover:border-[var(--color-border-light)]'
|
|
333
333
|
}`}
|
|
334
334
|
>
|
|
335
335
|
<div className="flex items-center justify-between">
|
|
336
336
|
<div>
|
|
337
337
|
<p className="font-medium">{provider.name}</p>
|
|
338
|
-
<p className="text-sm text-[
|
|
338
|
+
<p className="text-sm text-[var(--color-text-muted)]">
|
|
339
339
|
{provider.models.length} models available
|
|
340
340
|
</p>
|
|
341
341
|
</div>
|
|
@@ -370,17 +370,17 @@ function Step2Complete({ configuredProviders, onAddMore, onComplete }: Step2Prop
|
|
|
370
370
|
return (
|
|
371
371
|
<>
|
|
372
372
|
<h2 className="text-2xl font-semibold mb-2">You're all set!</h2>
|
|
373
|
-
<p className="text-[
|
|
373
|
+
<p className="text-[var(--color-text-muted)] mb-6">
|
|
374
374
|
You've configured {configuredProviders.length} provider{configuredProviders.length > 1 ? 's' : ''}.
|
|
375
375
|
You can add more providers later in Settings.
|
|
376
376
|
</p>
|
|
377
377
|
|
|
378
378
|
<div className="space-y-2 mb-6">
|
|
379
379
|
{configuredProviders.map(provider => (
|
|
380
|
-
<div key={provider.id} className="flex items-center gap-3 p-3 bg-[
|
|
380
|
+
<div key={provider.id} className="flex items-center gap-3 p-3 bg-[var(--color-bg)] rounded">
|
|
381
381
|
<CheckIcon className="w-5 h-5 text-green-400" />
|
|
382
382
|
<span>{provider.name}</span>
|
|
383
|
-
<span className="text-[
|
|
383
|
+
<span className="text-[var(--color-text-muted)] text-sm">({provider.keyHint})</span>
|
|
384
384
|
</div>
|
|
385
385
|
))}
|
|
386
386
|
</div>
|
|
@@ -388,13 +388,13 @@ function Step2Complete({ configuredProviders, onAddMore, onComplete }: Step2Prop
|
|
|
388
388
|
<div className="flex gap-3">
|
|
389
389
|
<button
|
|
390
390
|
onClick={onAddMore}
|
|
391
|
-
className="flex-1 border border-[
|
|
391
|
+
className="flex-1 border border-[var(--color-border-light)] hover:border-[var(--color-accent)] px-4 py-3 rounded font-medium transition"
|
|
392
392
|
>
|
|
393
393
|
Add More
|
|
394
394
|
</button>
|
|
395
395
|
<button
|
|
396
396
|
onClick={onComplete}
|
|
397
|
-
className="flex-1 bg-[
|
|
397
|
+
className="flex-1 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-black px-4 py-3 rounded font-medium transition"
|
|
398
398
|
>
|
|
399
399
|
Start Using apteva
|
|
400
400
|
</button>
|