@nordsym/apiclaw 1.5.16 → 1.5.18

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 (172) hide show
  1. package/convex/http.js +196 -0
  2. package/convex/http.js.map +1 -1
  3. package/convex/http.ts +201 -0
  4. package/convex/http.ts.bak +934 -0
  5. package/dist/analytics.d.ts +0 -4
  6. package/dist/analytics.d.ts.map +1 -1
  7. package/dist/analytics.js +0 -1
  8. package/dist/analytics.js.map +1 -1
  9. package/dist/bin.js +1 -1
  10. package/dist/cli/commands/mcp-install.d.ts.map +1 -1
  11. package/dist/cli/commands/mcp-install.js +8 -87
  12. package/dist/cli/commands/mcp-install.js.map +1 -1
  13. package/dist/cli/index.js +0 -7
  14. package/dist/credentials.d.ts.map +1 -1
  15. package/dist/credentials.js +0 -128
  16. package/dist/credentials.js.map +1 -1
  17. package/dist/discovery.d.ts.map +1 -1
  18. package/dist/discovery.js +82 -191
  19. package/dist/discovery.js.map +1 -1
  20. package/dist/http-api.d.ts.map +1 -1
  21. package/dist/http-api.js +33 -17
  22. package/dist/http-api.js.map +1 -1
  23. package/dist/proxy.js +1 -1
  24. package/dist/proxy.js.map +1 -1
  25. package/landing/next-env.d.ts +0 -1
  26. package/landing/src/app/api/auth/magic-link/route.ts +1 -1
  27. package/landing/src/app/auth/verify/page.tsx +0 -6
  28. package/landing/src/app/dashboard/verify/page.tsx +0 -6
  29. package/landing/src/app/join/page.tsx +0 -6
  30. package/landing/src/app/layout.tsx +2 -2
  31. package/landing/src/app/login/page.tsx +1 -1
  32. package/landing/src/app/mou/[partnerId]/page.tsx +0 -6
  33. package/landing/src/app/page.tsx +18 -39
  34. package/landing/src/app/providers/dashboard/[apiId]/actions/[actionId]/edit/page.tsx +0 -6
  35. package/landing/src/app/providers/dashboard/[apiId]/actions/new/page.tsx +0 -5
  36. package/landing/src/app/providers/dashboard/[apiId]/actions/page.tsx +0 -5
  37. package/landing/src/app/providers/dashboard/[apiId]/direct-call/page.tsx +1 -6
  38. package/landing/src/app/providers/dashboard/[apiId]/page.tsx +0 -5
  39. package/landing/src/app/providers/dashboard/[apiId]/test/page.tsx +0 -5
  40. package/landing/src/app/providers/dashboard/layout.tsx +6 -6
  41. package/landing/src/app/providers/dashboard/login/page.tsx +1 -1
  42. package/landing/src/app/providers/dashboard/page.tsx +1 -1
  43. package/landing/src/app/providers/dashboard/verify/page.tsx +0 -6
  44. package/landing/src/app/providers/layout.tsx +1 -1
  45. package/landing/src/app/upgrade/page.tsx +0 -6
  46. package/landing/src/app/workspace/page.tsx +0 -6
  47. package/landing/src/components/HeroTabs.tsx +2 -2
  48. package/landing/src/components/{Workspace.tsx → ProviderDashboard.tsx} +2 -2
  49. package/landing/src/components/VideoDemo.tsx +10 -21
  50. package/landing/src/lib/mock-data.ts +1 -1
  51. package/landing/src/lib/stats.json +1 -1
  52. package/package.json +4 -6
  53. package/src/analytics.ts +0 -5
  54. package/src/bin.ts +1 -1
  55. package/src/cli/commands/mcp-install.ts +8 -90
  56. package/src/cli/index.ts +0 -8
  57. package/src/credentials.ts +0 -136
  58. package/src/discovery.ts +82 -191
  59. package/src/http-api.ts +34 -18
  60. package/src/proxy.ts +1 -1
  61. package/APILAYER_STATUS_2026-03-24.md +0 -38
  62. package/CHANGELOG-WHITELIST-V2.md +0 -269
  63. package/HIVR-WHITELIST-STATUS.md +0 -205
  64. package/HIVR-WHITELIST.md +0 -148
  65. package/TERMINOLOGY-AUDIT.md +0 -99
  66. package/TERMINOLOGY-FIXED.md +0 -74
  67. package/VIDEO-DEMO-GUIDE.md +0 -82
  68. package/WHITELIST-ARCHITECTURE.md +0 -379
  69. package/api/discover.ts +0 -71
  70. package/api/health.ts +0 -20
  71. package/direct-test.mjs +0 -51
  72. package/dist/access-control.d.ts +0 -45
  73. package/dist/access-control.d.ts.map +0 -1
  74. package/dist/access-control.js +0 -142
  75. package/dist/access-control.js.map +0 -1
  76. package/dist/chain-types.d.ts +0 -187
  77. package/dist/chain-types.d.ts.map +0 -1
  78. package/dist/chain-types.js +0 -33
  79. package/dist/chain-types.js.map +0 -1
  80. package/dist/convex/adminActivate.js +0 -46
  81. package/dist/convex/adminStats.js +0 -41
  82. package/dist/convex/agents.js +0 -498
  83. package/dist/convex/analytics.js +0 -165
  84. package/dist/convex/billing.js +0 -654
  85. package/dist/convex/capabilities.js +0 -144
  86. package/dist/convex/chains.js +0 -1041
  87. package/dist/convex/credits.js +0 -185
  88. package/dist/convex/crons.js +0 -16
  89. package/dist/convex/directCall.js +0 -626
  90. package/dist/convex/earnProgress.js +0 -648
  91. package/dist/convex/email.js +0 -299
  92. package/dist/convex/feedback.js +0 -226
  93. package/dist/convex/http.js +0 -909
  94. package/dist/convex/logs.js +0 -486
  95. package/dist/convex/mou.js +0 -81
  96. package/dist/convex/providerKeys.js +0 -256
  97. package/dist/convex/providers.js +0 -755
  98. package/dist/convex/purchases.js +0 -156
  99. package/dist/convex/ratelimit.js +0 -90
  100. package/dist/convex/schema.js +0 -709
  101. package/dist/convex/searchLogs.js +0 -128
  102. package/dist/convex/spendAlerts.js +0 -379
  103. package/dist/convex/stripeActions.js +0 -410
  104. package/dist/convex/teams.js +0 -214
  105. package/dist/convex/telemetry.js +0 -73
  106. package/dist/convex/usage.js +0 -228
  107. package/dist/convex/waitlist.js +0 -48
  108. package/dist/convex/webhooks.js +0 -409
  109. package/dist/convex/workspaces.js +0 -879
  110. package/dist/hivr-whitelist.d.ts +0 -18
  111. package/dist/hivr-whitelist.d.ts.map +0 -1
  112. package/dist/hivr-whitelist.js +0 -95
  113. package/dist/hivr-whitelist.js.map +0 -1
  114. package/dist/http-server-minimal.d.ts +0 -7
  115. package/dist/http-server-minimal.d.ts.map +0 -1
  116. package/dist/http-server-minimal.js +0 -126
  117. package/dist/http-server-minimal.js.map +0 -1
  118. package/dist/product-whitelist.d.ts +0 -37
  119. package/dist/product-whitelist.d.ts.map +0 -1
  120. package/dist/product-whitelist.js +0 -203
  121. package/dist/product-whitelist.js.map +0 -1
  122. package/dist/src/analytics.js +0 -129
  123. package/dist/src/bin.js +0 -17
  124. package/dist/src/capability-router.js +0 -240
  125. package/dist/src/chainExecutor.js +0 -451
  126. package/dist/src/chainResolver.js +0 -518
  127. package/dist/src/cli/commands/doctor.js +0 -324
  128. package/dist/src/cli/commands/mcp-install.js +0 -255
  129. package/dist/src/cli/commands/restore.js +0 -259
  130. package/dist/src/cli/commands/setup.js +0 -205
  131. package/dist/src/cli/commands/uninstall.js +0 -188
  132. package/dist/src/cli/index.js +0 -111
  133. package/dist/src/cli.js +0 -302
  134. package/dist/src/confirmation.js +0 -240
  135. package/dist/src/credentials.js +0 -357
  136. package/dist/src/credits.js +0 -260
  137. package/dist/src/crypto.js +0 -66
  138. package/dist/src/discovery.js +0 -504
  139. package/dist/src/enterprise/env.js +0 -123
  140. package/dist/src/enterprise/script-generator.js +0 -460
  141. package/dist/src/execute-dynamic.js +0 -473
  142. package/dist/src/execute.js +0 -1727
  143. package/dist/src/index.js +0 -2062
  144. package/dist/src/metered.js +0 -80
  145. package/dist/src/open-apis.js +0 -276
  146. package/dist/src/proxy.js +0 -28
  147. package/dist/src/session.js +0 -86
  148. package/dist/src/stripe.js +0 -407
  149. package/dist/src/telemetry.js +0 -49
  150. package/dist/src/types.js +0 -2
  151. package/dist/src/utils/backup.js +0 -181
  152. package/dist/src/utils/config.js +0 -220
  153. package/dist/src/utils/os.js +0 -105
  154. package/dist/src/utils/paths.js +0 -159
  155. package/landing/pages/api/discover.ts +0 -43
  156. package/landing/pages/api/health.ts +0 -20
  157. package/scripts/test-whitelist-v2.sh +0 -128
  158. package/src/access-control.ts +0 -174
  159. package/src/hivr-whitelist.ts +0 -110
  160. package/src/http-server-minimal.ts +0 -154
  161. package/src/product-whitelist.ts +0 -246
  162. package/test-actual-handlers.ts +0 -92
  163. package/test-apilayer-all-14.ts +0 -249
  164. package/test-apilayer-fixed.ts +0 -248
  165. package/test-direct-endpoints.ts +0 -174
  166. package/test-exact-endpoints.ts +0 -144
  167. package/test-final.ts +0 -83
  168. package/test-full-routing.ts +0 -100
  169. package/test-handlers-correct.ts +0 -217
  170. package/test-numverify-key.ts +0 -41
  171. package/test-via-handlers.ts +0 -92
  172. package/test-worldnews.mjs +0 -26
