import type { ListParams, ListResult } from "@stigmer/sdk";
import type { SearchResult } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
/** Shared options for resource search hooks (`useAgentSearch`, `useMcpServerSearch`, `useSkillSearch`). */
export interface UseResourceSearchOptions {
    /** Maximum results per page. @default 30 */
    readonly pageSize?: number;
    /** Debounce delay for query changes in milliseconds. @default 300 */
    readonly debounceMs?: number;
    /**
     * Controls search scope.
     *
     * - `"org"` — search only within the provided organization.
     * - `"all"` — search within the provided organization plus public
     *   resources from other organizations.
     *
     * @default "org"
     */
    readonly scope?: "org" | "all";
}
/** Shared return value for resource search hooks (`useAgentSearch`, `useMcpServerSearch`, `useSkillSearch`). */
export interface UseResourceSearchReturn {
    /** Matching resources from the most recent search. */
    readonly results: readonly SearchResult[];
    /** `true` while a search request is in flight. */
    readonly isLoading: boolean;
    /** `true` while a background refetch is in flight. */
    readonly isRefetching: boolean;
    /** Error from the last failed search, or `null` when healthy. */
    readonly error: Error | null;
    /** Current search query text. */
    readonly query: string;
    /** Update the search query (triggers a debounced re-search). */
    readonly setQuery: (query: string) => void;
    /** Re-run the current search with the same parameters. */
    readonly refetch: () => void;
}
/**
 * Internal hook that powers both `useMcpServerSearch` and `useSkillSearch`.
 *
 * Wraps a `ListParams -> ListResult` function with query state management,
 * debounced search, loading/error tracking, and cancellation-safe fetching.
 *
 * Not exported from the public API — consumers use the resource-specific
 * hooks (`useMcpServerSearch`, `useSkillSearch`) instead.
 */
export declare function useResourceSearch(listFn: (params: ListParams) => Promise<ListResult>, org: string, options?: UseResourceSearchOptions): UseResourceSearchReturn;
//# sourceMappingURL=useResourceSearch.d.ts.map