71 lines
2.7 KiB
JavaScript
71 lines
2.7 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Check login-related tools
|
|
*/
|
|
|
|
// Set environment variables
|
|
process.env.LARAVEL_API_BASE_URL = 'https://example.com';
|
|
|
|
console.log('🔍 Checking login-related tools...\n');
|
|
|
|
import('./src/tools/ToolGenerator.js').then(async ({ ToolGenerator }) => {
|
|
import('./src/proxy/ApiClient.js').then(async ({ ApiClient }) => {
|
|
import('./src/auth/AuthManager.js').then(async ({ AuthManager }) => {
|
|
import('./src/config/ConfigManager.js').then(async ({ ConfigManager }) => {
|
|
try {
|
|
const config = new ConfigManager();
|
|
const authManager = new AuthManager(null, config.getAll(true));
|
|
const apiClient = new ApiClient(config.getAll(), authManager);
|
|
const toolGenerator = new ToolGenerator(apiClient);
|
|
|
|
const tools = toolGenerator.generateAllTools();
|
|
console.log(`Total tools: ${tools.length}\n`);
|
|
|
|
// Find login-related tools
|
|
const loginTools = tools.filter(tool =>
|
|
tool.name.toLowerCase().includes('login') ||
|
|
tool.description.toLowerCase().includes('login') ||
|
|
tool.description.toLowerCase().includes('authenticate')
|
|
);
|
|
|
|
console.log('=== LOGIN/AUTHENTICATION TOOLS ===');
|
|
if (loginTools.length === 0) {
|
|
console.log('❌ No login tools found');
|
|
} else {
|
|
loginTools.forEach((tool, i) => {
|
|
console.log(`${i + 1}. ${tool.name}`);
|
|
console.log(` Description: ${tool.description}`);
|
|
console.log(` Input Schema: ${JSON.stringify(tool.inputSchema?.properties || {}, null, 2)}`);
|
|
console.log('');
|
|
});
|
|
}
|
|
|
|
// Check for the specific tool
|
|
console.log('=== CHECKING SPECIFIC TOOL ===');
|
|
const specificTool = toolGenerator.getTool('public_manage_login');
|
|
if (specificTool) {
|
|
console.log('✅ Found public_manage_login');
|
|
console.log('Tool details:', JSON.stringify(specificTool, null, 2));
|
|
} else {
|
|
console.log('❌ public_manage_login NOT FOUND');
|
|
|
|
// Show all public tools that might be related
|
|
console.log('\n=== ALL PUBLIC TOOLS ===');
|
|
const publicTools = tools.filter(tool => tool.name.startsWith('public_'));
|
|
publicTools.forEach(tool => {
|
|
console.log(`- ${tool.name} (${tool.description})`);
|
|
});
|
|
}
|
|
|
|
} catch (error) {
|
|
console.error('❌ Error:', error.message);
|
|
console.error('Stack:', error.stack);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
}).catch(error => {
|
|
console.error('❌ Import error:', error.message);
|
|
});
|