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,54 @@
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { client } from '@/lib/client.js';
import { queryKeys } from '@/lib/queryKeys.js';
// Fetch agent configuration
export function useAgentConfig(enabled: boolean = true) {
return useQuery({
queryKey: queryKeys.agent.config,
queryFn: async () => {
const response = await client.api.agent.config.$get();
return await response.json();
},
enabled,
staleTime: 30000, // 30 seconds
});
}
// Validate agent configuration
export function useValidateAgent() {
return useMutation({
mutationFn: async ({ yaml }: { yaml: string }) => {
const response = await client.api.agent.validate.$post({
json: { yaml },
});
return await response.json();
},
});
}
// Export types inferred from hook return values
export type ValidationError = NonNullable<
ReturnType<typeof useValidateAgent>['data']
>['errors'][number];
export type ValidationWarning = NonNullable<
ReturnType<typeof useValidateAgent>['data']
>['warnings'][number];
// Save agent configuration
export function useSaveAgentConfig() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async ({ yaml }: { yaml: string }) => {
const response = await client.api.agent.config.$post({
json: { yaml },
});
return await response.json();
},
onSuccess: () => {
// Invalidate agent config to refresh after save
queryClient.invalidateQueries({ queryKey: queryKeys.agent.config });
},
});
}