@nordsym/apiclaw 1.8.5 → 1.8.7
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 +4 -4
- package/apiclaw-README.md +12 -12
- package/convex/_generated/api.d.ts +16 -0
- package/convex/analytics.d.ts.map +1 -1
- package/convex/analytics.js.map +1 -1
- package/convex/analytics.ts +1 -0
- package/convex/apiKeys.ts +220 -0
- package/convex/backfillAnalytics.d.ts.map +1 -0
- package/convex/backfillAnalytics.js.map +1 -0
- package/convex/backfillAnalytics.ts +22 -0
- package/convex/backfillSearchLogs.d.ts.map +1 -0
- package/convex/backfillSearchLogs.js.map +1 -0
- package/convex/backfillSearchLogs.ts +35 -0
- package/convex/debugFilestackLogs.d.ts.map +1 -0
- package/convex/debugFilestackLogs.js.map +1 -0
- package/convex/debugFilestackLogs.ts +16 -0
- package/convex/debugGetToken.d.ts.map +1 -0
- package/convex/debugGetToken.js.map +1 -0
- package/convex/debugGetToken.ts +18 -0
- package/convex/directCall.ts +49 -14
- package/convex/email.ts +5 -5
- package/convex/http.d.ts.map +1 -1
- package/convex/http.js.map +1 -1
- package/convex/http.ts +611 -49
- package/convex/logs.ts +26 -22
- package/convex/migrateFilestack.d.ts.map +1 -1
- package/convex/migrateFilestack.js.map +1 -1
- package/convex/migrateFilestack.ts +65 -101
- package/convex/migratePartnersProd.d.ts.map +1 -0
- package/convex/migratePartnersProd.js.map +1 -0
- package/convex/migratePartnersProd.ts +174 -0
- package/convex/migrateProviderWorkspaces.d.ts.map +1 -0
- package/convex/migrateProviderWorkspaces.js.map +1 -0
- package/convex/migrateProviderWorkspaces.ts +175 -0
- package/convex/providers.js.map +1 -1
- package/convex/providers.ts +313 -203
- package/convex/schema.ts +50 -1
- package/convex/searchLogs.d.ts.map +1 -1
- package/convex/searchLogs.js.map +1 -1
- package/convex/searchLogs.ts +11 -3
- package/convex/seedPratham.ts +1 -1
- package/convex/spendAlerts.ts +2 -2
- package/convex/stripeActions.ts +1 -1
- package/convex/updateAPIStatus.ts +2 -3
- package/convex/workspaceSettings.ts +136 -0
- package/dist/bin-http.js +0 -0
- package/dist/bin.js +0 -0
- package/dist/cli/commands/demo.js +2 -2
- package/dist/cli/commands/doctor.js +1 -1
- package/dist/cli/commands/login.js +1 -1
- package/dist/cli/commands/setup.js +2 -2
- package/dist/discovery.js +1 -1
- package/dist/execute.js +3 -3
- package/dist/index.js +13 -13
- package/dist/registry/apis.json +1 -1
- package/dist/ui/errors.js +16 -16
- package/dist/ui/prompts.js +1 -1
- package/email-templates/filestack-provider-outreach.html +1 -1
- package/email-templates/partnership-template.html +1 -1
- package/email-templates/pratham-partnership-draft.html +2 -2
- package/package.json +2 -2
- package/reports/APIClaw-Session-Report-2026-04-05.pdf +0 -0
- package/reports/session-report-2026-04-05.html +433 -0
- package/src/cli/commands/demo.ts +2 -2
- package/src/cli/commands/doctor.ts +1 -1
- package/src/cli/commands/login.ts +1 -1
- package/src/cli/commands/setup.ts +2 -2
- package/src/discovery.ts +1 -1
- package/src/execute.ts +3 -3
- package/src/index.ts +14 -14
- package/src/registry/apis.json +1 -1
- package/src/ui/errors.ts +16 -16
- package/src/ui/prompts.ts +1 -1
- package/convex/adminActivate.d.ts +0 -3
- package/convex/adminActivate.js +0 -47
- package/convex/adminStats.d.ts +0 -9
- package/convex/adminStats.js +0 -280
- package/convex/agents.d.ts +0 -84
- package/convex/agents.js +0 -809
- package/convex/analytics.d.ts +0 -5
- package/convex/analytics.js +0 -166
- package/convex/billing.d.ts +0 -88
- package/convex/billing.js +0 -655
- package/convex/capabilities.d.ts +0 -9
- package/convex/capabilities.js +0 -145
- package/convex/chains.d.ts +0 -68
- package/convex/chains.js +0 -1105
- package/convex/credits.d.ts +0 -25
- package/convex/credits.js +0 -186
- package/convex/crons.d.ts +0 -3
- package/convex/crons.js +0 -17
- package/convex/directCall.d.ts +0 -72
- package/convex/directCall.js +0 -627
- package/convex/earnProgress.d.ts +0 -58
- package/convex/earnProgress.js +0 -649
- package/convex/email.d.ts +0 -14
- package/convex/email.js +0 -300
- package/convex/feedback.d.ts +0 -7
- package/convex/feedback.js +0 -227
- package/convex/http.d.ts +0 -3
- package/convex/http.js +0 -1405
- package/convex/inbound.d.ts +0 -2
- package/convex/inbound.js +0 -32
- package/convex/logs.d.ts +0 -48
- package/convex/logs.js +0 -621
- package/convex/migrateFilestack.d.ts +0 -2
- package/convex/migrateFilestack.js +0 -113
- package/convex/migratePratham.d.ts +0 -2
- package/convex/migratePratham.js +0 -121
- package/convex/mou.d.ts +0 -6
- package/convex/mou.js +0 -82
- package/convex/providerKeys.d.ts +0 -31
- package/convex/providerKeys.js +0 -257
- package/convex/providers.d.ts +0 -35
- package/convex/providers.js +0 -922
- package/convex/purchases.d.ts +0 -7
- package/convex/purchases.js +0 -157
- package/convex/ratelimit.d.ts +0 -4
- package/convex/ratelimit.js +0 -91
- package/convex/searchLogs.d.ts +0 -13
- package/convex/searchLogs.js +0 -232
- package/convex/seedAPILayerAPIs.d.ts +0 -7
- package/convex/seedAPILayerAPIs.js +0 -177
- package/convex/seedDirectCallConfigs.d.ts +0 -2
- package/convex/seedDirectCallConfigs.js +0 -324
- package/convex/seedPratham.d.ts +0 -6
- package/convex/seedPratham.js +0 -150
- package/convex/spendAlerts.d.ts +0 -36
- package/convex/spendAlerts.js +0 -380
- package/convex/stripeActions.d.ts +0 -19
- package/convex/stripeActions.js +0 -411
- package/convex/teams.d.ts +0 -21
- package/convex/teams.js +0 -215
- package/convex/telemetry.d.ts +0 -4
- package/convex/telemetry.js +0 -74
- package/convex/updateAPIStatus.d.ts +0 -6
- package/convex/updateAPIStatus.js +0 -40
- package/convex/usage.d.ts +0 -27
- package/convex/usage.js +0 -229
- package/convex/waitlist.d.ts +0 -4
- package/convex/waitlist.js +0 -49
- package/convex/webhooks.d.ts +0 -12
- package/convex/webhooks.js +0 -410
- package/convex/workspaces.d.ts +0 -33
- package/convex/workspaces.js +0 -991
|
@@ -284,14 +284,14 @@ export async function setupCommand(options: SetupOptions): Promise<void> {
|
|
|
284
284
|
console.log('Next steps:');
|
|
285
285
|
console.log(' 1. Restart your AI coding assistant');
|
|
286
286
|
console.log(' 2. Ask your agent: "List available APIs"\n');
|
|
287
|
-
console.log('Need help? https://apiclaw.
|
|
287
|
+
console.log('Need help? https://apiclaw.cloud/docs/setup\n');
|
|
288
288
|
} else if (skipped === results.length) {
|
|
289
289
|
console.log('\n✅ APIClaw already configured in all clients.\n');
|
|
290
290
|
console.log('Use --force to reconfigure.\n');
|
|
291
291
|
}
|
|
292
292
|
} else {
|
|
293
293
|
console.log(`\n⚠️ Setup completed with ${failed} error(s).\n`);
|
|
294
|
-
console.log('For troubleshooting, visit: https://apiclaw.
|
|
294
|
+
console.log('For troubleshooting, visit: https://apiclaw.cloud/docs/setup/troubleshooting\n');
|
|
295
295
|
process.exit(1);
|
|
296
296
|
}
|
|
297
297
|
}
|
package/src/discovery.ts
CHANGED
|
@@ -192,7 +192,7 @@ const DIRECT_CALL_SPECS: Record<string, {
|
|
|
192
192
|
{ name: 'subject', required: true, desc: 'Email subject' },
|
|
193
193
|
{ name: 'html', required: false, desc: 'HTML body' },
|
|
194
194
|
{ name: 'text', required: false, desc: 'Plain text body' },
|
|
195
|
-
{ name: 'from', required: false, desc: 'Sender (default: noreply@apiclaw.
|
|
195
|
+
{ name: 'from', required: false, desc: 'Sender (default: noreply@apiclaw.cloud)' },
|
|
196
196
|
],
|
|
197
197
|
},
|
|
198
198
|
},
|
package/src/execute.ts
CHANGED
|
@@ -272,7 +272,7 @@ const mockResponses: Record<string, Record<string, (params: any) => unknown>> =
|
|
|
272
272
|
send_email: (params) => ({
|
|
273
273
|
id: 'mock_email_' + Date.now(),
|
|
274
274
|
to: params.to,
|
|
275
|
-
from: params.from || 'APIClaw <noreply@apiclaw.
|
|
275
|
+
from: params.from || 'APIClaw <noreply@apiclaw.cloud>',
|
|
276
276
|
subject: params.subject,
|
|
277
277
|
status: 'sent',
|
|
278
278
|
}),
|
|
@@ -674,7 +674,7 @@ const handlers: Record<string, Record<string, (params: any, creds: any) => Promi
|
|
|
674
674
|
// Resend - Email
|
|
675
675
|
resend: {
|
|
676
676
|
send_email: async (params, creds) => {
|
|
677
|
-
const { to, subject, html, text, from = 'APIClaw <noreply@apiclaw.
|
|
677
|
+
const { to, subject, html, text, from = 'APIClaw <noreply@apiclaw.cloud>' } = params;
|
|
678
678
|
|
|
679
679
|
if (!to || !subject || (!html && !text)) {
|
|
680
680
|
return createErrorResult('resend', 'send_email', 'Missing required params: to, subject, html or text', ERROR_CODES.INVALID_PARAMS);
|
|
@@ -718,7 +718,7 @@ const handlers: Record<string, Record<string, (params: any, creds: any) => Promi
|
|
|
718
718
|
headers: {
|
|
719
719
|
'Authorization': `Bearer ${creds.api_key}`,
|
|
720
720
|
'Content-Type': 'application/json',
|
|
721
|
-
'HTTP-Referer': 'https://apiclaw.
|
|
721
|
+
'HTTP-Referer': 'https://apiclaw.cloud',
|
|
722
722
|
},
|
|
723
723
|
body: JSON.stringify({ model, messages, max_tokens }),
|
|
724
724
|
}, { provider: 'openrouter', action: 'chat' });
|
package/src/index.ts
CHANGED
|
@@ -170,10 +170,10 @@ function checkAnonymousRateLimit(fingerprint: string): { allowed: boolean; error
|
|
|
170
170
|
allowed: false,
|
|
171
171
|
error: JSON.stringify({
|
|
172
172
|
success: false,
|
|
173
|
-
error: `⚡ You've hit your free tier limit (${ANONYMOUS_WEEKLY_LIMIT} calls/week).\n Upgrade: https://apiclaw.
|
|
173
|
+
error: `⚡ You've hit your free tier limit (${ANONYMOUS_WEEKLY_LIMIT} calls/week).\n Upgrade: https://apiclaw.cloud/upgrade`,
|
|
174
174
|
hint: "Register for 50 calls/week, or upgrade for unlimited",
|
|
175
175
|
action: "Run: register_owner({ email: 'you@example.com' })",
|
|
176
|
-
upgrade_url: "https://apiclaw.
|
|
176
|
+
upgrade_url: "https://apiclaw.cloud/upgrade",
|
|
177
177
|
retry_after: getNextMonthUTC()
|
|
178
178
|
}, null, 2)
|
|
179
179
|
};
|
|
@@ -336,9 +336,9 @@ function checkWorkspaceAccess(providerId?: string): { allowed: boolean; error?:
|
|
|
336
336
|
allowed: false,
|
|
337
337
|
error: JSON.stringify({
|
|
338
338
|
success: false,
|
|
339
|
-
error: `⚡ You've hit your free tier limit (${FREE_MONTHLY_LIMIT} calls/week).\n Upgrade: https://apiclaw.
|
|
339
|
+
error: `⚡ You've hit your free tier limit (${FREE_MONTHLY_LIMIT} calls/week).\n Upgrade: https://apiclaw.cloud/upgrade`,
|
|
340
340
|
hint: "Upgrade to Backer for unlimited calls",
|
|
341
|
-
upgrade_url: "https://apiclaw.
|
|
341
|
+
upgrade_url: "https://apiclaw.cloud/upgrade",
|
|
342
342
|
retry_after: getNextMonthUTC()
|
|
343
343
|
}, null, 2)
|
|
344
344
|
};
|
|
@@ -347,7 +347,7 @@ function checkWorkspaceAccess(providerId?: string): { allowed: boolean; error?:
|
|
|
347
347
|
// Other tiers (shouldn't happen, but handle gracefully)
|
|
348
348
|
return {
|
|
349
349
|
allowed: false,
|
|
350
|
-
error: `⚡ You've hit your free tier limit (${FREE_MONTHLY_LIMIT} calls/week).\n Upgrade: https://apiclaw.
|
|
350
|
+
error: `⚡ You've hit your free tier limit (${FREE_MONTHLY_LIMIT} calls/week).\n Upgrade: https://apiclaw.cloud/upgrade`
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
|
|
@@ -724,12 +724,12 @@ Example chain:
|
|
|
724
724
|
success_url: {
|
|
725
725
|
type: 'string',
|
|
726
726
|
description: 'URL to redirect after successful setup',
|
|
727
|
-
default: 'https://apiclaw.
|
|
727
|
+
default: 'https://apiclaw.cloud/billing/success'
|
|
728
728
|
},
|
|
729
729
|
cancel_url: {
|
|
730
730
|
type: 'string',
|
|
731
731
|
description: 'URL to redirect if setup is cancelled',
|
|
732
|
-
default: 'https://apiclaw.
|
|
732
|
+
default: 'https://apiclaw.cloud/billing/cancel'
|
|
733
733
|
}
|
|
734
734
|
},
|
|
735
735
|
required: ['email']
|
|
@@ -862,7 +862,7 @@ BROWSE:
|
|
|
862
862
|
list_categories()
|
|
863
863
|
list_all_apis({ category: "communication", limit: 20 })
|
|
864
864
|
|
|
865
|
-
Docs: https://apiclaw.
|
|
865
|
+
Docs: https://apiclaw.cloud
|
|
866
866
|
`;
|
|
867
867
|
return {
|
|
868
868
|
content: [{ type: 'text', text: helpText }]
|
|
@@ -1804,7 +1804,7 @@ Docs: https://apiclaw.nordsym.com
|
|
|
1804
1804
|
}) as { token: string; expiresAt: number };
|
|
1805
1805
|
|
|
1806
1806
|
// Send magic link via email
|
|
1807
|
-
const verifyUrl = `https://apiclaw.
|
|
1807
|
+
const verifyUrl = `https://apiclaw.cloud/auth/verify?token=${magicLinkResult.token}`;
|
|
1808
1808
|
|
|
1809
1809
|
const emailResponse = await fetch('https://api.resend.com/emails', {
|
|
1810
1810
|
method: 'POST',
|
|
@@ -1813,7 +1813,7 @@ Docs: https://apiclaw.nordsym.com
|
|
|
1813
1813
|
'Content-Type': 'application/json',
|
|
1814
1814
|
},
|
|
1815
1815
|
body: JSON.stringify({
|
|
1816
|
-
from: 'APIClaw <noreply@apiclaw.
|
|
1816
|
+
from: 'APIClaw <noreply@apiclaw.cloud>',
|
|
1817
1817
|
to: email,
|
|
1818
1818
|
subject: 'Verify your APIClaw workspace',
|
|
1819
1819
|
html: `<p>Click to verify: <a href="${verifyUrl}">${verifyUrl}</a></p><p>Expires in 15 minutes.</p>`
|
|
@@ -1975,7 +1975,7 @@ Docs: https://apiclaw.nordsym.com
|
|
|
1975
1975
|
}) as { token: string; expiresAt: number };
|
|
1976
1976
|
|
|
1977
1977
|
// TODO: Agent 2 will implement actual email sending
|
|
1978
|
-
const verifyUrl = `https://apiclaw.
|
|
1978
|
+
const verifyUrl = `https://apiclaw.cloud/auth/verify?token=${magicLinkResult.token}`;
|
|
1979
1979
|
|
|
1980
1980
|
return {
|
|
1981
1981
|
content: [{
|
|
@@ -2037,8 +2037,8 @@ Docs: https://apiclaw.nordsym.com
|
|
|
2037
2037
|
// Create checkout session for metered subscription
|
|
2038
2038
|
const checkoutResult = await createMeteredCheckoutSession(
|
|
2039
2039
|
email,
|
|
2040
|
-
success_url || 'https://apiclaw.
|
|
2041
|
-
cancel_url || 'https://apiclaw.
|
|
2040
|
+
success_url || 'https://apiclaw.cloud/billing/success',
|
|
2041
|
+
cancel_url || 'https://apiclaw.cloud/billing/cancel'
|
|
2042
2042
|
);
|
|
2043
2043
|
|
|
2044
2044
|
if ('error' in checkoutResult) {
|
|
@@ -2414,7 +2414,7 @@ Direct Call (no API key needed):
|
|
|
2414
2414
|
Interactive CLI mode:
|
|
2415
2415
|
npx @nordsym/apiclaw --cli
|
|
2416
2416
|
|
|
2417
|
-
Docs: https://apiclaw.
|
|
2417
|
+
Docs: https://apiclaw.cloud
|
|
2418
2418
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
2419
2419
|
`);
|
|
2420
2420
|
}
|