apteva 0.2.3 → 0.2.6

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 (38) hide show
  1. package/dist/App.0mzj9cz9.js +213 -0
  2. package/dist/index.html +1 -1
  3. package/dist/styles.css +1 -1
  4. package/package.json +6 -6
  5. package/src/binary.ts +271 -1
  6. package/src/crypto.ts +53 -0
  7. package/src/db.ts +492 -3
  8. package/src/mcp-client.ts +599 -0
  9. package/src/providers.ts +31 -0
  10. package/src/routes/api.ts +832 -64
  11. package/src/server.ts +169 -5
  12. package/src/web/App.tsx +44 -2
  13. package/src/web/components/agents/AgentCard.tsx +53 -9
  14. package/src/web/components/agents/AgentPanel.tsx +381 -0
  15. package/src/web/components/agents/AgentsView.tsx +27 -10
  16. package/src/web/components/agents/CreateAgentModal.tsx +7 -7
  17. package/src/web/components/agents/index.ts +1 -1
  18. package/src/web/components/common/Icons.tsx +8 -0
  19. package/src/web/components/common/Modal.tsx +2 -2
  20. package/src/web/components/common/Select.tsx +1 -1
  21. package/src/web/components/common/index.ts +1 -0
  22. package/src/web/components/dashboard/Dashboard.tsx +74 -25
  23. package/src/web/components/index.ts +5 -2
  24. package/src/web/components/layout/Sidebar.tsx +22 -2
  25. package/src/web/components/mcp/McpPage.tsx +1144 -0
  26. package/src/web/components/mcp/index.ts +1 -0
  27. package/src/web/components/onboarding/OnboardingWizard.tsx +5 -1
  28. package/src/web/components/settings/SettingsPage.tsx +312 -82
  29. package/src/web/components/tasks/TasksPage.tsx +129 -0
  30. package/src/web/components/tasks/index.ts +1 -0
  31. package/src/web/components/telemetry/TelemetryPage.tsx +359 -0
  32. package/src/web/context/TelemetryContext.tsx +202 -0
  33. package/src/web/context/index.ts +2 -0
  34. package/src/web/hooks/useAgents.ts +23 -0
  35. package/src/web/styles.css +18 -0
  36. package/src/web/types.ts +75 -1
  37. package/dist/App.wfhmfhx7.js +0 -213
  38. package/src/web/components/agents/ChatPanel.tsx +0 -63
package/src/web/types.ts CHANGED
@@ -18,6 +18,14 @@ export const DEFAULT_FEATURES: AgentFeatures = {
18
18
  realtime: false,
19
19
  };
20
20
 
21
+ export interface McpServerSummary {
22
+ id: string;
23
+ name: string;
24
+ type: string;
25
+ status: "stopped" | "running";
26
+ port: number | null;
27
+ }
28
+
21
29
  export interface Agent {
22
30
  id: string;
23
31
  name: string;
@@ -27,9 +35,37 @@ export interface Agent {
27
35
  status: "stopped" | "running";
28
36
  port?: number;
29
37
  features: AgentFeatures;
38
+ mcpServers: string[]; // Array of MCP server IDs
39
+ mcpServerDetails?: McpServerSummary[]; // Full details included from API
30
40
  createdAt: string;
31
41
  }
32
42
 
43
+ export interface McpServer {
44
+ id: string;
45
+ name: string;
46
+ type: "npm" | "github" | "http" | "custom";
47
+ package: string | null;
48
+ command: string | null;
49
+ port: number | null;
50
+ status: "stopped" | "running";
51
+ }
52
+
53
+ export interface McpTool {
54
+ name: string;
55
+ description?: string;
56
+ inputSchema: Record<string, unknown>;
57
+ }
58
+
59
+ export interface McpToolCallResult {
60
+ content: Array<{
61
+ type: "text" | "image" | "resource";
62
+ text?: string;
63
+ data?: string;
64
+ mimeType?: string;
65
+ }>;
66
+ isError?: boolean;
67
+ }
68
+
33
69
  export interface ProviderModel {
34
70
  value: string;
35
71
  label: string;
@@ -39,11 +75,14 @@ export interface ProviderModel {
39
75
  export interface Provider {
40
76
  id: string;
41
77
  name: string;
78
+ type: "llm" | "integration";
42
79
  docsUrl: string;
80
+ description?: string;
43
81
  models: ProviderModel[];
44
82
  hasKey: boolean;
45
83
  keyHint: string | null;
46
84
  isValid: boolean | null;
85
+ configured?: boolean; // for backwards compatibility
47
86
  }
48
87
 
49
88
  export interface OnboardingStatus {
@@ -52,7 +91,41 @@ export interface OnboardingStatus {
52
91
  has_any_keys: boolean;
53
92
  }
54
93
 
55
- export type Route = "dashboard" | "agents" | "settings";
94
+ export type Route = "dashboard" | "agents" | "tasks" | "mcp" | "telemetry" | "settings";
95
+
96
+ export interface Task {
97
+ id: string;
98
+ title: string;
99
+ description?: string;
100
+ type: "once" | "recurring";
101
+ status: "pending" | "running" | "completed" | "failed" | "cancelled";
102
+ priority: number;
103
+ source: "local" | "delegated";
104
+ created_at: string;
105
+ execute_at?: string;
106
+ executed_at?: string;
107
+ recurrence?: string;
108
+ next_run?: string;
109
+ result?: any;
110
+ agentId: string;
111
+ agentName: string;
112
+ }
113
+
114
+ export interface DashboardStats {
115
+ agents: {
116
+ total: number;
117
+ running: number;
118
+ };
119
+ tasks: {
120
+ total: number;
121
+ pending: number;
122
+ running: number;
123
+ completed: number;
124
+ };
125
+ providers: {
126
+ configured: number;
127
+ };
128
+ }
56
129
 
57
130
  export interface NewAgentForm {
58
131
  name: string;
@@ -60,4 +133,5 @@ export interface NewAgentForm {
60
133
  provider: string;
61
134
  systemPrompt: string;
62
135
  features: AgentFeatures;
136
+ mcpServers: string[];
63
137
  }