@@ -7,7 +7,6 @@
7
7
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
8
8
  import { dirname, join } from 'path';
9
9
  import { platform, homedir } from 'os';
10
- import { execSync } from 'child_process';
11
10
  import chalk from 'chalk';
12
11
 
13
12
  export interface MCPInstallOptions {
@@ -75,15 +74,6 @@ function getClientConfigs(): ClientConfig[] {
75
74
  return join(home, '.claude.json');
76
75
  },
77
76
  },
78
- {
79
- name: 'codex',
80
- displayName: 'Codex (OpenAI)',
81
- configKey: 'mcp',
82
- getConfigPath: () => {
83
- // Codex uses ~/.codex/config.toml
84
- return join(home, '.codex', 'config.toml');
85
- },
86
- },
87
77
  ];
88
78
 
89
79
  return clients;
@@ -148,62 +138,10 @@ function writeConfig(path: string, config: any, createBackup = true): { success:
148
138
  }
149
139
  }
150
140
 
151
- /**
152
- * Check if Codex CLI is available
153
- */
154
- function isCodexAvailable(): boolean {
155
- try {
156
- execSync('codex --version', { stdio: 'pipe' });
157
- return true;
158
- } catch {
159
- return false;
160
- }
161
- }
162
-
163
- /**
164
- * Install APIClaw to Codex using CLI
165
- */
166
- function installToCodex(dryRun: boolean): { success: boolean; message: string; skipped?: boolean } {
167
- if (!isCodexAvailable()) {
168
- return { success: false, message: 'Codex CLI not found' };
169
- }
170
-
171
- try {
172
- // Check if already installed
173
- try {
174
- const output = execSync('codex mcp get apiclaw', { encoding: 'utf-8', stdio: 'pipe' });
175
- if (output.includes('apiclaw')) {
176
- return { success: true, message: 'Already installed', skipped: true };
177
- }
178
- } catch {
179
- // Not installed, continue
180
- }
181
-
182
- if (dryRun) {
183
- console.log(chalk.cyan('\n Would run: codex mcp add apiclaw -- npx -y @nordsym/apiclaw'));
184
- return { success: true, message: 'Dry run - no changes made', skipped: true };
185
- }
186
-
187
- // Install
188
- execSync('codex mcp add apiclaw -- npx -y @nordsym/apiclaw', { stdio: 'pipe' });
189
- return { success: true, message: 'Installed via CLI' };
190
- } catch (error) {
191
- return {
192
- success: false,
193
- message: error instanceof Error ? error.message : 'Unknown error'
194
- };
195
- }
196
- }
197
-
198
141
  /**
199
142
  * Install APIClaw into a client config
200
143
  */
