import type { Spec } from './spec/core.js';
/**
 * A project registered in the global cross-repo registry.
 */
export interface RegisteredProject {
    /** Absolute filesystem path to the project root */
    path: string;
    /** Deterministic SHA-256 hash of the path (first 16 chars) */
    hash: string;
    /** ISO timestamp when the project was first registered */
    registeredAt: string;
    /** Number of specs found at last scan */
    specCount: number;
    /** ISO timestamp of the last spec scan, if any */
    lastScanAt?: string;
}
/**
 * Global registry persisted at data/global/registered-projects.json.
 */
export interface GlobalProjectsRegistry {
    projects: RegisteredProject[];
    updatedAt: string;
}
/**
 * Input to the cross-repo search engine.
 */
export interface CrossRepoSearchInput {
    query?: string;
    status?: string[];
    tags?: string[];
    type?: string[];
    limit?: number;
}
/**
 * A single search result enriched with project context.
 */
export interface CrossRepoSearchResult {
    specId: string;
    title: string;
    status: string;
    type: string;
    tags: string[];
    matchScore: number;
    projectPath: string;
    projectHash: string;
}
/**
 * Aggregated response from a cross-repo search.
 */
export interface CrossRepoSearchResponse {
    total: number;
    items: CrossRepoSearchResult[];
    scannedProjects: number;
    failedProjects: number;
}
/**
 * Input for registering a project path.
 */
export interface RegisterProjectInput {
    projectPath: string;
}
/**
 * Input for unregistering a project path.
 */
export interface UnregisterProjectInput {
    projectPath: string;
}
/**
 * Input filters for single-project spec search.
 */
export interface SpecSearchInput {
    query?: string;
    status?: string[];
    tags?: string[];
    type?: string[];
    limit?: number;
}
/**
 * A spec enriched with a relevance match score (0-1).
 */
export interface SpecSearchResult {
    specId: string;
    title: string;
    status: string;
    type: string;
    tags: string[];
    matchScore: number;
}
/**
 * Response from single-project spec search.
 */
export interface SpecSearchResponse {
    total: number;
    items: SpecSearchResult[];
}
/**
 * Compact summary of a registered project, returned in error responses
 * when the caller did not provide projectId or projectPath.
 */
export interface RegisteredProjectSummary {
    /** Deterministic SHA-256 hash (first 16 chars) — use as projectId */
    id: string;
    /** Absolute filesystem path to the project root */
    path: string;
    /** Project name derived from the last path segment */
    name: string;
}
/**
 * Result of auto-detecting a project path.
 * Discriminated union: resolved | ambiguous | missing.
 */
export type ProjectAutoDetectResult = {
    kind: 'resolved';
    projectId: string;
    projectPath: string;
    /** True when resolved via auto-detection (not passed explicitly) */
    autoDetected: boolean;
} | {
    kind: 'ambiguous';
    registeredProjects: RegisteredProjectSummary[];
} | {
    kind: 'missing';
    registeredProjects: RegisteredProjectSummary[];
};
/**
 * Per-project bundle: project identity + pre-loaded specs.
 */
export interface ProjectSpecBundle {
    projectPath: string;
    projectHash: string;
    specs: Spec[];
}
//# sourceMappingURL=cross-repo-search.d.ts.map