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.
Files changed (142) hide show
  1. package/README.md +216 -54
  2. package/cli.js +35 -0
  3. package/install.js +92 -0
  4. package/package.json +12 -79
  5. package/LICENSE +0 -63
  6. package/bin/apteva.js +0 -196
  7. package/dist/ActivityPage.kxzzb4yc.js +0 -3
  8. package/dist/ApiDocsPage.zq998hbm.js +0 -4
  9. package/dist/App.55rea8mn.js +0 -61
  10. package/dist/App.5ywb23z4.js +0 -53
  11. package/dist/App.6thds120.js +0 -4
  12. package/dist/App.9tctxzqm.js +0 -8
  13. package/dist/App.a8r8ttaz.js +0 -4
  14. package/dist/App.agsv5bje.js +0 -4
  15. package/dist/App.cepapqmx.js +0 -4
  16. package/dist/App.dp041gb3.js +0 -221
  17. package/dist/App.fds72zb5.js +0 -4
  18. package/dist/App.fg9qj2dq.js +0 -4
  19. package/dist/App.ndfejbm9.js +0 -4
  20. package/dist/App.nxmfmq1h.js +0 -13
  21. package/dist/App.qdfyt8ba.js +0 -4
  22. package/dist/App.x2d0ygt6.js +0 -4
  23. package/dist/App.yt9p4nr3.js +0 -20
  24. package/dist/App.zn4mw16t.js +0 -1
  25. package/dist/ConnectionsPage.8r96ryw7.js +0 -3
  26. package/dist/McpPage.3cwh0gnd.js +0 -3
  27. package/dist/SettingsPage.ykgdh5ev.js +0 -3
  28. package/dist/SkillsPage.4np1s65b.js +0 -3
  29. package/dist/TasksPage.4g08t7p6.js +0 -3
  30. package/dist/TelemetryPage.72w9pwcp.js +0 -3
  31. package/dist/TestsPage.z4fk3r7r.js +0 -3
  32. package/dist/ThreadsPage.63tcajeh.js +0 -3
  33. package/dist/apteva-kit.css +0 -1
  34. package/dist/icon.png +0 -0
  35. package/dist/index.html +0 -16
  36. package/dist/styles.css +0 -1
  37. package/scripts/postinstall.mjs +0 -102
  38. package/src/auth/index.ts +0 -394
  39. package/src/auth/middleware.ts +0 -213
  40. package/src/binary.ts +0 -536
  41. package/src/channels/index.ts +0 -40
  42. package/src/channels/telegram.ts +0 -311
  43. package/src/crypto.ts +0 -301
  44. package/src/db-tests.ts +0 -174
  45. package/src/db.ts +0 -3133
  46. package/src/integrations/agentdojo.ts +0 -559
  47. package/src/integrations/composio.ts +0 -437
  48. package/src/integrations/index.ts +0 -87
  49. package/src/integrations/skillsmp.ts +0 -318
  50. package/src/mcp-client.ts +0 -605
  51. package/src/mcp-handler.ts +0 -394
  52. package/src/mcp-platform.ts +0 -2403
  53. package/src/openapi.ts +0 -2410
  54. package/src/providers.ts +0 -597
  55. package/src/routes/api/agent-utils.ts +0 -890
  56. package/src/routes/api/agents.ts +0 -916
  57. package/src/routes/api/api-keys.ts +0 -95
  58. package/src/routes/api/channels.ts +0 -182
  59. package/src/routes/api/helpers.ts +0 -12
  60. package/src/routes/api/integrations.ts +0 -639
  61. package/src/routes/api/mcp.ts +0 -574
  62. package/src/routes/api/meta-agent.ts +0 -195
  63. package/src/routes/api/projects.ts +0 -112
  64. package/src/routes/api/providers.ts +0 -424
  65. package/src/routes/api/skills.ts +0 -537
  66. package/src/routes/api/system.ts +0 -333
  67. package/src/routes/api/telemetry.ts +0 -203
  68. package/src/routes/api/tests.ts +0 -148
  69. package/src/routes/api/triggers.ts +0 -518
  70. package/src/routes/api/users.ts +0 -148
  71. package/src/routes/api/webhooks.ts +0 -171
  72. package/src/routes/api.ts +0 -53
  73. package/src/routes/auth.ts +0 -251
  74. package/src/routes/share.ts +0 -86
  75. package/src/routes/static.ts +0 -131
  76. package/src/server.ts +0 -642
  77. package/src/test-runner.ts +0 -598
  78. package/src/triggers/agentdojo.ts +0 -253
  79. package/src/triggers/composio.ts +0 -264
  80. package/src/triggers/index.ts +0 -71
  81. package/src/tui/AgentList.tsx +0 -145
  82. package/src/tui/App.tsx +0 -102
  83. package/src/tui/Login.tsx +0 -104
  84. package/src/tui/api.ts +0 -72
  85. package/src/tui/index.tsx +0 -7
  86. package/src/web/App.tsx +0 -455
  87. package/src/web/components/activity/ActivityPage.tsx +0 -314
  88. package/src/web/components/activity/index.ts +0 -1
  89. package/src/web/components/agents/AgentCard.tsx +0 -189
  90. package/src/web/components/agents/AgentPanel.tsx +0 -2244
  91. package/src/web/components/agents/AgentsView.tsx +0 -180
  92. package/src/web/components/agents/CreateAgentModal.tsx +0 -475
  93. package/src/web/components/agents/index.ts +0 -4
  94. package/src/web/components/api/ApiDocsPage.tsx +0 -842
  95. package/src/web/components/auth/CreateAccountStep.tsx +0 -176
  96. package/src/web/components/auth/LoginPage.tsx +0 -91
  97. package/src/web/components/auth/index.ts +0 -2
  98. package/src/web/components/common/Icons.tsx +0 -250
  99. package/src/web/components/common/LoadingSpinner.tsx +0 -44
  100. package/src/web/components/common/Modal.tsx +0 -199
  101. package/src/web/components/common/Select.tsx +0 -97
  102. package/src/web/components/common/index.ts +0 -20
  103. package/src/web/components/connections/ConnectionsPage.tsx +0 -54
  104. package/src/web/components/connections/IntegrationsTab.tsx +0 -170
  105. package/src/web/components/connections/OverviewTab.tsx +0 -137
  106. package/src/web/components/connections/TriggersTab.tsx +0 -1346
  107. package/src/web/components/dashboard/Dashboard.tsx +0 -572
  108. package/src/web/components/dashboard/index.ts +0 -1
  109. package/src/web/components/index.ts +0 -21
  110. package/src/web/components/layout/ErrorBanner.tsx +0 -18
  111. package/src/web/components/layout/Header.tsx +0 -332
  112. package/src/web/components/layout/Sidebar.tsx +0 -231
  113. package/src/web/components/layout/index.ts +0 -3
  114. package/src/web/components/mcp/IntegrationsPanel.tsx +0 -857
  115. package/src/web/components/mcp/McpPage.tsx +0 -2515
  116. package/src/web/components/mcp/index.ts +0 -1
  117. package/src/web/components/meta-agent/MetaAgent.tsx +0 -245
  118. package/src/web/components/onboarding/OnboardingWizard.tsx +0 -404
  119. package/src/web/components/onboarding/index.ts +0 -1
  120. package/src/web/components/settings/SettingsPage.tsx +0 -2776
  121. package/src/web/components/settings/index.ts +0 -1
  122. package/src/web/components/skills/SkillsPage.tsx +0 -1200
  123. package/src/web/components/tasks/TasksPage.tsx +0 -1116
  124. package/src/web/components/tasks/index.ts +0 -1
  125. package/src/web/components/telemetry/TelemetryPage.tsx +0 -1129
  126. package/src/web/components/tests/TestsPage.tsx +0 -594
  127. package/src/web/components/threads/ThreadsPage.tsx +0 -315
  128. package/src/web/context/AuthContext.tsx +0 -242
  129. package/src/web/context/ProjectContext.tsx +0 -214
  130. package/src/web/context/TelemetryContext.tsx +0 -299
  131. package/src/web/context/ThemeContext.tsx +0 -90
  132. package/src/web/context/UIModeContext.tsx +0 -49
  133. package/src/web/context/index.ts +0 -12
  134. package/src/web/hooks/index.ts +0 -3
  135. package/src/web/hooks/useAgents.ts +0 -115
  136. package/src/web/hooks/useOnboarding.ts +0 -20
  137. package/src/web/hooks/useProviders.ts +0 -75
  138. package/src/web/icon.png +0 -0
  139. package/src/web/index.html +0 -16
  140. package/src/web/styles.css +0 -118
  141. package/src/web/themes.ts +0 -162
  142. package/src/web/types.ts +0 -298