201
144
  function installToClient(client: ClientConfig, dryRun: boolean): { success: boolean; message: string; skipped?: boolean } {
202
- // Special handling for Codex
203
- if (client.name === 'codex') {
204
- return installToCodex(dryRun);
205
- }
206
-
207
145
  const configPath = client.getConfigPath();
208
146
 
209
147
  // Read existing config
@@ -269,14 +207,12 @@ export async function mcpInstallCommand(options: MCPInstallOptions): Promise<voi
269
207
  'code': 'claude-code',
270
208
  'claude-code': 'claude-code',
271
209
  'claudecode': 'claude-code',
272
- 'codex': 'codex',
273
- 'openai': 'codex',
274
210
  };
275
211
 
276
212
  const targetName = aliases[normalizedClient];
277
213
  if (!targetName) {
278
214
  console.log(chalk.red(`❌ Unknown client: ${options.client}`));
279
- console.log(' Supported: claude-desktop, claude-code, codex');
215
+ console.log(' Supported: claude-desktop, claude-code');
280
216
  process.exit(1);
281
217
  }
282
218
 
@@ -288,17 +224,9 @@ export async function mcpInstallCommand(options: MCPInstallOptions): Promise<voi
288
224
 
289
225
  const detectedClients: ClientConfig[] = [];
