mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-05-02 00:55:08 +02:00
feat: migrate to use MCP tools instead of helper scripts
This commit is contained in:
@@ -109,37 +109,8 @@ export async function setupLocalRepo(repoPath) {
|
||||
// Non-fatal - continue without Git setup
|
||||
}
|
||||
|
||||
// Copy tools to local repository for agent accessibility
|
||||
try {
|
||||
const toolsDir = path.join(import.meta.dirname, '..', '..', 'tools');
|
||||
|
||||
// Copy TOTP generation script
|
||||
const totpScriptSource = path.join(toolsDir, 'generate-totp-standalone.mjs');
|
||||
const totpScriptDest = path.join(sourceDir, 'generate-totp.mjs');
|
||||
|
||||
if (await fs.pathExists(totpScriptSource)) {
|
||||
await fs.copy(totpScriptSource, totpScriptDest);
|
||||
await fs.chmod(totpScriptDest, '755'); // Make executable
|
||||
console.log(chalk.green('✅ TOTP generation script copied to target repository'));
|
||||
} else {
|
||||
console.log(chalk.yellow('⚠️ TOTP script not found, authentication may fail if TOTP is required'));
|
||||
}
|
||||
|
||||
// Copy save_deliverable tool
|
||||
const saveDeliverableSource = path.join(toolsDir, 'save_deliverable.js');
|
||||
const saveDeliverableDest = path.join(sourceDir, 'save_deliverable.js');
|
||||
|
||||
if (await fs.pathExists(saveDeliverableSource)) {
|
||||
await fs.copy(saveDeliverableSource, saveDeliverableDest);
|
||||
await fs.chmod(saveDeliverableDest, '755'); // Make executable
|
||||
console.log(chalk.green('✅ save_deliverable tool copied to target repository'));
|
||||
} else {
|
||||
console.log(chalk.yellow('⚠️ save_deliverable tool not found, deliverable creation may fail'));
|
||||
}
|
||||
} catch (toolError) {
|
||||
console.log(chalk.yellow(`⚠️ Failed to copy tools: ${toolError.message}`));
|
||||
// Non-fatal - continue without tools
|
||||
}
|
||||
// MCP tools (save_deliverable, generate_totp) are now available natively via shannon-helper MCP server
|
||||
// No need to copy bash scripts to target repository
|
||||
|
||||
return sourceDir;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user