@@ -1,318 +0,0 @@
1
- // Skills Integration Provider
2
- // Fetches from public GitHub repositories
3
-
4
- export interface MarketplaceSkill {
5
- id: string;
6
- name: string;
7
- description: string;
8
- content: string; // Full SKILL.md content
9
- author: string;
10
- version: string;
11
- license: string | null;
12
- compatibility: string | null;
13
- tags: string[];
14
- downloads: number;
15
- rating: number;
16
- repository: string | null;
17
- created_at: string;
18
- updated_at: string;
19
- }
20
-
21
- export interface SkillsSearchResult {
22
- skills: MarketplaceSkill[];
23
- total: number;
24
- page: number;
25
- per_page: number;
26
- }
27
-
28
- // GitHub repo sources
29
- // Add more repositories here as the skills ecosystem grows
30
- // Each repo should have folders containing SKILL.md files with YAML frontmatter
31
- const GITHUB_REPOS = [
32
- {
33
- owner: "anthropics",
34
- repo: "skills",
35
- path: "skills",
36
- author: "Anthropic",
37
- },
38
- // Community repos can be added here, e.g.:
39
- // { owner: "some-org", repo: "claude-skills", path: "skills", author: "Community" },
40
- ];
41
-
42
- // Cache for fetched skills (TTL: 5 minutes)
43
- let skillsCache: { skills: MarketplaceSkill[]; fetchedAt: number } | null = null;
44
- const CACHE_TTL = 5 * 60 * 1000;
45
-
46
- // Fetch all skills from GitHub repos
47
- async function fetchAllSkills(): Promise<MarketplaceSkill[]> {
48
- // Check cache
49
- if (skillsCache && Date.now() - skillsCache.fetchedAt < CACHE_TTL) {
50
- return skillsCache.skills;
51
- }
52
-
53
- const allSkills: MarketplaceSkill[] = [];
54
-
55
- for (const repo of GITHUB_REPOS) {
56
- try {
57
- // Fetch directory listing
58
- const listRes = await fetch(
59
- `https://api.github.com/repos/${repo.owner}/${repo.repo}/contents/${repo.path}`,
60
- {
61
- headers: {
62
- Accept: "application/vnd.github.v3+json",
63
- "User-Agent": "Apteva-Skills-Fetcher",
64
- },
65
- }
66
- );
67
-
68
- if (!listRes.ok) {
69
- console.error(`Failed to fetch ${repo.owner}/${repo.repo}: ${listRes.status}`);
70
- continue;
71
- }
72
-
73
- const items = (await listRes.json()) as Array<{
74
- name: string;
75
- type: string;
76
- path: string;
77
- }>;
78
-
79
- // Filter directories only
80
- const skillDirs = items.filter((item) => item.type === "dir");
81
-
82
- // Fetch each skill's SKILL.md
83
- const skillPromises = skillDirs.map(async (dir) => {
84
- try {
85
- const skillMdRes = await fetch(
86
- `https://raw.githubusercontent.com/${repo.owner}/${repo.repo}/main/${dir.path}/SKILL.md`,
87
- {
88
- headers: { "User-Agent": "Apteva-Skills-Fetcher" },
89
- }
90
- );
91
-
92
- if (!skillMdRes.ok) {
93
- return null;
94
- }
95
-
96
- const content = await skillMdRes.text();
97
- const parsed = parseSkillMd(content);
98
-
99
- if (!parsed) {
100
- return null;
101
- }
102
-
103
- return {
104
- id: `${repo.owner}-${dir.name}`,
105
- name: parsed.name,
106
- description: parsed.description,
107
- content,
108
- author: repo.author,
109
- version: parsed.metadata?.version || "1.0.0",
110
- license: parsed.license || "MIT",
111
- compatibility: parsed.compatibility || null,
112
- tags: inferTags(dir.name, parsed.description),
113
- downloads: 0, // Not available from GitHub
114
- rating: 4.5, // Default rating
115
- repository: `https://github.com/${repo.owner}/${repo.repo}/tree/main/${dir.path}`,
116
- created_at: new Date().toISOString(),
117
- updated_at: new Date().toISOString(),
118
- } as MarketplaceSkill;
119
- } catch (e) {
120
- console.error(`Failed to fetch skill ${dir.name}:`, e);
121
- return null;
122
- }
123
- });
124
-
125
- const skills = (await Promise.all(skillPromises)).filter(
126
- (s): s is MarketplaceSkill => s !== null
127
- );
128
- allSkills.push(...skills);
129
- } catch (e) {
130
- console.error(`Failed to fetch from ${repo.owner}/${repo.repo}:`, e);
131
- }
132
- }
133
-
134
- // Update cache
135
- skillsCache = { skills: allSkills, fetchedAt: Date.now() };
136
-
137
- return allSkills;
138
- }
139
-
140
- // Infer tags from skill name and description
141
- function inferTags(name: string, description: string): string[] {
142
- const tags: string[] = [];
143
- const text = `${name} ${description}`.toLowerCase();
144
-
145
- const tagKeywords: Record<string, string[]> = {
146
- pdf: ["pdf"],
147
- document: ["doc", "docx", "document", "word"],
148
- spreadsheet: ["xlsx", "excel", "spreadsheet"],
149
- presentation: ["pptx", "powerpoint", "slides", "presentation"],
150
- design: ["design", "ui", "frontend", "canvas", "art"],
151
- code: ["code", "programming", "developer", "builder"],
152
- mcp: ["mcp"],
153
- testing: ["test", "testing", "qa"],
154
- communication: ["slack", "comms", "communication"],
155
- brand: ["brand", "guidelines"],
156
- };
157
-
158
- for (const [tag, keywords] of Object.entries(tagKeywords)) {
159
- if (keywords.some((kw) => text.includes(kw))) {
160
- tags.push(tag);
161
- }
162
- }
163
-
164
- return tags.length > 0 ? tags : ["general"];
165
- }
166
-
167
- // Provider interface
168
- export interface SkillsProvider {
169
- id: string;
170
- name: string;
171
- search(query: string, page?: number): Promise<SkillsSearchResult>;
172
- getSkill(skillId: string): Promise<MarketplaceSkill | null>;
173
- getFeatured(): Promise<MarketplaceSkill[]>;
174
- getCategories(): Promise<string[]>;
175
- }
176
-
177
- export const GithubSkillsProvider: SkillsProvider = {
178
- id: "github",
179
- name: "GitHub Public Skills",
180
-
181
- async search(query: string, page = 1): Promise<SkillsSearchResult> {
182
- const allSkills = await fetchAllSkills();
183
-
184
- if (!query.trim()) {
185
- return {
186
- skills: allSkills,
187
- total: allSkills.length,
188
- page: 1,
189
- per_page: 50,
190
- };
191
- }
192
-
193
- const lowerQuery = query.toLowerCase();
194
- const filtered = allSkills.filter(
195
- (s) =>
196
- s.name.toLowerCase().includes(lowerQuery) ||
197
- s.description.toLowerCase().includes(lowerQuery) ||
198
- s.tags.some((t) => t.toLowerCase().includes(lowerQuery))
199
- );
200
-
201
- return {
202
- skills: filtered,
203
- total: filtered.length,
204
- page: 1,
205
- per_page: 50,
206
- };
207
- },
208
-
209
- async getSkill(skillId: string): Promise<MarketplaceSkill | null> {
210
- const allSkills = await fetchAllSkills();
211
- return allSkills.find((s) => s.id === skillId) || null;
212
- },
213
-
214
- async getFeatured(): Promise<MarketplaceSkill[]> {
215
- const allSkills = await fetchAllSkills();
216
- // Return all skills sorted by name
217
- return [...allSkills].sort((a, b) => a.name.localeCompare(b.name));
218
- },
219
-
220
- async getCategories(): Promise<string[]> {
221
- const allSkills = await fetchAllSkills();
222
- const tags = new Set<string>();
223
- allSkills.forEach((s) => s.tags.forEach((t) => tags.add(t)));
224
- return Array.from(tags).sort();
225
- },
226
- };
227
-
228
- // Legacy export for compatibility (uses GitHub provider now)
229
- export const SkillsmpProvider = {
230
- id: "skillsmp",
231
- name: "SkillsMP",
232
-
233
- async search(apiKey: string, query: string, page = 1): Promise<SkillsSearchResult> {
234
- // Ignore API key, use GitHub provider
235
- return GithubSkillsProvider.search(query, page);
236
- },
237
-
238
- async getSkill(apiKey: string, skillId: string): Promise<MarketplaceSkill | null> {
239
- return GithubSkillsProvider.getSkill(skillId);
240
- },
241
-
242
- async getFeatured(apiKey: string): Promise<MarketplaceSkill[]> {
243
- return GithubSkillsProvider.getFeatured();
244
- },
245
-
246
- async getCategories(apiKey: string): Promise<string[]> {
247
- return GithubSkillsProvider.getCategories();
248
- },
249
- };
250
-
251
- // Parse SKILL.md content into structured data
252
- export function parseSkillMd(content: string): {
253
- name: string;
254
- description: string;
255
- body: string;
256
- license?: string;
257
- compatibility?: string;
258
- metadata?: Record<string, string>;
259
- allowedTools?: string[];
260
- } | null {
261
- // Check for YAML frontmatter
262
- const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
263
- if (!frontmatterMatch) {
264
- return null;
265
- }
266
-
267
- const [, frontmatter, body] = frontmatterMatch;
268
-
269
- // Parse YAML (simple parser for common fields)
270
- const yaml: Record<string, any> = {};
271
- const lines = frontmatter.split("\n");
272
- let inMetadata = false;
273
-
274
- for (const line of lines) {
275
- if (line.startsWith("metadata:")) {
276
- inMetadata = true;
277
- yaml.metadata = {};
278
- continue;
279
- }
280
-
281
- if (inMetadata) {
282
- if (line.startsWith(" ")) {
283
- const match = line.trim().match(/^(\w+):\s*["']?(.*)["']?$/);
284
- if (match) {
285
- yaml.metadata[match[1]] = match[2].replace(/["']$/, "");
286
- }
287
- } else {
288
- inMetadata = false;
289
- }
290
- }
291
-
292
- if (!inMetadata) {
293
- const match = line.match(/^(\w[\w-]*):\s*(.*)$/);
294
- if (match) {
295
- const [, key, value] = match;
296
- yaml[key] = value.replace(/^["']|["']$/g, "");
297
- }
298
- }
299
- }
300
-
301
- if (!yaml.name || !yaml.description) {
302
- return null;
303
- }
304
-
305
- return {
306
- name: yaml.name,
307
- description: yaml.description,
308
- body: body.trim(),
309
- license: yaml.license,
310
- compatibility: yaml.compatibility,
311
- metadata: yaml.metadata,
312
- allowedTools: yaml["allowed-tools"]?.split(/\s+/).filter(Boolean),
313
- };
314
- }
315
-
316
- // Re-export types for backwards compatibility
317
- export type SkillsmpSkill = MarketplaceSkill;
318
- export type SkillsmpSearchResult = SkillsSearchResult;