ai-warden 1.0.3 → 1.0.4
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/package.json +1 -1
- package/src/cli.js +6 -6
- package/src/client.js +1 -1
- package/src/index.js +1 -1
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -63,8 +63,8 @@ Examples:
|
|
|
63
63
|
aiwarden validate "User input text"
|
|
64
64
|
aiwarden validate "Text" --json JSON output
|
|
65
65
|
|
|
66
|
-
Get your API key: https://
|
|
67
|
-
Documentation: https://
|
|
66
|
+
Get your API key: https://ai-warden.io/signup (free tier: 5K/month)
|
|
67
|
+
Documentation: https://ai-warden.io/docs
|
|
68
68
|
`);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -298,7 +298,7 @@ async function validateCommand(textOrPath, options = {}) {
|
|
|
298
298
|
console.log(' export AI_WARDEN_API_KEY=sk_live_xxx');
|
|
299
299
|
console.log(' aiwarden validate "text"');
|
|
300
300
|
console.log('');
|
|
301
|
-
console.log('Get your API key: https://
|
|
301
|
+
console.log('Get your API key: https://ai-warden.io/signup');
|
|
302
302
|
console.log('Free tier: 5,000 validations/month (no credit card required)');
|
|
303
303
|
process.exit(1);
|
|
304
304
|
}
|
|
@@ -357,7 +357,7 @@ async function validateCommand(textOrPath, options = {}) {
|
|
|
357
357
|
console.error('❌ Validation failed:', error.message);
|
|
358
358
|
|
|
359
359
|
if (error.message.includes('API key')) {
|
|
360
|
-
console.log('\nGet your API key: https://
|
|
360
|
+
console.log('\nGet your API key: https://ai-warden.io/signup');
|
|
361
361
|
} else if (error.message.includes('API unavailable')) {
|
|
362
362
|
console.log('\nAPI is temporarily unavailable. Try using "scan" for offline validation.');
|
|
363
363
|
}
|
|
@@ -492,7 +492,7 @@ async function loginCommand() {
|
|
|
492
492
|
console.log('Opening browser...\n');
|
|
493
493
|
|
|
494
494
|
// Open browser with callback URL
|
|
495
|
-
const dashboardUrl = `https://
|
|
495
|
+
const dashboardUrl = `https://ai-warden.io/dashboard?callback=http://localhost:${port}`;
|
|
496
496
|
|
|
497
497
|
try {
|
|
498
498
|
const platform = process.platform;
|
|
@@ -526,7 +526,7 @@ async function loginCommand() {
|
|
|
526
526
|
|
|
527
527
|
// Fallback to manual input if callback server fails
|
|
528
528
|
function fallbackManualLogin() {
|
|
529
|
-
const url = 'https://
|
|
529
|
+
const url = 'https://ai-warden.io/dashboard';
|
|
530
530
|
console.log(`Please visit: ${url}`);
|
|
531
531
|
console.log('\nAfter signing up:');
|
|
532
532
|
console.log('1. Copy your API key from the dashboard');
|
package/src/client.js
CHANGED
|
@@ -15,7 +15,7 @@ class AIWardenClient {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
this.apiKey = apiKey;
|
|
18
|
-
this.apiUrl = options.apiUrl || 'https://api.
|
|
18
|
+
this.apiUrl = options.apiUrl || 'https://api.ai-warden.io';
|
|
19
19
|
this.settingsTTL = (options.settingsTTL || 300) * 1000; // Convert to ms
|
|
20
20
|
this.timeout = options.timeout || 10000; // 10s default
|
|
21
21
|
|
package/src/index.js
CHANGED
|
@@ -65,7 +65,7 @@ class AIWarden {
|
|
|
65
65
|
*/
|
|
66
66
|
async validate(content, options = {}) {
|
|
67
67
|
if (!this.apiKey) {
|
|
68
|
-
throw new Error('API key required for validate(). Use scan() for offline validation, or get a free API key at https://
|
|
68
|
+
throw new Error('API key required for validate(). Use scan() for offline validation, or get a free API key at https://ai-warden.io/signup');
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
try {
|