apteva 0.4.57 → 0.7.1
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 +15 -76
- 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
package/src/db-tests.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { getDb, generateId } from "./db";
|
|
2
|
-
|
|
3
|
-
export interface TestCase {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string | null;
|
|
7
|
-
behavior: string | null;
|
|
8
|
-
agent_id: string | null; // null = auto-select by AI
|
|
9
|
-
input_message: string | null; // null = AI-generated
|
|
10
|
-
eval_criteria: string;
|
|
11
|
-
timeout_ms: number;
|
|
12
|
-
project_id: string | null;
|
|
13
|
-
created_at: string;
|
|
14
|
-
updated_at: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface TestRun {
|
|
18
|
-
id: string;
|
|
19
|
-
test_case_id: string;
|
|
20
|
-
status: "running" | "passed" | "failed" | "error";
|
|
21
|
-
score: number | null;
|
|
22
|
-
agent_response: string | null;
|
|
23
|
-
judge_reasoning: string | null;
|
|
24
|
-
duration_ms: number | null;
|
|
25
|
-
error: string | null;
|
|
26
|
-
generated_message: string | null;
|
|
27
|
-
selected_agent_id: string | null;
|
|
28
|
-
selected_agent_name: string | null;
|
|
29
|
-
planner_reasoning: string | null;
|
|
30
|
-
created_at: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const TestCaseDB = {
|
|
34
|
-
findAll(projectId?: string): TestCase[] {
|
|
35
|
-
const db = getDb();
|
|
36
|
-
if (projectId) {
|
|
37
|
-
return db.query("SELECT * FROM test_cases WHERE project_id = ? ORDER BY created_at DESC").all(projectId) as TestCase[];
|
|
38
|
-
}
|
|
39
|
-
return db.query("SELECT * FROM test_cases ORDER BY created_at DESC").all() as TestCase[];
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
findById(id: string): TestCase | null {
|
|
43
|
-
const db = getDb();
|
|
44
|
-
return db.query("SELECT * FROM test_cases WHERE id = ?").get(id) as TestCase | null;
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
findByAgent(agentId: string): TestCase[] {
|
|
48
|
-
const db = getDb();
|
|
49
|
-
return db.query("SELECT * FROM test_cases WHERE agent_id = ? ORDER BY created_at DESC").all(agentId) as TestCase[];
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
create(data: {
|
|
53
|
-
name: string;
|
|
54
|
-
behavior?: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
agent_id?: string | null;
|
|
57
|
-
input_message?: string | null;
|
|
58
|
-
eval_criteria?: string;
|
|
59
|
-
timeout_ms?: number;
|
|
60
|
-
project_id?: string | null;
|
|
61
|
-
}): TestCase {
|
|
62
|
-
const db = getDb();
|
|
63
|
-
const id = generateId();
|
|
64
|
-
const now = new Date().toISOString();
|
|
65
|
-
// For behavior-driven tests, eval_criteria defaults to behavior
|
|
66
|
-
const evalCriteria = data.eval_criteria || data.behavior || "";
|
|
67
|
-
db.run(
|
|
68
|
-
`INSERT INTO test_cases (id, name, description, behavior, agent_id, input_message, eval_criteria, timeout_ms, project_id, created_at, updated_at)
|
|
69
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
70
|
-
[id, data.name, data.description || null, data.behavior || null, data.agent_id || null, data.input_message || null, evalCriteria, data.timeout_ms || 300000, data.project_id || null, now, now]
|
|
71
|
-
);
|
|
72
|
-
return this.findById(id)!;
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
update(id: string, data: Partial<Pick<TestCase, "name" | "description" | "behavior" | "agent_id" | "input_message" | "eval_criteria" | "timeout_ms" | "project_id">>): TestCase | null {
|
|
76
|
-
const db = getDb();
|
|
77
|
-
const existing = this.findById(id);
|
|
78
|
-
if (!existing) return null;
|
|
79
|
-
|
|
80
|
-
const fields: string[] = [];
|
|
81
|
-
const values: any[] = [];
|
|
82
|
-
|
|
83
|
-
if (data.name !== undefined) { fields.push("name = ?"); values.push(data.name); }
|
|
84
|
-
if (data.description !== undefined) { fields.push("description = ?"); values.push(data.description); }
|
|
85
|
-
if (data.behavior !== undefined) { fields.push("behavior = ?"); values.push(data.behavior); }
|
|
86
|
-
if (data.agent_id !== undefined) { fields.push("agent_id = ?"); values.push(data.agent_id); }
|
|
87
|
-
if (data.input_message !== undefined) { fields.push("input_message = ?"); values.push(data.input_message); }
|
|
88
|
-
if (data.eval_criteria !== undefined) { fields.push("eval_criteria = ?"); values.push(data.eval_criteria); }
|
|
89
|
-
if (data.timeout_ms !== undefined) { fields.push("timeout_ms = ?"); values.push(data.timeout_ms); }
|
|
90
|
-
if (data.project_id !== undefined) { fields.push("project_id = ?"); values.push(data.project_id); }
|
|
91
|
-
|
|
92
|
-
if (fields.length === 0) return existing;
|
|
93
|
-
|
|
94
|
-
fields.push("updated_at = ?");
|
|
95
|
-
values.push(new Date().toISOString());
|
|
96
|
-
values.push(id);
|
|
97
|
-
|
|
98
|
-
db.run(`UPDATE test_cases SET ${fields.join(", ")} WHERE id = ?`, values);
|
|
99
|
-
return this.findById(id);
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
delete(id: string): boolean {
|
|
103
|
-
const db = getDb();
|
|
104
|
-
const result = db.run("DELETE FROM test_cases WHERE id = ?", [id]);
|
|
105
|
-
return result.changes > 0;
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export const TestRunDB = {
|
|
110
|
-
findByTestCase(testCaseId: string, limit = 20): TestRun[] {
|
|
111
|
-
const db = getDb();
|
|
112
|
-
return db.query("SELECT * FROM test_runs WHERE test_case_id = ? ORDER BY created_at DESC LIMIT ?").all(testCaseId, limit) as TestRun[];
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
findById(id: string): TestRun | null {
|
|
116
|
-
const db = getDb();
|
|
117
|
-
return db.query("SELECT * FROM test_runs WHERE id = ?").get(id) as TestRun | null;
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
findRecent(limit = 50): TestRun[] {
|
|
121
|
-
const db = getDb();
|
|
122
|
-
return db.query("SELECT * FROM test_runs ORDER BY created_at DESC LIMIT ?").all(limit) as TestRun[];
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
create(testCaseId: string): TestRun {
|
|
126
|
-
const db = getDb();
|
|
127
|
-
const id = generateId();
|
|
128
|
-
const now = new Date().toISOString();
|
|
129
|
-
db.run(
|
|
130
|
-
"INSERT INTO test_runs (id, test_case_id, status, created_at) VALUES (?, ?, 'running', ?)",
|
|
131
|
-
[id, testCaseId, now]
|
|
132
|
-
);
|
|
133
|
-
return this.findById(id)!;
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
complete(id: string, data: {
|
|
137
|
-
status: "passed" | "failed" | "error";
|
|
138
|
-
score?: number;
|
|
139
|
-
agent_response?: string;
|
|
140
|
-
judge_reasoning?: string;
|
|
141
|
-
duration_ms?: number;
|
|
142
|
-
error?: string;
|
|
143
|
-
generated_message?: string;
|
|
144
|
-
selected_agent_id?: string;
|
|
145
|
-
selected_agent_name?: string;
|
|
146
|
-
planner_reasoning?: string;
|
|
147
|
-
}): TestRun | null {
|
|
148
|
-
const db = getDb();
|
|
149
|
-
db.run(
|
|
150
|
-
`UPDATE test_runs SET status = ?, score = ?, agent_response = ?, judge_reasoning = ?, duration_ms = ?, error = ?,
|
|
151
|
-
generated_message = ?, selected_agent_id = ?, selected_agent_name = ?, planner_reasoning = ?
|
|
152
|
-
WHERE id = ?`,
|
|
153
|
-
[
|
|
154
|
-
data.status,
|
|
155
|
-
data.score ?? null,
|
|
156
|
-
data.agent_response || null,
|
|
157
|
-
data.judge_reasoning || null,
|
|
158
|
-
data.duration_ms || null,
|
|
159
|
-
data.error || null,
|
|
160
|
-
data.generated_message || null,
|
|
161
|
-
data.selected_agent_id || null,
|
|
162
|
-
data.selected_agent_name || null,
|
|
163
|
-
data.planner_reasoning || null,
|
|
164
|
-
id,
|
|
165
|
-
]
|
|
166
|
-
);
|
|
167
|
-
return this.findById(id);
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
getLatestByTestCase(testCaseId: string): TestRun | null {
|
|
171
|
-
const db = getDb();
|
|
172
|
-
return db.query("SELECT * FROM test_runs WHERE test_case_id = ? ORDER BY created_at DESC LIMIT 1").get(testCaseId) as TestRun | null;
|
|
173
|
-
},
|
|
174
|
-
};
|