export type ProjectConventionKind = "admin" | "api-route" | "extension" | "link" | "module" | "subscriber"; export type ProjectConventionRouteSurface = "admin" | "public"; interface ProjectConventionContributionBase { /** Stable, path-derived identifier. Source files are never evaluated. */ id: string; kind: ProjectConventionKind; /** POSIX-formatted path relative to the project root. */ sourcePath: string; } export interface ProjectConventionApiRoute extends ProjectConventionContributionBase { kind: "api-route"; surface: ProjectConventionRouteSurface; /** Surface-relative URL path, including a leading slash. */ route: string; } export interface ProjectConventionFileContribution extends ProjectConventionContributionBase { kind: Exclude; } export type ProjectConventionContribution = ProjectConventionApiRoute | ProjectConventionFileContribution; export declare const PROJECT_CONVENTION_DIAGNOSTIC_CODES: { readonly PROJECT_CONVENTION_ID_COLLISION: "Two convention contributions resolve to the same stable identifier."; readonly PROJECT_CONVENTION_ROUTE_COLLISION: "Two convention API routes resolve to the same surface and route pattern."; }; export type ProjectConventionDiagnosticCode = keyof typeof PROJECT_CONVENTION_DIAGNOSTIC_CODES; export interface ProjectConventionDiagnostic { code: ProjectConventionDiagnosticCode; severity: "error"; message: string; /** Colliding identifier for ID diagnostics. */ id?: string; /** Colliding surface for route diagnostics. */ surface?: ProjectConventionRouteSurface; /** Canonical route pattern for route diagnostics. */ route?: string; /** Sorted project-relative paths involved in the collision. */ sourcePaths: readonly string[]; } export interface ProjectConventionDiscovery { contributions: readonly ProjectConventionContribution[]; diagnostics: readonly ProjectConventionDiagnostic[]; } export interface DiscoverProjectConventionsOptions { projectRoot: string; } export type DiscoverProjectConventionsInput = string | DiscoverProjectConventionsOptions; /** * Discover source-backed project contributions from conventional locations. * * This is a build-time, Node-only filesystem scan. It does not import, parse, * or execute project source files. */ export declare function discoverProjectConventions(input: DiscoverProjectConventionsInput): Promise; export {};