-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_superduper_agents.cjs
More file actions
50 lines (41 loc) · 1.54 KB
/
check_superduper_agents.cjs
File metadata and controls
50 lines (41 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const { createClient } = require('@supabase/supabase-js');
const fs = require('fs');
const path = require('path');
const envPath = 'c:\\Users\\PureTrek\\Desktop\\DevGruGold\\suite\\.env';
const envContent = fs.readFileSync(envPath, 'utf8');
const env = {};
envContent.split('\n').forEach(line => {
const [key, value] = line.split('=');
if (key && value) {
let cleanValue = value.trim();
if (cleanValue.startsWith('"') && cleanValue.endsWith('"')) {
cleanValue = cleanValue.slice(1, -1);
}
env[key.trim()] = cleanValue;
}
});
const supabaseUrl = env['SUPABASE_URL'] || env['VITE_SUPABASE_URL'];
const supabaseKey = env['SUPABASE_SERVICE_ROLE_KEY'] || env['VITE_SUPABASE_PUBLISHABLE_KEY'];
if (!supabaseUrl || !supabaseKey) {
console.error('Missing VITE_SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY');
process.exit(1);
}
const supabase = createClient(supabaseUrl, supabaseKey);
async function checkSuperDuperAgents() {
console.log('Checking superduper_agents table...');
const { data: agents, error } = await supabase
.from('superduper_agents')
.select('*');
if (error) {
console.error('Error fetching superduper_agents:', error);
return;
}
console.log('Total SuperDuper agents found:', agents.length);
console.table(agents.map(a => ({
name: a.agent_name,
display: a.display_name,
edge_function: a.edge_function_name,
status: a.status
})));
}
checkSuperDuperAgents();