/**
 * Tool cache inspection / management endpoints.
 * Thin wrappers over `state.cache: ToolCache` and `state.infoService: ToolInfoService`.
 */
import type { CacheStats } from "@galaxy-tool-util/core";
import type { AppState } from "./router.js";
export interface CachedToolEntry {
    cacheKey: string;
    toolId: string;
    toolVersion: string;
    source: string;
    sourceUrl: string;
    cachedAt: string;
    sizeBytes?: number;
    decodable: boolean;
    /** Deep link to the ToolShed repo page when the tool id is parseable. */
    toolshedUrl?: string;
    /** Whether this entry can drive a refetch — false for orphans / unknown ids. */
    refetchable: boolean;
}
export interface ListResponse {
    entries: CachedToolEntry[];
    stats: CacheStats;
}
export interface RawResponse {
    contents: unknown;
    decodable: boolean;
}
export interface DeleteResponse {
    removed: boolean;
}
export interface ClearResponse {
    removed: number;
}
export interface RefetchRequest {
    toolId: string;
    toolVersion?: string;
}
export interface RefetchResponse {
    cacheKey: string;
    fetched: boolean;
    alreadyCached: boolean;
}
export interface AddRequest {
    toolId: string;
    toolVersion?: string;
}
export interface AddResponse {
    cacheKey: string;
    alreadyCached: boolean;
}
export interface ListOptions {
    /** Probe each entry to flag undecodable payloads. Adds N file reads. */
    decode?: boolean;
}
export declare function listToolCache(state: AppState, opts?: ListOptions): Promise<ListResponse>;
export declare function getToolCacheStats(state: AppState): Promise<CacheStats>;
export declare function getToolCacheRaw(state: AppState, key: string): Promise<RawResponse>;
export declare function deleteToolCacheEntry(state: AppState, key: string): Promise<DeleteResponse>;
export declare function clearToolCache(state: AppState, prefix?: string): Promise<ClearResponse>;
export declare function refetchToolCacheEntry(state: AppState, body: RefetchRequest): Promise<RefetchResponse>;
export declare function addToolCacheEntry(state: AppState, body: AddRequest): Promise<AddResponse>;
//# sourceMappingURL=tool-cache.d.ts.map