apteva 0.4.57 → 0.7.0
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/README.md +216 -54
- package/cli.js +35 -0
- package/install.js +92 -0
- package/package.json +12 -79
- package/LICENSE +0 -63
- package/bin/apteva.js +0 -196
- package/dist/ActivityPage.kxzzb4yc.js +0 -3
- package/dist/ApiDocsPage.zq998hbm.js +0 -4
- package/dist/App.55rea8mn.js +0 -61
- package/dist/App.5ywb23z4.js +0 -53
- package/dist/App.6thds120.js +0 -4
- package/dist/App.9tctxzqm.js +0 -8
- package/dist/App.a8r8ttaz.js +0 -4
- package/dist/App.agsv5bje.js +0 -4
- package/dist/App.cepapqmx.js +0 -4
- package/dist/App.dp041gb3.js +0 -221
- package/dist/App.fds72zb5.js +0 -4
- package/dist/App.fg9qj2dq.js +0 -4
- package/dist/App.ndfejbm9.js +0 -4
- package/dist/App.nxmfmq1h.js +0 -13
- package/dist/App.qdfyt8ba.js +0 -4
- package/dist/App.x2d0ygt6.js +0 -4
- package/dist/App.yt9p4nr3.js +0 -20
- package/dist/App.zn4mw16t.js +0 -1
- package/dist/ConnectionsPage.8r96ryw7.js +0 -3
- package/dist/McpPage.3cwh0gnd.js +0 -3
- package/dist/SettingsPage.ykgdh5ev.js +0 -3
- package/dist/SkillsPage.4np1s65b.js +0 -3
- package/dist/TasksPage.4g08t7p6.js +0 -3
- package/dist/TelemetryPage.72w9pwcp.js +0 -3
- package/dist/TestsPage.z4fk3r7r.js +0 -3
- package/dist/ThreadsPage.63tcajeh.js +0 -3
- package/dist/apteva-kit.css +0 -1
- package/dist/icon.png +0 -0
- package/dist/index.html +0 -16
- package/dist/styles.css +0 -1
- package/scripts/postinstall.mjs +0 -102
- package/src/auth/index.ts +0 -394
- package/src/auth/middleware.ts +0 -213
- package/src/binary.ts +0 -536
- package/src/channels/index.ts +0 -40
- package/src/channels/telegram.ts +0 -311
- package/src/crypto.ts +0 -301
- package/src/db-tests.ts +0 -174
- package/src/db.ts +0 -3133
- package/src/integrations/agentdojo.ts +0 -559
- package/src/integrations/composio.ts +0 -437
- package/src/integrations/index.ts +0 -87
- package/src/integrations/skillsmp.ts +0 -318
- package/src/mcp-client.ts +0 -605
- package/src/mcp-handler.ts +0 -394
- package/src/mcp-platform.ts +0 -2403
- package/src/openapi.ts +0 -2410
- package/src/providers.ts +0 -597
- package/src/routes/api/agent-utils.ts +0 -890
- package/src/routes/api/agents.ts +0 -916
- package/src/routes/api/api-keys.ts +0 -95
- package/src/routes/api/channels.ts +0 -182
- package/src/routes/api/helpers.ts +0 -12
- package/src/routes/api/integrations.ts +0 -639
- package/src/routes/api/mcp.ts +0 -574
- package/src/routes/api/meta-agent.ts +0 -195
- package/src/routes/api/projects.ts +0 -112
- package/src/routes/api/providers.ts +0 -424
- package/src/routes/api/skills.ts +0 -537
- package/src/routes/api/system.ts +0 -333
- package/src/routes/api/telemetry.ts +0 -203
- package/src/routes/api/tests.ts +0 -148
- package/src/routes/api/triggers.ts +0 -518
- package/src/routes/api/users.ts +0 -148
- package/src/routes/api/webhooks.ts +0 -171
- package/src/routes/api.ts +0 -53
- package/src/routes/auth.ts +0 -251
- package/src/routes/share.ts +0 -86
- package/src/routes/static.ts +0 -131
- package/src/server.ts +0 -642
- package/src/test-runner.ts +0 -598
- package/src/triggers/agentdojo.ts +0 -253
- package/src/triggers/composio.ts +0 -264
- package/src/triggers/index.ts +0 -71
- package/src/tui/AgentList.tsx +0 -145
- package/src/tui/App.tsx +0 -102
- package/src/tui/Login.tsx +0 -104
- package/src/tui/api.ts +0 -72
- package/src/tui/index.tsx +0 -7
- package/src/web/App.tsx +0 -455
- package/src/web/components/activity/ActivityPage.tsx +0 -314
- package/src/web/components/activity/index.ts +0 -1
- package/src/web/components/agents/AgentCard.tsx +0 -189
- package/src/web/components/agents/AgentPanel.tsx +0 -2244
- package/src/web/components/agents/AgentsView.tsx +0 -180
- package/src/web/components/agents/CreateAgentModal.tsx +0 -475
- package/src/web/components/agents/index.ts +0 -4
- package/src/web/components/api/ApiDocsPage.tsx +0 -842
- package/src/web/components/auth/CreateAccountStep.tsx +0 -176
- package/src/web/components/auth/LoginPage.tsx +0 -91
- package/src/web/components/auth/index.ts +0 -2
- package/src/web/components/common/Icons.tsx +0 -250
- package/src/web/components/common/LoadingSpinner.tsx +0 -44
- package/src/web/components/common/Modal.tsx +0 -199
- package/src/web/components/common/Select.tsx +0 -97
- package/src/web/components/common/index.ts +0 -20
- package/src/web/components/connections/ConnectionsPage.tsx +0 -54
- package/src/web/components/connections/IntegrationsTab.tsx +0 -170
- package/src/web/components/connections/OverviewTab.tsx +0 -137
- package/src/web/components/connections/TriggersTab.tsx +0 -1346
- package/src/web/components/dashboard/Dashboard.tsx +0 -572
- package/src/web/components/dashboard/index.ts +0 -1
- package/src/web/components/index.ts +0 -21
- package/src/web/components/layout/ErrorBanner.tsx +0 -18
- package/src/web/components/layout/Header.tsx +0 -332
- package/src/web/components/layout/Sidebar.tsx +0 -231
- package/src/web/components/layout/index.ts +0 -3
- package/src/web/components/mcp/IntegrationsPanel.tsx +0 -857
- package/src/web/components/mcp/McpPage.tsx +0 -2515
- package/src/web/components/mcp/index.ts +0 -1
- package/src/web/components/meta-agent/MetaAgent.tsx +0 -245
- package/src/web/components/onboarding/OnboardingWizard.tsx +0 -404
- package/src/web/components/onboarding/index.ts +0 -1
- package/src/web/components/settings/SettingsPage.tsx +0 -2776
- package/src/web/components/settings/index.ts +0 -1
- package/src/web/components/skills/SkillsPage.tsx +0 -1200
- package/src/web/components/tasks/TasksPage.tsx +0 -1116
- package/src/web/components/tasks/index.ts +0 -1
- package/src/web/components/telemetry/TelemetryPage.tsx +0 -1129
- package/src/web/components/tests/TestsPage.tsx +0 -594
- package/src/web/components/threads/ThreadsPage.tsx +0 -315
- package/src/web/context/AuthContext.tsx +0 -242
- package/src/web/context/ProjectContext.tsx +0 -214
- package/src/web/context/TelemetryContext.tsx +0 -299
- package/src/web/context/ThemeContext.tsx +0 -90
- package/src/web/context/UIModeContext.tsx +0 -49
- package/src/web/context/index.ts +0 -12
- package/src/web/hooks/index.ts +0 -3
- package/src/web/hooks/useAgents.ts +0 -115
- package/src/web/hooks/useOnboarding.ts +0 -20
- package/src/web/hooks/useProviders.ts +0 -75
- package/src/web/icon.png +0 -0
- package/src/web/index.html +0 -16
- package/src/web/styles.css +0 -118
- package/src/web/themes.ts +0 -162
- package/src/web/types.ts +0 -298
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useCallback } from "react";
|
|
2
|
-
import type { Agent, AgentFeatures } from "../types";
|
|
3
|
-
import { useAuth } from "../context";
|
|
4
|
-
import { useAgentStatusChange } from "../context/TelemetryContext";
|
|
5
|
-
|
|
6
|
-
export function useAgents(enabled: boolean, projectId?: string | null) {
|
|
7
|
-
const { accessToken } = useAuth();
|
|
8
|
-
const [agents, setAgents] = useState<Agent[]>([]);
|
|
9
|
-
const [loading, setLoading] = useState(true);
|
|
10
|
-
|
|
11
|
-
const getHeaders = useCallback((): Record<string, string> => {
|
|
12
|
-
const headers: Record<string, string> = { "Content-Type": "application/json" };
|
|
13
|
-
if (accessToken) {
|
|
14
|
-
headers.Authorization = `Bearer ${accessToken}`;
|
|
15
|
-
}
|
|
16
|
-
return headers;
|
|
17
|
-
}, [accessToken]);
|
|
18
|
-
|
|
19
|
-
const fetchAgents = useCallback(async () => {
|
|
20
|
-
let url = "/api/agents";
|
|
21
|
-
if (projectId !== undefined && projectId !== null) {
|
|
22
|
-
url += `?project_id=${encodeURIComponent(projectId)}`;
|
|
23
|
-
}
|
|
24
|
-
const res = await fetch(url, { headers: getHeaders() });
|
|
25
|
-
const data = await res.json();
|
|
26
|
-
setAgents(data.agents || []);
|
|
27
|
-
setLoading(false);
|
|
28
|
-
}, [getHeaders, projectId]);
|
|
29
|
-
|
|
30
|
-
// Fetch on mount + auto-refetch when agents start/stop/crash (via SSE telemetry)
|
|
31
|
-
const statusChangeCounter = useAgentStatusChange();
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (enabled) {
|
|
34
|
-
fetchAgents();
|
|
35
|
-
}
|
|
36
|
-
}, [enabled, statusChangeCounter, fetchAgents]);
|
|
37
|
-
|
|
38
|
-
const createAgent = async (agent: {
|
|
39
|
-
name: string;
|
|
40
|
-
model: string;
|
|
41
|
-
provider: string;
|
|
42
|
-
systemPrompt: string;
|
|
43
|
-
features: AgentFeatures;
|
|
44
|
-
mcpServers?: string[];
|
|
45
|
-
projectId?: string | null;
|
|
46
|
-
}) => {
|
|
47
|
-
await fetch("/api/agents", {
|
|
48
|
-
method: "POST",
|
|
49
|
-
headers: getHeaders(),
|
|
50
|
-
body: JSON.stringify(agent),
|
|
51
|
-
});
|
|
52
|
-
await fetchAgents();
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const deleteAgent = async (id: string) => {
|
|
56
|
-
await fetch(`/api/agents/${id}`, { method: "DELETE", headers: getHeaders() });
|
|
57
|
-
await fetchAgents();
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const updateAgent = async (id: string, updates: {
|
|
61
|
-
name?: string;
|
|
62
|
-
model?: string;
|
|
63
|
-
provider?: string;
|
|
64
|
-
systemPrompt?: string;
|
|
65
|
-
features?: AgentFeatures;
|
|
66
|
-
mcpServers?: string[];
|
|
67
|
-
projectId?: string | null;
|
|
68
|
-
}): Promise<{ error?: string }> => {
|
|
69
|
-
const res = await fetch(`/api/agents/${id}`, {
|
|
70
|
-
method: "PUT",
|
|
71
|
-
headers: getHeaders(),
|
|
72
|
-
body: JSON.stringify(updates),
|
|
73
|
-
});
|
|
74
|
-
const data = await res.json();
|
|
75
|
-
await fetchAgents();
|
|
76
|
-
if (!res.ok && data.error) {
|
|
77
|
-
return { error: data.error };
|
|
78
|
-
}
|
|
79
|
-
return {};
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const toggleAgent = async (agent: Agent): Promise<{ error?: string }> => {
|
|
83
|
-
const action = agent.status === "running" ? "stop" : "start";
|
|
84
|
-
|
|
85
|
-
// Optimistic UI update — show transitioning state immediately
|
|
86
|
-
setAgents(prev => prev.map(a =>
|
|
87
|
-
a.id === agent.id ? { ...a, status: action === "start" ? "starting" as any : "stopping" as any } : a
|
|
88
|
-
));
|
|
89
|
-
|
|
90
|
-
// Fire API call — telemetry SSE will trigger a refetch with the real status
|
|
91
|
-
const res = await fetch(`/api/agents/${agent.id}/${action}`, { method: "POST", headers: getHeaders() });
|
|
92
|
-
if (!res.ok) {
|
|
93
|
-
const data = await res.json();
|
|
94
|
-
// Revert on error
|
|
95
|
-
setAgents(prev => prev.map(a =>
|
|
96
|
-
a.id === agent.id ? { ...a, status: agent.status } : a
|
|
97
|
-
));
|
|
98
|
-
return { error: data.error };
|
|
99
|
-
}
|
|
100
|
-
return {};
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const runningCount = agents.filter(a => a.status === "running").length;
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
agents,
|
|
107
|
-
loading,
|
|
108
|
-
runningCount,
|
|
109
|
-
fetchAgents,
|
|
110
|
-
createAgent,
|
|
111
|
-
updateAgent,
|
|
112
|
-
deleteAgent,
|
|
113
|
-
toggleAgent,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { useCallback } from "react";
|
|
2
|
-
import { useAuth } from "../context";
|
|
3
|
-
|
|
4
|
-
export function useOnboarding() {
|
|
5
|
-
const { authFetch, onboardingComplete, setOnboardingComplete } = useAuth();
|
|
6
|
-
|
|
7
|
-
// Onboarding status is now included in the /api/auth/check response,
|
|
8
|
-
// so no separate fetch is needed. This eliminates one round trip on load.
|
|
9
|
-
|
|
10
|
-
const complete = useCallback(async () => {
|
|
11
|
-
await authFetch("/api/onboarding/complete", { method: "POST" });
|
|
12
|
-
setOnboardingComplete(true);
|
|
13
|
-
}, [authFetch, setOnboardingComplete]);
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
isComplete: onboardingComplete,
|
|
17
|
-
setIsComplete: setOnboardingComplete,
|
|
18
|
-
complete,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useCallback } from "react";
|
|
2
|
-
import type { Provider } from "../types";
|
|
3
|
-
import { useAuth } from "../context";
|
|
4
|
-
|
|
5
|
-
export function useProviders(enabled: boolean) {
|
|
6
|
-
const { accessToken } = useAuth();
|
|
7
|
-
const [providers, setProviders] = useState<Provider[]>([]);
|
|
8
|
-
|
|
9
|
-
const getHeaders = useCallback((): Record<string, string> => {
|
|
10
|
-
const headers: Record<string, string> = { "Content-Type": "application/json" };
|
|
11
|
-
if (accessToken) {
|
|
12
|
-
headers.Authorization = `Bearer ${accessToken}`;
|
|
13
|
-
}
|
|
14
|
-
return headers;
|
|
15
|
-
}, [accessToken]);
|
|
16
|
-
|
|
17
|
-
const fetchProviders = useCallback(async () => {
|
|
18
|
-
const res = await fetch("/api/providers", { headers: getHeaders() });
|
|
19
|
-
const data = await res.json();
|
|
20
|
-
setProviders(data.providers || []);
|
|
21
|
-
}, [getHeaders]);
|
|
22
|
-
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (enabled) {
|
|
25
|
-
fetchProviders();
|
|
26
|
-
}
|
|
27
|
-
}, [enabled, fetchProviders]);
|
|
28
|
-
|
|
29
|
-
const configuredProviders = providers.filter(p => p.hasKey);
|
|
30
|
-
|
|
31
|
-
const saveKey = async (
|
|
32
|
-
providerId: string,
|
|
33
|
-
apiKey: string
|
|
34
|
-
): Promise<{ success: boolean; error?: string }> => {
|
|
35
|
-
// First test the key
|
|
36
|
-
const testRes = await fetch(`/api/keys/${providerId}/test`, {
|
|
37
|
-
method: "POST",
|
|
38
|
-
headers: getHeaders(),
|
|
39
|
-
body: JSON.stringify({ key: apiKey }),
|
|
40
|
-
});
|
|
41
|
-
const testData = await testRes.json();
|
|
42
|
-
|
|
43
|
-
if (!testData.valid) {
|
|
44
|
-
return { success: false, error: testData.error || "API key is invalid" };
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Save the key
|
|
48
|
-
const saveRes = await fetch(`/api/keys/${providerId}`, {
|
|
49
|
-
method: "POST",
|
|
50
|
-
headers: getHeaders(),
|
|
51
|
-
body: JSON.stringify({ key: apiKey }),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
if (!saveRes.ok) {
|
|
55
|
-
const data = await saveRes.json();
|
|
56
|
-
return { success: false, error: data.error || "Failed to save key" };
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
await fetchProviders();
|
|
60
|
-
return { success: true };
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const deleteKey = async (providerId: string) => {
|
|
64
|
-
await fetch(`/api/keys/${providerId}`, { method: "DELETE", headers: getHeaders() });
|
|
65
|
-
await fetchProviders();
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
providers,
|
|
70
|
-
configuredProviders,
|
|
71
|
-
fetchProviders,
|
|
72
|
-
saveKey,
|
|
73
|
-
deleteKey,
|
|
74
|
-
};
|
|
75
|
-
}
|
package/src/web/icon.png
DELETED
|
Binary file
|
package/src/web/index.html
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Apteva</title>
|
|
7
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
10
|
-
<link rel="stylesheet" href="./styles.css">
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="root"></div>
|
|
14
|
-
<script type="module" src="./App.tsx"></script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
package/src/web/styles.css
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
@tailwind base;
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
4
|
-
|
|
5
|
-
/* ── Style variables (classic vs professional) ── */
|
|
6
|
-
:root, [data-style="classic"] {
|
|
7
|
-
--font-family: 'JetBrains Mono', monospace;
|
|
8
|
-
--radius-card: 8px;
|
|
9
|
-
--radius-button: 6px;
|
|
10
|
-
--radius-badge: 4px;
|
|
11
|
-
--shadow-card: none;
|
|
12
|
-
--shadow-card-hover: none;
|
|
13
|
-
--border-card: 1px solid var(--color-border);
|
|
14
|
-
--spacing-card: 1rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
[data-style="professional"] {
|
|
18
|
-
--font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
19
|
-
--radius-card: 14px;
|
|
20
|
-
--radius-button: 10px;
|
|
21
|
-
--radius-badge: 8px;
|
|
22
|
-
--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
23
|
-
--shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
|
|
24
|
-
--border-card: 1px solid var(--color-border);
|
|
25
|
-
--spacing-card: 1.25rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/* Dark professional gets stronger shadows */
|
|
29
|
-
[data-style="professional"][data-theme="professional-dark"] {
|
|
30
|
-
--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
|
|
31
|
-
--shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* ── Utility class for cards ── */
|
|
35
|
-
.card {
|
|
36
|
-
border-radius: var(--radius-card);
|
|
37
|
-
border: var(--border-card);
|
|
38
|
-
box-shadow: var(--shadow-card);
|
|
39
|
-
transition: box-shadow 0.2s ease;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.card:hover {
|
|
43
|
-
box-shadow: var(--shadow-card-hover);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* ── Utility for buttons ── */
|
|
47
|
-
.btn {
|
|
48
|
-
border-radius: var(--radius-button);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
html, body {
|
|
52
|
-
background-color: var(--color-bg, #0a0a0a);
|
|
53
|
-
color: var(--color-text, #e0e0e0);
|
|
54
|
-
font-family: var(--font-family, 'JetBrains Mono', monospace);
|
|
55
|
-
min-height: 100%;
|
|
56
|
-
margin: 0;
|
|
57
|
-
-webkit-font-smoothing: antialiased;
|
|
58
|
-
-moz-osx-font-smoothing: grayscale;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Hide scrollbars globally but allow scrolling */
|
|
62
|
-
* {
|
|
63
|
-
-ms-overflow-style: none;
|
|
64
|
-
scrollbar-width: none;
|
|
65
|
-
}
|
|
66
|
-
*::-webkit-scrollbar {
|
|
67
|
-
display: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
::selection {
|
|
71
|
-
background-color: var(--color-selection-bg, #f97316);
|
|
72
|
-
color: var(--color-selection-text, #0a0a0a);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.line-clamp-2 {
|
|
76
|
-
display: -webkit-box;
|
|
77
|
-
-webkit-line-clamp: 2;
|
|
78
|
-
-webkit-box-orient: vertical;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Hide scrollbar but allow scrolling */
|
|
83
|
-
.scrollbar-hide {
|
|
84
|
-
-ms-overflow-style: none;
|
|
85
|
-
scrollbar-width: none;
|
|
86
|
-
}
|
|
87
|
-
.scrollbar-hide::-webkit-scrollbar {
|
|
88
|
-
display: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* Activity timeline slide-in animation */
|
|
92
|
-
@keyframes slideIn {
|
|
93
|
-
0% {
|
|
94
|
-
opacity: 0;
|
|
95
|
-
transform: translateY(-12px);
|
|
96
|
-
max-height: 0;
|
|
97
|
-
}
|
|
98
|
-
40% {
|
|
99
|
-
opacity: 0.6;
|
|
100
|
-
max-height: 100px;
|
|
101
|
-
}
|
|
102
|
-
100% {
|
|
103
|
-
opacity: 1;
|
|
104
|
-
transform: translateY(0);
|
|
105
|
-
max-height: 100px;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@keyframes highlightFade {
|
|
110
|
-
0% { background-color: rgba(249, 115, 22, 0.08); }
|
|
111
|
-
100% { background-color: transparent; }
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.animate-slideIn {
|
|
115
|
-
animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1), highlightFade 2s 0.5s ease-out;
|
|
116
|
-
overflow: hidden;
|
|
117
|
-
}
|
|
118
|
-
|
package/src/web/themes.ts
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/** Theme system — extensible for future custom themes */
|
|
2
|
-
|
|
3
|
-
export type ThemeMode = "auto" | "dark" | "light";
|
|
4
|
-
export type ThemeStyle = "classic" | "professional";
|
|
5
|
-
|
|
6
|
-
export interface ThemeColors {
|
|
7
|
-
"--color-bg": string;
|
|
8
|
-
"--color-bg-secondary": string;
|
|
9
|
-
"--color-surface": string;
|
|
10
|
-
"--color-surface-hover": string;
|
|
11
|
-
"--color-surface-raised": string;
|
|
12
|
-
"--color-border": string;
|
|
13
|
-
"--color-border-light": string;
|
|
14
|
-
"--color-text": string;
|
|
15
|
-
"--color-text-secondary": string;
|
|
16
|
-
"--color-text-muted": string;
|
|
17
|
-
"--color-text-faint": string;
|
|
18
|
-
"--color-accent": string;
|
|
19
|
-
"--color-accent-hover": string;
|
|
20
|
-
"--color-selection-bg": string;
|
|
21
|
-
"--color-selection-text": string;
|
|
22
|
-
"--color-scrollbar": string;
|
|
23
|
-
"--color-scrollbar-hover": string;
|
|
24
|
-
[key: string]: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Theme {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
colors: ThemeColors;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const themes: Record<string, Theme> = {
|
|
34
|
-
// ── Classic (terminal/hacker) ──────────────────────────
|
|
35
|
-
dark: {
|
|
36
|
-
id: "dark",
|
|
37
|
-
name: "Dark",
|
|
38
|
-
colors: {
|
|
39
|
-
"--color-bg": "#0a0a0a",
|
|
40
|
-
"--color-bg-secondary": "#0f0f0f",
|
|
41
|
-
"--color-surface": "#111111",
|
|
42
|
-
"--color-surface-hover": "#0a0a0a",
|
|
43
|
-
"--color-surface-raised": "#1a1a1a",
|
|
44
|
-
"--color-border": "#1a1a1a",
|
|
45
|
-
"--color-border-light": "#222222",
|
|
46
|
-
"--color-text": "#e0e0e0",
|
|
47
|
-
"--color-text-secondary": "#888888",
|
|
48
|
-
"--color-text-muted": "#666666",
|
|
49
|
-
"--color-text-faint": "#555555",
|
|
50
|
-
"--color-accent": "#f97316",
|
|
51
|
-
"--color-accent-hover": "#ea580c",
|
|
52
|
-
"--color-accent-5": "rgba(249, 115, 22, 0.05)",
|
|
53
|
-
"--color-accent-10": "rgba(249, 115, 22, 0.1)",
|
|
54
|
-
"--color-accent-15": "rgba(249, 115, 22, 0.15)",
|
|
55
|
-
"--color-accent-20": "rgba(249, 115, 22, 0.2)",
|
|
56
|
-
"--color-accent-30": "rgba(249, 115, 22, 0.3)",
|
|
57
|
-
"--color-accent-70": "rgba(249, 115, 22, 0.7)",
|
|
58
|
-
"--color-selection-bg": "#f97316",
|
|
59
|
-
"--color-selection-text": "#0a0a0a",
|
|
60
|
-
"--color-scrollbar": "#222222",
|
|
61
|
-
"--color-scrollbar-hover": "#444444",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
light: {
|
|
65
|
-
id: "light",
|
|
66
|
-
name: "Light",
|
|
67
|
-
colors: {
|
|
68
|
-
"--color-bg": "#ffffff",
|
|
69
|
-
"--color-bg-secondary": "#f7f7f7",
|
|
70
|
-
"--color-surface": "#ffffff",
|
|
71
|
-
"--color-surface-hover": "#f5f5f5",
|
|
72
|
-
"--color-surface-raised": "#f0f0f0",
|
|
73
|
-
"--color-border": "#e0e0e0",
|
|
74
|
-
"--color-border-light": "#e8e8e8",
|
|
75
|
-
"--color-text": "#1a1a1a",
|
|
76
|
-
"--color-text-secondary": "#555555",
|
|
77
|
-
"--color-text-muted": "#777777",
|
|
78
|
-
"--color-text-faint": "#999999",
|
|
79
|
-
"--color-accent": "#ea580c",
|
|
80
|
-
"--color-accent-hover": "#c2410c",
|
|
81
|
-
"--color-accent-5": "rgba(234, 88, 12, 0.05)",
|
|
82
|
-
"--color-accent-10": "rgba(234, 88, 12, 0.1)",
|
|
83
|
-
"--color-accent-15": "rgba(234, 88, 12, 0.15)",
|
|
84
|
-
"--color-accent-20": "rgba(234, 88, 12, 0.2)",
|
|
85
|
-
"--color-accent-30": "rgba(234, 88, 12, 0.3)",
|
|
86
|
-
"--color-accent-70": "rgba(234, 88, 12, 0.7)",
|
|
87
|
-
"--color-selection-bg": "#ea580c",
|
|
88
|
-
"--color-selection-text": "#ffffff",
|
|
89
|
-
"--color-scrollbar": "#cccccc",
|
|
90
|
-
"--color-scrollbar-hover": "#aaaaaa",
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
// ── Professional (enterprise/SaaS) ────────────────────
|
|
95
|
-
"professional-dark": {
|
|
96
|
-
id: "professional-dark",
|
|
97
|
-
name: "Professional Dark",
|
|
98
|
-
colors: {
|
|
99
|
-
"--color-bg": "#0f1117",
|
|
100
|
-
"--color-bg-secondary": "#131520",
|
|
101
|
-
"--color-surface": "#181a24",
|
|
102
|
-
"--color-surface-hover": "#1e2030",
|
|
103
|
-
"--color-surface-raised": "#232636",
|
|
104
|
-
"--color-border": "#252838",
|
|
105
|
-
"--color-border-light": "#2d3044",
|
|
106
|
-
"--color-text": "#d4d7e0",
|
|
107
|
-
"--color-text-secondary": "#8b8fa3",
|
|
108
|
-
"--color-text-muted": "#6b6f83",
|
|
109
|
-
"--color-text-faint": "#4e5266",
|
|
110
|
-
"--color-accent": "#7c3aed",
|
|
111
|
-
"--color-accent-hover": "#6d28d9",
|
|
112
|
-
"--color-accent-5": "rgba(124, 58, 237, 0.05)",
|
|
113
|
-
"--color-accent-10": "rgba(124, 58, 237, 0.1)",
|
|
114
|
-
"--color-accent-15": "rgba(124, 58, 237, 0.15)",
|
|
115
|
-
"--color-accent-20": "rgba(124, 58, 237, 0.2)",
|
|
116
|
-
"--color-accent-30": "rgba(124, 58, 237, 0.3)",
|
|
117
|
-
"--color-accent-70": "rgba(124, 58, 237, 0.7)",
|
|
118
|
-
"--color-selection-bg": "#7c3aed",
|
|
119
|
-
"--color-selection-text": "#ffffff",
|
|
120
|
-
"--color-scrollbar": "#2d3044",
|
|
121
|
-
"--color-scrollbar-hover": "#3d4058",
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
"professional-light": {
|
|
125
|
-
id: "professional-light",
|
|
126
|
-
name: "Professional Light",
|
|
127
|
-
colors: {
|
|
128
|
-
"--color-bg": "#f8f9fb",
|
|
129
|
-
"--color-bg-secondary": "#f0f2f5",
|
|
130
|
-
"--color-surface": "#ffffff",
|
|
131
|
-
"--color-surface-hover": "#f5f6f8",
|
|
132
|
-
"--color-surface-raised": "#eef0f4",
|
|
133
|
-
"--color-border": "#e2e4ea",
|
|
134
|
-
"--color-border-light": "#e8eaef",
|
|
135
|
-
"--color-text": "#1a1d2b",
|
|
136
|
-
"--color-text-secondary": "#4b5066",
|
|
137
|
-
"--color-text-muted": "#6b7088",
|
|
138
|
-
"--color-text-faint": "#9298ac",
|
|
139
|
-
"--color-accent": "#6d28d9",
|
|
140
|
-
"--color-accent-hover": "#5b21b6",
|
|
141
|
-
"--color-accent-5": "rgba(109, 40, 217, 0.05)",
|
|
142
|
-
"--color-accent-10": "rgba(109, 40, 217, 0.1)",
|
|
143
|
-
"--color-accent-15": "rgba(109, 40, 217, 0.15)",
|
|
144
|
-
"--color-accent-20": "rgba(109, 40, 217, 0.2)",
|
|
145
|
-
"--color-accent-30": "rgba(109, 40, 217, 0.3)",
|
|
146
|
-
"--color-accent-70": "rgba(109, 40, 217, 0.7)",
|
|
147
|
-
"--color-selection-bg": "#6d28d9",
|
|
148
|
-
"--color-selection-text": "#ffffff",
|
|
149
|
-
"--color-scrollbar": "#cdd0d8",
|
|
150
|
-
"--color-scrollbar-hover": "#b0b4c0",
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/** Resolve the effective theme from mode + style + system preference */
|
|
156
|
-
export function resolveTheme(mode: ThemeMode, style: ThemeStyle, prefersDark: boolean): Theme {
|
|
157
|
-
const isDark = mode === "auto" ? prefersDark : mode === "dark";
|
|
158
|
-
if (style === "professional") {
|
|
159
|
-
return isDark ? themes["professional-dark"] : themes["professional-light"];
|
|
160
|
-
}
|
|
161
|
-
return isDark ? themes.dark : themes.light;
|
|
162
|
-
}
|