290
226
  for (const client of targetClients) {
291
- let exists = false;
292
-
293
- // Special detection for Codex (check CLI availability)
294
- if (client.name === 'codex') {
295
- exists = isCodexAvailable();
296
- } else {
297
- // For JSON-based configs, check file/dir existence
298
- const configPath = client.getConfigPath();
299
- const configDir = dirname(configPath);
300
- exists = existsSync(configPath) || existsSync(configDir);
301
- }
227
+ const configPath = client.getConfigPath();
228
+ const configDir = dirname(configPath);
229
+ const exists = existsSync(configPath) || existsSync(configDir);
302
230
 
303
231
  const icon = exists ? chalk.green('✓') : chalk.gray('✗');
304
232
  const status = exists ? 'found' : 'not found';
@@ -347,23 +275,13 @@ export async function mcpInstallCommand(options: MCPInstallOptions): Promise<voi
347
275
  console.log(chalk.cyan('\n✅ Dry run complete! Run without --dry-run to apply changes.\n'));
348
276
  } else if (successCount > 0) {
349
277
  console.log(chalk.green('\n✅ APIClaw installed successfully!\n'));
350
- console.log(chalk.bold('What you get:\n'));
351
- console.log(chalk.cyan(' 🔍 Search') + ' 22,000+ APIs to discover');
352
- console.log(chalk.cyan(' 🌐 Open APIs') + ' 1,600 free APIs');
353
- console.log(chalk.cyan(' 🔑 Direct Call') + ' 1,500+ premium (APIClaw manages keys)');
278
+ console.log('Next steps:');
279
+ console.log(' 1. Restart your MCP client (Claude Desktop/Code)');
280
+ console.log(' 2. Ask: "List available APIs"');
354
281
  console.log('');
355
- console.log('Next:');
356
- console.log(' 1. Restart your MCP client');
357
- console.log(' 2. Try: "Find weather APIs"');
358
- console.log('');
359
- console.log('Docs: https://apiclaw.com/docs\n');
282
+ console.log('Need help? https://apiclaw.com/docs\n');
360
283
  } else {
361
284
  console.log(chalk.yellow('\n✅ APIClaw already installed in all clients.\n'));
362
- console.log(chalk.bold('What you have:\n'));
363
- console.log(chalk.cyan(' 🔍 Search') + ' 22,000+ APIs to discover');
364
- console.log(chalk.cyan(' 🌐 Open APIs') + ' 1,600 free APIs');
365
- console.log(chalk.cyan(' 🔑 Direct Call') + ' 1,500+ premium (APIClaw manages keys)');
366
- console.log('');
367
285
  console.log('Run with --force to reinstall (coming soon).\n');
368
286
  }
369
287
  } else {
package/src/cli/index.ts CHANGED
@@ -107,14 +107,6 @@ program
107
107
  .option('-f, --force', 'Remove even if not configured')
108
108
  .action(uninstallCommand);
109
109
 
110
- // MCP Uninstall alias - same as uninstall but for consistency with mcp-install
111
- program
112
- .command('mcp-uninstall')
113
- .description('Remove APIClaw from Claude Desktop or Claude Code MCP config')
114
- .option('-c, --client <client>', 'Target specific client (claude-desktop, claude-code)')
115
- .option('--dry-run', 'Show what would be done without making changes')
116
- .action(uninstallCommand);
117
-
118
110
  // Parse and execute
119
111
  program.parse();
120
112
 
@@ -183,102 +183,6 @@ const providers: Record<string, ProviderCredential> = {
183
183
  return { type: 'api_key', api_key: keys.APILAYER_EXCHANGERATE_KEY || '', ...keys } as any;
184
184
  },
185
185
  },
