/** * React hooks for Memory Intelligence using React Query */ import { UseQueryOptions, UseMutationOptions } from "@tanstack/react-query"; import { PatternAnalysis, TagSuggestionsResult, RelatedMemoriesResult, DuplicatesResult, InsightsResult, MemoryHealth, AnalyzePatternsParams, SuggestTagsParams, FindRelatedParams, DetectDuplicatesParams, ExtractInsightsParams, HealthCheckParams } from "../../core/types.js"; import { PredictiveRecallParams, PredictiveRecallResult } from "../../core/prediction-types.js"; import type { IntelligenceResponse } from "../../core/client.js"; /** * Get the Memory Intelligence client from context */ export declare function useMemoryIntelligence(): import("../../index-sdk.js").MemoryIntelligenceClient; /** * Hook for analyzing memory patterns * * @example * ```tsx * const { data, isLoading, error } = usePatternAnalysis({ * userId: "user-123", * timeRangeDays: 30, * responseFormat: "json" * }); * ``` */ export declare function usePatternAnalysis(params: AnalyzePatternsParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Hook for getting tag suggestions * * @example * ```tsx * const { data, isLoading } = useTagSuggestions({ * memoryId: "mem-123", * userId: "user-123", * maxSuggestions: 5 * }); * ``` */ export declare function useTagSuggestions(params: SuggestTagsParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Mutation hook for getting tag suggestions (if you need manual trigger) * * @example * ```tsx * const { mutate, data, isPending } = useTagSuggestionsMutation(); * * // Later... * mutate({ * memoryId: "mem-123", * userId: "user-123" * }); * ``` */ export declare function useTagSuggestionsMutation(options?: UseMutationOptions, Error, SuggestTagsParams>): import("@tanstack/react-query").UseMutationResult, Error, SuggestTagsParams, unknown>; /** * Hook for finding related memories * * @example * ```tsx * const { data, isLoading } = useRelatedMemories({ * memoryId: "mem-123", * userId: "user-123", * limit: 10, * similarityThreshold: 0.7 * }); * ``` */ export declare function useRelatedMemories(params: FindRelatedParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Hook for detecting duplicate memories * * @example * ```tsx * const { data, isLoading } = useDuplicateDetection({ * userId: "user-123", * similarityThreshold: 0.9, * maxPairs: 20 * }); * ``` */ export declare function useDuplicateDetection(params: DetectDuplicatesParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Mutation hook for duplicate detection (if you need manual trigger) */ export declare function useDuplicateDetectionMutation(options?: UseMutationOptions, Error, DetectDuplicatesParams>): import("@tanstack/react-query").UseMutationResult, Error, DetectDuplicatesParams, unknown>; /** * Hook for extracting insights * * @example * ```tsx * const { data, isLoading } = useInsightExtraction({ * userId: "user-123", * topic: "machine learning", * maxMemories: 20 * }); * ``` */ export declare function useInsightExtraction(params: ExtractInsightsParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Mutation hook for insight extraction (if you need manual trigger) */ export declare function useInsightExtractionMutation(options?: UseMutationOptions, Error, ExtractInsightsParams>): import("@tanstack/react-query").UseMutationResult, Error, ExtractInsightsParams, unknown>; /** * Hook for checking memory health * * @example * ```tsx * const { data, isLoading } = useHealthCheck({ * userId: "user-123", * responseFormat: "json" * }); * ``` */ export declare function useHealthCheck(params: HealthCheckParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Mutation hook for health check (if you need manual trigger) */ export declare function useHealthCheckMutation(options?: UseMutationOptions, Error, HealthCheckParams>): import("@tanstack/react-query").UseMutationResult, Error, HealthCheckParams, unknown>; /** * Hook for predictive memory recall * * AI-powered prediction of memories you'll need based on your current context. * Uses semantic similarity, temporal relevance, usage patterns, and serendipity * scoring to anticipate what you need before you realize it. * * @example * ```tsx * const { data, isLoading, error } = usePredictiveRecall({ * userId: "user-123", * context: { * currentProject: "Building dashboard components", * recentTopics: ["React", "performance"], * contextText: "Optimizing render performance" * }, * limit: 5, * minConfidence: 50 * }); * * // Display predictions * {data?.data.predictions.map(pred => ( * * ))} * ``` */ export declare function usePredictiveRecall(params: PredictiveRecallParams, options?: Omit>, "queryKey" | "queryFn">): import("@tanstack/react-query").UseQueryResult, Error>; /** * Mutation hook for predictive recall (if you need manual trigger) * * @example * ```tsx * const { mutate, data, isPending } = usePredictiveRecallMutation(); * * // Trigger prediction when context changes * const handleContextChange = (newContext) => { * mutate({ * userId: "user-123", * context: newContext, * limit: 5 * }); * }; * ``` */ export declare function usePredictiveRecallMutation(options?: UseMutationOptions, Error, PredictiveRecallParams>): import("@tanstack/react-query").UseMutationResult, Error, PredictiveRecallParams, unknown>; /** * Hook for recording prediction feedback * * @example * ```tsx * const { mutate: recordFeedback } = usePredictionFeedback(); * * // When user clicks on a prediction * const handlePredictionClick = (memoryId: string) => { * recordFeedback({ * memoryId, * userId: "user-123", * useful: true, * action: "clicked" * }); * }; * ``` */ export declare function usePredictionFeedback(options?: UseMutationOptions): import("@tanstack/react-query").UseMutationResult;