- 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>
26 lines
1023 B
TypeScript
26 lines
1023 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import { client } from '@/lib/client';
|
|
import { queryKeys } from '@/lib/queryKeys';
|
|
|
|
/**
|
|
* Hook to fetch available providers and capabilities.
|
|
* Returns blob storage providers, compression strategies, custom tool providers, and internal tools.
|
|
*/
|
|
export function useDiscovery(enabled: boolean = true) {
|
|
return useQuery({
|
|
queryKey: queryKeys.discovery.all,
|
|
queryFn: async () => {
|
|
const res = await client.api.discovery.$get();
|
|
if (!res.ok) throw new Error('Failed to fetch discovery data');
|
|
return await res.json();
|
|
},
|
|
enabled,
|
|
staleTime: 5 * 60 * 1000, // 5 minutes - providers don't change often
|
|
});
|
|
}
|
|
|
|
// Export types using the standard inference pattern
|
|
export type DiscoveryResponse = NonNullable<ReturnType<typeof useDiscovery>['data']>;
|
|
export type DiscoveredProvider = DiscoveryResponse['blob'][number];
|
|
export type InternalToolInfo = DiscoveryResponse['internalTools'][number];
|