186
-
187
- groq: {
188
- type: 'bearer',
189
- get(): APICredentials | null {
190
- const env = loadEnvFile('groq.env');
191
- const key = env.GROQ_API_KEY || process.env.GROQ_API_KEY;
192
- if (key) {
193
- return { type: 'bearer', api_key: key };
194
- }
195
- return null;
196
- },
197
- },
198
-
199
- deepgram: {
200
- type: 'bearer',
201
- get(): APICredentials | null {
202
- const env = loadEnvFile('deepgram.env');
203
- const key = env.DEEPGRAM_API_KEY || process.env.DEEPGRAM_API_KEY;
204
- if (key) {
205
- return { type: 'bearer', api_key: key };
206
- }
207
- return null;
208
- },
209
- },
210
-
211
- mistral: {
212
- type: 'api_key',
213
- get(): APICredentials | null {
214
- const env = loadEnvFile('mistral.env');
215
- const key = env.MISTRAL_API_KEY || process.env.MISTRAL_API_KEY;
216
- if (key) {
217
- return { type: 'api_key', api_key: key };
218
- }
219
- return null;
220
- },
221
- },
222
-
223
- cohere: {
224
- type: 'api_key',
225
- get(): APICredentials | null {
226
- const env = loadEnvFile('cohere.env');
227
- const key = env.COHERE_API_KEY || process.env.COHERE_API_KEY;
228
- if (key) {
229
- return { type: 'api_key', api_key: key };
230
- }
231
- return null;
232
- },
233
- },
234
-
235
- serper: {
236
- type: 'api_key',
237
- get(): APICredentials | null {
238
- const env = loadEnvFile('serpapi.env');
239
- const key = env.SERPAPI_API_KEY || process.env.SERPER_API_KEY || process.env.SERPAPI_API_KEY;
240
- if (key) {
241
- return { type: 'api_key', api_key: key };
242
- }
243
- return null;
244
- },
245
- },
246
-
247
- stability: {
248
- type: 'api_key',
249
- get(): APICredentials | null {
250
- const env = loadEnvFile('stability.env');
251
- const key = env.STABILITY_API_KEY || process.env.STABILITY_API_KEY;
252
- if (key) {
253
- return { type: 'api_key', api_key: key };
254
- }
255
- return null;
256
- },
257
- },
258
-
259
- together: {
260
- type: 'bearer',
261
- get(): APICredentials | null {
262
- const env = loadEnvFile('together.env');
263
- const key = env.TOGETHER_API_KEY || process.env.TOGETHER_API_KEY;
264
- if (key) {
265
- return { type: 'bearer', api_key: key };
266
- }
267
- return null;
268
- },
269
- },
270
-
271
- assemblyai: {
272
- type: 'api_key',
273
- get(): APICredentials | null {
274
- const env = loadEnvFile('assemblyai.env');
275
- const key = env.ASSEMBLYAI_API_KEY || process.env.ASSEMBLYAI_API_KEY;
276
- if (key) {
277
- return { type: 'api_key', api_key: key };
278
- }
279
- return null;
280
- },
281
- },
282
186
  };
283
187
 
