import type { Tool } from './types.js';
export type ResearchSource = 'all' | 'arxiv' | 'github' | 'huggingface' | 'kaggle';
type GitHubKind = 'repositories' | 'issues' | 'pulls' | 'code' | 'all';
type HuggingFaceKind = 'models' | 'datasets' | 'papers' | 'both' | 'all';
type KaggleKind = 'datasets' | 'competitions' | 'both';
interface SourceHit {
    source: string;
    title: string;
    url: string;
    date?: string;
    meta?: string;
    summary?: string;
}
type ResearchSourcesFormat = 'text' | 'json';
interface ResearchSourcesRequest {
    source: ResearchSource;
    githubKind: GitHubKind;
    huggingFaceKind: HuggingFaceKind;
    kaggleKind: KaggleKind;
    limit: number;
    recentDays?: number;
}
interface SourceDigest {
    hitCount: number;
    errorCount: number;
    sources: Record<string, number>;
    topUrls: string[];
    recencyWindowDays: number | null;
    datedHitCount: number;
    freshHitCount: number;
    staleHitCount: number;
    unknownDateHitCount: number;
    newestDate: string | null;
    oldestDate: string | null;
}
export interface SourceAuthReadiness {
    arxivPublic: boolean | null;
    githubAuth: boolean | null;
    githubUnauthenticatedRateLimit: boolean | null;
    huggingFaceAuth: boolean | null;
    kaggleAuth: boolean | null;
    kaggleCompetitionsRequested: boolean;
    kaggleCompetitionsEnabled: boolean | null;
    missingCredentialHints: string[];
}
interface ResearchSourcesJsonReport {
    version: 1;
    format: 'grawkus-research-sources-v1';
    source: 'research_sources';
    query: string;
    requested: {
        source: ResearchSource;
        githubKind: GitHubKind;
        huggingFaceKind: HuggingFaceKind;
        kaggleKind: KaggleKind;
        limit: number;
        recentDays: number | null;
    };
    auth: SourceAuthReadiness;
    coverageNotes: string[];
    digest: SourceDigest;
    redaction: {
        secretsIncluded: false;
        credentialHeadersIncluded: false;
    };
    hits: SourceHit[];
    errors: string[];
    nextActions: string[];
}
declare function dateWithinRecentDays(value: string | null | undefined, recentDays?: number): boolean;
declare function buildArxivQuery(query: string, recentDays?: number): string;
declare function parseArxivFeed(xml: string, limit: number): SourceHit[];
declare function parseGitHubRepos(json: unknown, limit: number): SourceHit[];
declare function parseGitHubIssues(json: unknown, limit: number, kind: 'issue' | 'pull'): SourceHit[];
declare function parseGitHubCode(json: unknown, limit: number): SourceHit[];
declare function hasGitHubAuth(env?: NodeJS.ProcessEnv): boolean;
declare function parseHuggingFaceRepos(json: unknown, sourceLabel: string, limit: number, recentDays?: number): SourceHit[];
declare function parseHuggingFacePapers(json: unknown, query: string, limit: number): SourceHit[];
declare function resolveHuggingFaceToken(env?: NodeJS.ProcessEnv): string | undefined;
declare function normalizeKaggleUrl(raw: string | undefined): string;
declare function normalizeKaggleCompetitionUrl(raw: string | undefined, ref: string | undefined): string;
declare function parseKaggleDatasets(json: unknown, limit: number, recentDays?: number): SourceHit[];
declare function parseKaggleCompetitions(json: unknown, limit: number, recentDays?: number): SourceHit[];
declare function resolveKaggleAuthHeaders(env?: NodeJS.ProcessEnv): Record<string, string>;
declare function hasKaggleAuth(env?: NodeJS.ProcessEnv): boolean;
declare function hasHuggingFaceAuth(env?: NodeJS.ProcessEnv): boolean;
declare function resolveKaggleApiToken(env?: NodeJS.ProcessEnv): string | undefined;
declare function resolveKaggleLegacyCredentials(env?: NodeJS.ProcessEnv): {
    username: string;
    key: string;
} | undefined;
declare function formatHits(query: string, hits: SourceHit[], errors: string[], notes?: string[], recentDays?: number): string;
declare function buildSourceDigestObject(hits: SourceHit[], errors: string[], recentDays?: number): SourceDigest;
declare function buildResearchSourcesJsonReport(query: string, request: ResearchSourcesRequest, hits: SourceHit[], errors: string[], notes: string[], auth: SourceAuthReadiness): ResearchSourcesJsonReport;
declare function buildSourceNextActions(query: string, hits: SourceHit[], errors: string[]): string[];
declare function extractGitHubRepoSlugs(hits: SourceHit[]): string[];
export declare const ResearchSourcesTool: Tool;
declare function normalizeFormat(input: Record<string, unknown>): ResearchSourcesFormat | null;
declare function buildCoverageNotes(sources: ResearchSource[], githubKind: GitHubKind, kind: HuggingFaceKind, kaggleKind: KaggleKind, recentDays?: number, auth?: SourceAuthReadiness): string[];
export declare function buildSourceAuthReadiness(sources: ResearchSource[], kaggleKind: KaggleKind, env?: NodeJS.ProcessEnv): SourceAuthReadiness;
export declare const _internal: {
    buildArxivQuery: typeof buildArxivQuery;
    parseArxivFeed: typeof parseArxivFeed;
    parseGitHubRepos: typeof parseGitHubRepos;
    parseGitHubIssues: typeof parseGitHubIssues;
    parseGitHubCode: typeof parseGitHubCode;
    parseHuggingFaceRepos: typeof parseHuggingFaceRepos;
    parseHuggingFacePapers: typeof parseHuggingFacePapers;
    parseKaggleDatasets: typeof parseKaggleDatasets;
    parseKaggleCompetitions: typeof parseKaggleCompetitions;
    dateWithinRecentDays: typeof dateWithinRecentDays;
    normalizeKaggleUrl: typeof normalizeKaggleUrl;
    normalizeKaggleCompetitionUrl: typeof normalizeKaggleCompetitionUrl;
    resolveHuggingFaceToken: typeof resolveHuggingFaceToken;
    resolveKaggleApiToken: typeof resolveKaggleApiToken;
    resolveKaggleAuthHeaders: typeof resolveKaggleAuthHeaders;
    hasGitHubAuth: typeof hasGitHubAuth;
    hasHuggingFaceAuth: typeof hasHuggingFaceAuth;
    hasKaggleAuth: typeof hasKaggleAuth;
    resolveKaggleLegacyCredentials: typeof resolveKaggleLegacyCredentials;
    buildSourceAuthReadiness: typeof buildSourceAuthReadiness;
    buildCoverageNotes: typeof buildCoverageNotes;
    buildResearchSourcesJsonReport: typeof buildResearchSourcesJsonReport;
    buildSourceDigestObject: typeof buildSourceDigestObject;
    buildSourceNextActions: typeof buildSourceNextActions;
    extractGitHubRepoSlugs: typeof extractGitHubRepoSlugs;
    formatHits: typeof formatHits;
    normalizeFormat: typeof normalizeFormat;
};
export {};
