feat: Add intelligent auto-router and enhanced integrations

- Add intelligent-router.sh hook for automatic agent routing
- Add AUTO-TRIGGER-SUMMARY.md documentation
- Add FINAL-INTEGRATION-SUMMARY.md documentation
- Complete Prometheus integration (6 commands + 4 tools)
- Complete Dexto integration (12 commands + 5 tools)
- Enhanced Ralph with access to all agents
- Fix /clawd command (removed disable-model-invocation)
- Update hooks.json to v5 with intelligent routing
- 291 total skills now available
- All 21 commands with automatic routing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
admin
2026-01-28 00:27:56 +04:00
Unverified
parent 3b128ba3bd
commit b52318eeae
1724 changed files with 351216 additions and 0 deletions

View File

@@ -0,0 +1,124 @@
#!/usr/bin/env tsx
import { existsSync, mkdirSync, copyFileSync, readdirSync, statSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Configuration - which agents and files to copy
const AGENTS_TO_COPY = [
// Core files
'agent-registry.json',
'agent-template.yml',
'default-agent.yml',
// Agent directories
'coding-agent/',
'database-agent/',
'explore-agent/',
'github-agent/',
'image-editor-agent/',
'music-agent/',
'nano-banana-agent/',
'podcast-agent/',
'product-name-researcher/',
'sora-video-agent/',
'talk2pdf-agent/',
'triage-demo/',
];
const SOURCE_DIR = join(__dirname, '../../../agents');
const DEST_DIR = join(__dirname, '../dist/agents');
/**
* Recursively copy a directory
*/
function copyDirectory(src: string, dest: string): void {
if (!existsSync(dest)) {
mkdirSync(dest, { recursive: true });
}
const entries = readdirSync(src);
for (const entry of entries) {
const srcPath = join(src, entry);
const destPath = join(dest, entry);
const stat = statSync(srcPath);
if (stat.isDirectory()) {
copyDirectory(srcPath, destPath);
} else {
copyFileSync(srcPath, destPath);
}
}
}
/**
* Copy a single file
*/
function copyFile(src: string, dest: string): void {
const destDir = dirname(dest);
if (!existsSync(destDir)) {
mkdirSync(destDir, { recursive: true });
}
copyFileSync(src, dest);
}
/**
* Main copy function
*/
function copyAgents(): void {
console.log('📦 Copying configured agents to dist...');
// Ensure source directory exists
if (!existsSync(SOURCE_DIR)) {
console.error(`❌ Source directory not found: ${SOURCE_DIR}`);
process.exit(1);
}
// Create destination directory
if (!existsSync(DEST_DIR)) {
mkdirSync(DEST_DIR, { recursive: true });
}
let copiedCount = 0;
for (const item of AGENTS_TO_COPY) {
// Normalize the item: remove any trailing slash so path.join works consistently on all OSes
const normalizedItem = item.replace(/\/$/, '');
const srcPath = join(SOURCE_DIR, normalizedItem);
const destPath = join(DEST_DIR, normalizedItem);
if (!existsSync(srcPath)) {
console.warn(`⚠️ Skipping missing item: ${item}`);
continue;
}
const stat = statSync(srcPath);
if (stat.isDirectory()) {
console.log(`📁 Copying directory: ${normalizedItem}`);
copyDirectory(srcPath, destPath);
copiedCount++;
} else if (stat.isFile()) {
console.log(`📄 Copying file: ${normalizedItem}`);
copyFile(srcPath, destPath);
copiedCount++;
} else {
console.warn(`⚠️ Skipping non-regular entry: ${normalizedItem}`);
}
}
console.log(`✅ Successfully copied ${copiedCount}/${AGENTS_TO_COPY.length} agents to dist`);
}
// Run the script
if (import.meta.url === `file://${process.argv[1]}`) {
try {
copyAgents();
} catch (error) {
console.error('❌ Failed to copy agents:', error);
process.exit(1);
}
}

View File

@@ -0,0 +1,60 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Resolve repo root from CLI scripts directory: packages/cli/scripts -> repo root
const repoRoot = path.resolve(__dirname, '../../..');
const srcPath = path.join(repoRoot, 'README.md');
// Destination is the CLI package README next to this scripts directory
const cliDir = path.resolve(__dirname, '..');
const destPath = path.join(cliDir, 'README.md');
const GH_BASE = 'https://github.com/truffle-ai/dexto';
const GH_BLOB_HEAD = `${GH_BASE}/blob/HEAD`;
const GH_TREE_HEAD = `${GH_BASE}/tree/HEAD`;
function transform(content: string): string {
// Change top-level H1
content = content.replace(/^#\s+[^\n]+/, '# Dexto CLI');
// Fix relative links to repo paths so they render on npm
content = content
// agents directory
.replace(/\]\(agents\/\)/g, `](${GH_TREE_HEAD}/agents/)`)
.replace(/\]\(agents\)/g, `](${GH_TREE_HEAD}/agents)`) // fallback
// discord/telegram setup docs
.replace(
/\]\(packages\/cli\/src\/discord\/README\.md\)/g,
`](${GH_BLOB_HEAD}/packages/cli/src/discord/README.md)`
)
.replace(
/\]\(packages\/cli\/src\/telegram\/README\.md\)/g,
`](${GH_BLOB_HEAD}/packages/cli/src/telegram/README.md)`
)
// contributor guide & license
.replace(/\]\(\.\/CONTRIBUTING\.md\)/g, `](${GH_BLOB_HEAD}/CONTRIBUTING.md)`)
.replace(/\]\(LICENSE\)/g, `](${GH_BLOB_HEAD}/LICENSE)`);
// Fix relative image to assets folder
content = content.replace(
/<img\s+src="assets\/email_slack_demo\.gif"/g,
`<img src="${GH_BLOB_HEAD}/assets/email_slack_demo.gif?raw=1"`
);
return content;
}
function main(): void {
const raw = fs.readFileSync(srcPath, 'utf8');
const out = transform(raw);
fs.writeFileSync(destPath, out);
console.log(
`Synced CLI README from ${path.relative(repoRoot, srcPath)} -> ${path.relative(repoRoot, destPath)}`
);
}
main();