apteva 0.2.3 → 0.2.5
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/App.ggy88vnx.js +213 -0
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -6
- package/src/binary.ts +271 -1
- package/src/crypto.ts +53 -0
- package/src/db.ts +492 -3
- package/src/mcp-client.ts +599 -0
- package/src/providers.ts +31 -0
- package/src/routes/api.ts +786 -63
- package/src/server.ts +122 -5
- package/src/web/App.tsx +36 -1
- package/src/web/components/agents/AgentCard.tsx +22 -1
- package/src/web/components/agents/AgentPanel.tsx +381 -0
- package/src/web/components/agents/AgentsView.tsx +27 -10
- package/src/web/components/agents/CreateAgentModal.tsx +7 -7
- package/src/web/components/agents/index.ts +1 -1
- package/src/web/components/common/Icons.tsx +8 -0
- package/src/web/components/common/Modal.tsx +2 -2
- package/src/web/components/common/Select.tsx +1 -1
- package/src/web/components/common/index.ts +1 -0
- package/src/web/components/dashboard/Dashboard.tsx +74 -25
- package/src/web/components/index.ts +5 -2
- package/src/web/components/layout/Sidebar.tsx +22 -2
- package/src/web/components/mcp/McpPage.tsx +1144 -0
- package/src/web/components/mcp/index.ts +1 -0
- package/src/web/components/onboarding/OnboardingWizard.tsx +5 -1
- package/src/web/components/settings/SettingsPage.tsx +312 -82
- package/src/web/components/tasks/TasksPage.tsx +129 -0
- package/src/web/components/tasks/index.ts +1 -0
- package/src/web/components/telemetry/TelemetryPage.tsx +316 -0
- package/src/web/hooks/useAgents.ts +23 -0
- package/src/web/styles.css +18 -0
- package/src/web/types.ts +75 -1
- package/dist/App.wfhmfhx7.js +0 -213
- package/src/web/components/agents/ChatPanel.tsx +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Chat } from "@apteva/apteva-kit";
|
|
3
|
-
import { CloseIcon } from "../common/Icons";
|
|
4
|
-
import type { Agent } from "../../types";
|
|
5
|
-
|
|
6
|
-
interface ChatPanelProps {
|
|
7
|
-
agent: Agent;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
onStartAgent: (e?: React.MouseEvent) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function ChatPanel({ agent, onClose, onStartAgent }: ChatPanelProps) {
|
|
13
|
-
if (agent.status === "running" && agent.port) {
|
|
14
|
-
return (
|
|
15
|
-
<div className="w-1/2 flex flex-col overflow-hidden">
|
|
16
|
-
<div className="flex-1 flex flex-col overflow-hidden relative">
|
|
17
|
-
<button
|
|
18
|
-
onClick={onClose}
|
|
19
|
-
className="absolute top-3 right-3 z-10 text-[#666] hover:text-[#e0e0e0] transition"
|
|
20
|
-
>
|
|
21
|
-
<CloseIcon />
|
|
22
|
-
</button>
|
|
23
|
-
<Chat
|
|
24
|
-
agentId="default"
|
|
25
|
-
apiUrl={`/api/agents/${agent.id}`}
|
|
26
|
-
placeholder="Message this agent..."
|
|
27
|
-
context={agent.systemPrompt}
|
|
28
|
-
variant="terminal"
|
|
29
|
-
headerTitle={agent.name}
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div className="w-1/2 flex flex-col overflow-hidden">
|
|
38
|
-
<div className="border-b border-[#1a1a1a] p-4 flex items-center justify-between">
|
|
39
|
-
<div>
|
|
40
|
-
<h2 className="font-semibold">{agent.name}</h2>
|
|
41
|
-
<p className="text-sm text-[#666]">{agent.provider} / {agent.model}</p>
|
|
42
|
-
</div>
|
|
43
|
-
<button
|
|
44
|
-
onClick={onClose}
|
|
45
|
-
className="text-[#666] hover:text-[#e0e0e0] transition"
|
|
46
|
-
>
|
|
47
|
-
<CloseIcon />
|
|
48
|
-
</button>
|
|
49
|
-
</div>
|
|
50
|
-
<div className="flex-1 flex items-center justify-center text-[#666]">
|
|
51
|
-
<div className="text-center">
|
|
52
|
-
<p className="text-lg mb-2">Agent is not running</p>
|
|
53
|
-
<button
|
|
54
|
-
onClick={onStartAgent}
|
|
55
|
-
className="bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30 px-4 py-2 rounded font-medium transition"
|
|
56
|
-
>
|
|
57
|
-
Start Agent
|
|
58
|
-
</button>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
}
|