284
188
  /**
@@ -327,50 +231,10 @@ export function hasRealCredentials(providerId: string): boolean {
327
231
  const env = loadEnvFile('e2b.env');
328
232
  return !!(env.E2B_API_KEY || process.env.E2B_API_KEY);
329
233
  }
330
- if (providerId === 'firecrawl') {
331
- const env = loadEnvFile('firecrawl.env');
332
- return !!(env.FIRECRAWL_API_KEY || process.env.FIRECRAWL_API_KEY);
333
- }
334
- if (providerId === 'github') {
335
- const env = loadEnvFile('github.env');
336
- return !!(env.GITHUB_TOKEN || process.env.GITHUB_TOKEN);
337
- }
338
234
  if (providerId === 'apilayer') {
339
235
  const env = loadEnvFile('apilayer.env');
340
236
  return !!(env.APILAYER_EXCHANGERATE_KEY || process.env.APILAYER_EXCHANGERATE_KEY);
341
237
  }
342
- if (providerId === 'groq') {
343
- const env = loadEnvFile('groq.env');
344
- return !!(env.GROQ_API_KEY || process.env.GROQ_API_KEY);
345
- }
346
- if (providerId === 'deepgram') {
347
- const env = loadEnvFile('deepgram.env');
348
- return !!(env.DEEPGRAM_API_KEY || process.env.DEEPGRAM_API_KEY);
349
- }
350
- if (providerId === 'mistral') {
351
- const env = loadEnvFile('mistral.env');
352
- return !!(env.MISTRAL_API_KEY || process.env.MISTRAL_API_KEY);
353
- }
354
- if (providerId === 'cohere') {
355
- const env = loadEnvFile('cohere.env');
356
- return !!(env.COHERE_API_KEY || process.env.COHERE_API_KEY);
357
- }
358
- if (providerId === 'serper') {
359
- const env = loadEnvFile('serpapi.env');
360
- return !!(env.SERPAPI_API_KEY || process.env.SERPER_API_KEY || process.env.SERPAPI_API_KEY);
361
- }
362
- if (providerId === 'stability') {
363
- const env = loadEnvFile('stability.env');
364
- return !!(env.STABILITY_API_KEY || process.env.STABILITY_API_KEY);
365
- }
366
- if (providerId === 'together') {
367
- const env = loadEnvFile('together.env');
368
- return !!(env.TOGETHER_API_KEY || process.env.TOGETHER_API_KEY);
369
- }
370
- if (providerId === 'assemblyai') {
371
- const env = loadEnvFile('assemblyai.env');
372
- return !!(env.ASSEMBLYAI_API_KEY || process.env.ASSEMBLYAI_API_KEY);
373
- }
374
238
  return false;
375
239
  }
376
240
 
package/src/discovery.ts CHANGED
@@ -17,13 +17,73 @@ const apisData = JSON.parse(
17
17
  const apis: APIProvider[] = apisData.apis;
18
18
 
19
19
  // Direct Call provider specs (hardcoded handlers with params)
20
- // Ordered: AI-first (models, LLM routing, audio), then infrastructure (code, web, search, email, SMS)
21
20
  const DIRECT_CALL_SPECS: Record<string, {
22
21
  description: string;
23
22
  auth: string;
24
23
  docs: string;
25
24
  actions: Record<string, { params: { name: string; required: boolean; desc: string }[]; desc: string }>;
26
25
  }> = {
26
+ '46elks': {
27
+ description: 'Swedish SMS and voice API',
28
+ auth: 'basic',
29
+ docs: 'https://46elks.com/docs',
30
+ actions: {
31
+ send_sms: {
32
+ desc: 'Send SMS message',
33
+ params: [
34
+ { name: 'to', required: true, desc: 'Phone number (+46...)' },
35
+ { name: 'message', required: true, desc: 'SMS text (max 160 chars for 1 segment)' },
36
+ { name: 'from', required: false, desc: 'Sender ID (default: APIClaw)' },
37
+ ],
38
+ },
39
+ },
40
+ },
41
+ twilio: {
42
+ description: 'Global SMS and voice API',
43
+ auth: 'basic',
44
+ docs: 'https://www.twilio.com/docs',
45
+ actions: {
46
+ send_sms: {
47
+ desc: 'Send SMS message',
48
+ params: [
49
+ { name: 'to', required: true, desc: 'Phone number (E.164 format)' },
50
+ { name: 'message', required: true, desc: 'SMS text' },
51
+ { name: 'from', required: false, desc: 'Sender phone number' },
52
+ ],
53
+ },
54
+ },
55
+ },
56
+ brave_search: {
57
+ description: 'Web search API',
58
+ auth: 'api_key',
59
+ docs: 'https://api.search.brave.com/docs',
60
+ actions: {
61
+ search: {
62
+ desc: 'Search the web',
63
+ params: [
64
+ { name: 'query', required: true, desc: 'Search query' },
65
+ { name: 'count', required: false, desc: 'Number of results (default: 5)' },
66
+ ],
67
+ },
68
+ },
69
+ },
70
+ resend: {
71
+ description: 'Email API',
72
+ auth: 'bearer',
73
+ docs: 'https://resend.com/docs',
74
+ actions: {
75
+ send_email: {
76
+ desc: 'Send email',
77
+ params: [
78
+ { name: 'to', required: true, desc: 'Recipient email' },
79
+ { name: 'subject', required: true, desc: 'Email subject' },
80
+ { name: 'html', required: false, desc: 'HTML body' },
81
+ { name: 'text', required: false, desc: 'Plain text body' },
82
+ { name: 'from', required: false, desc: 'Sender (default: noreply@apiclaw.nordsym.com)' },
83
+ ],
84
+ },
85
+ },
86
+ },
27
87
  openrouter: {
28
88
  description: 'LLM routing (100+ models)',
29
89
  auth: 'bearer',
@@ -39,24 +99,6 @@ const DIRECT_CALL_SPECS: Record<string, {
39
99
  },
40
100
  },
41
101
  },
42
- replicate: {
43
- description: 'Run any AI model (images, video, audio)',
44
- auth: 'bearer',
45
- docs: 'https://replicate.com/docs',
46
- actions: {
47
- run: {
48
- desc: 'Run a model',
49
- params: [
50
- { name: 'model', required: true, desc: 'Model ID (e.g., stability-ai/sdxl:...)' },
51
- { name: 'input', required: true, desc: 'Model input parameters' },
52
- ],
53
- },
54
- list_models: {
55
- desc: 'List available models',
56
- params: [],
57
- },
58
- },
59
- },
60
102
  elevenlabs: {
61
103
  description: 'Text-to-speech',
62
104
  auth: 'api_key',
@@ -72,23 +114,21 @@ const DIRECT_CALL_SPECS: Record<string, {
72
114
  },
73
115
  },
74
116
  },
75
- e2b: {
76
- description: 'Code sandbox for AI agents',
77
- auth: 'api_key',
78
- docs: 'https://e2b.dev/docs',
117
+ replicate: {
118
+ description: 'Run any AI model (images, video, audio)',
119
+ auth: 'bearer',
120
+ docs: 'https://replicate.com/docs',
79
121
  actions: {
80
- run_code: {
81
- desc: 'Execute code in sandbox',
122
+ run: {
123
+ desc: 'Run a model',
82
124
  params: [
83
- { name: 'code', required: true, desc: 'Code to run' },
84
- { name: 'language', required: false, desc: 'Language (default: python)' },
125
+ { name: 'model', required: true, desc: 'Model ID (e.g., stability-ai/sdxl:...)' },
126
+ { name: 'input', required: true, desc: 'Model input parameters' },
85
127
  ],
86
128
  },
87
- run_shell: {
88
- desc: 'Execute shell command',
89
- params: [
90
- { name: 'command', required: true, desc: 'Shell command' },
91
- ],
129
+ list_models: {
130
+ desc: 'List available models',
131
+ params: [],
92
132
  },
93
133
  },
94
134
  },
@@ -166,171 +206,22 @@ const DIRECT_CALL_SPECS: Record<string, {
166
206
  },
167
207
  },
168
208
  },
169
- brave_search: {
170
- description: 'Web search API',
171
- auth: 'api_key',
172
- docs: 'https://api.search.brave.com/docs',
173
- actions: {
174
- search: {
175
- desc: 'Search the web',
176
- params: [
177
- { name: 'query', required: true, desc: 'Search query' },
178
- { name: 'count', required: false, desc: 'Number of results (default: 5)' },
179
- ],
180
- },
181
- },
182
- },
183
- resend: {
184
- description: 'Email API',
185
- auth: 'bearer',
186
- docs: 'https://resend.com/docs',
187
- actions: {
188
- send_email: {
189
- desc: 'Send email',
190
- params: [
191
- { name: 'to', required: true, desc: 'Recipient email' },
192
- { name: 'subject', required: true, desc: 'Email subject' },
193
- { name: 'html', required: false, desc: 'HTML body' },
194
- { name: 'text', required: false, desc: 'Plain text body' },
195
- { name: 'from', required: false, desc: 'Sender (default: noreply@apiclaw.nordsym.com)' },
196
- ],
197
- },
198
- },
199
- },
200
- '46elks': {
201
- description: 'Swedish SMS and voice API',
202
- auth: 'basic',
203
- docs: 'https://46elks.com/docs',
204
- actions: {
205
- send_sms: {
206
- desc: 'Send SMS message',
207
- params: [
208
- { name: 'to', required: true, desc: 'Phone number (+46...)' },
209
- { name: 'message', required: true, desc: 'SMS text (max 160 chars for 1 segment)' },
210
- { name: 'from', required: false, desc: 'Sender ID (default: APIClaw)' },
211
- ],
212
- },
213
- },
214
- },
215
- twilio: {
216
- description: 'Global SMS and voice API',
217
- auth: 'basic',
218
- docs: 'https://www.twilio.com/docs',
219
- actions: {
220
- send_sms: {
221
- desc: 'Send SMS message',
222
- params: [
223
- { name: 'to', required: true, desc: 'Phone number (E.164 format)' },
224
- { name: 'message', required: true, desc: 'SMS text' },
225
- { name: 'from', required: false, desc: 'Sender phone number' },
226
- ],
227
- },
228
- },
229
- },
230
- apilayer: {
231
- description: 'APILayer marketplace — currency, news, scraping, PDFs, verification & more',
209
+ e2b: {
210
+ description: 'Code sandbox for AI agents',
232
211
  auth: 'api_key',
233
- docs: 'https://apilayer.com',
212
+ docs: 'https://e2b.dev/docs',
234
213
  actions: {
235
- exchange_rates: {
236
- desc: 'Get live or historical currency exchange rates',
237
- params: [
238
- { name: 'base', required: false, desc: 'Base currency (default: USD)' },
239
- { name: 'symbols', required: false, desc: 'Comma-separated target currencies' },
240
- { name: 'date', required: false, desc: 'Historical date YYYY-MM-DD (omit for live)' },
241
- ],
242
- },
243
- market_data: {
244
- desc: 'End-of-day stock market data',
245
- params: [
246
- { name: 'symbols', required: true, desc: 'Stock ticker(s), comma-separated e.g. AAPL,MSFT' },
247
- { name: 'date_from', required: false, desc: 'Start date YYYY-MM-DD' },
248
- { name: 'date_to', required: false, desc: 'End date YYYY-MM-DD' },
249
- ],
250
- },
251
- aviation: {
252
- desc: 'Real-time flight data and tracking',
253
- params: [
254
- { name: 'flight_iata', required: false, desc: 'IATA flight number e.g. AA100' },
255
- { name: 'dep_iata', required: false, desc: 'Departure airport IATA code' },
256
- { name: 'arr_iata', required: false, desc: 'Arrival airport IATA code' },
257
- ],
258
- },
259
- pdf_generate: {
260
- desc: 'Generate PDF from URL or HTML',
261
- params: [
262
- { name: 'document_url', required: false, desc: 'URL to convert to PDF' },
263
- { name: 'document_html', required: false, desc: 'HTML string to convert (alternative to URL)' },
264
- { name: 'page_size', required: false, desc: 'Page size: A4, Letter, etc (default: A4)' },
265
- ],
266
- },
267
- screenshot: {
268
- desc: 'Capture full-page screenshot of any URL',
269
- params: [
270
- { name: 'url', required: true, desc: 'URL to screenshot' },
271
- { name: 'viewport', required: false, desc: 'Viewport size e.g. 1440x900 (default)' },
272
- { name: 'fullpage', required: false, desc: '1 for full page, 0 for viewport only (default: 0)' },
273
- ],
274
- },
275
- verify_email: {
276
- desc: 'Validate email address format and deliverability',
277
- params: [
278
- { name: 'email', required: true, desc: 'Email address to verify' },
279
- ],
280
- },
281
- verify_number: {
282
- desc: 'Validate and lookup phone number details',
283
- params: [
284
- { name: 'number', required: true, desc: 'Phone number in E.164 format e.g. +46701234567' },
285
- ],
286
- },
287
- vat_check: {
288
- desc: 'Validate EU VAT number',
289
- params: [
290
- { name: 'vat_number', required: true, desc: 'EU VAT number e.g. SE556012345601' },
291
- ],
292
- },
293
- world_news: {
294
- desc: 'Extract and analyze news articles from a URL',
295
- params: [
296
- { name: 'url', required: true, desc: 'URL of the news article to analyze' },
297
- { name: 'analyze', required: false, desc: 'Whether to analyze the news (default: true)' },
298
- ],
299
- },
300
- finance_news: {
301
- desc: 'Latest financial and stock market news',
302
- params: [
303
- { name: 'tickers', required: false, desc: 'Stock tickers comma-separated e.g. AAPL,TSLA' },
304
- { name: 'text', required: false, desc: 'Keyword filter' },
305
- { name: 'number', required: false, desc: 'Number of results (default: 5)' },
306
- ],
307
- },
308
- scrape: {
309
- desc: 'Advanced web scraper — returns clean page content',
310
- params: [
311
- { name: 'url', required: true, desc: 'URL to scrape' },
312
- ],
313
- },
314
- image_crop: {
315
- desc: 'Smart crop an image to specified dimensions',
316
- params: [
317
- { name: 'url', required: true, desc: 'Image URL to crop' },
318
- { name: 'width', required: false, desc: 'Target width in pixels' },
319
- { name: 'height', required: false, desc: 'Target height in pixels' },
320
- ],
321
- },
322
- skills: {
323
- desc: 'Search 7000+ professional skills database',
214
+ run_code: {
215
+ desc: 'Execute code in sandbox',
324
216
  params: [
325
- { name: 'q', required: true, desc: 'Skill search query e.g. "machine learning"' },
326
- { name: 'count', required: false, desc: 'Number of results (default: 10)' },
217
+ { name: 'code', required: true, desc: 'Code to run' },
218
+ { name: 'language', required: false, desc: 'Language (default: python)' },
327
219
  ],
328
220
  },
329
- form_submit: {
330
- desc: 'Submit form data to a FormAPI endpoint',
221
+ run_shell: {
222
+ desc: 'Execute shell command',
331
223
  params: [
332
- { name: 'endpoint', required: true, desc: 'FormAPI endpoint path' },
333
- { name: 'data', required: false, desc: 'Form data object to submit' },
224
+ { name: 'command', required: true, desc: 'Shell command' },
334
225
  ],
335
226
  },
336
227
  },