import { z } from "zod"; import type { StorageClient } from "../storage/client.js"; export declare const resolveProjectInputSchema: z.ZodObject<{ context: z.ZodString; platform: z.ZodDefault>; limit: z.ZodDefault; }, "strip", z.ZodTypeAny, { limit: number; context: string; platform: "claude" | "gpt"; }, { context: string; limit?: number | undefined; platform?: "claude" | "gpt" | undefined; }>; export type ResolveProjectInput = z.infer; export interface ProjectMatch { slug: string; parentSlug?: string; pageCount: number; title?: string; aliases?: string[]; instructionsPath: string; projectPath: string; score: number; confidence: "high" | "medium" | "low"; matchedOn: string[]; } export declare function tokenize(value: string): string[]; /** * Score a project against the context tokens. * * Ranking follows signal coverage measured across the production wiki, not * intuition: the slug is present for 36 of 36 projects, a root readme for 23, * a real title for 22, and a summary for only 6 (GH #430). A resolver built on * readme metadata — the obvious design — would fail on a third of projects, * including the largest. So slug and aliases dominate, content is the fallback * that catches nicknames the slug does not contain, and title is a tiebreak. */ export declare function scoreProject(ctxTokens: Set, project: { slug: string; title?: string; aliases?: string[]; contentHits?: number; }): { score: number; matchedOn: string[]; }; /** * Resolve freeform context to a project slug and its instruction file. * * Deliberately does not load anything. Resolution and loading stay separate so * a wrong guess costs one call rather than a whole bundle of the wrong * project's context, and so the caller can confirm with the user when the * result is ambiguous. */ export declare function resolveProject(_drive: StorageClient, input: ResolveProjectInput, userId?: string): Promise; export interface LikelyExistingProjectMatch { slug: string; parentSlug?: string; pageCount: number; title?: string; score: number; confidence: "high" | "medium" | "low"; matchedOn: string[]; } /** * Used by create_page (GH #597) to check, before writing the first page of a * brand-new top-level `projects//` folder, whether an existing * project already plausibly covers the same topic. Read-only and advisory — * it never blocks the write, it only lets the caller surface a warning * instead of silently forking the topic across two project folders. * * Deliberately uses a lower bar than resolve_project's "medium"/"high" * confidence tiers: a real duplicate caught only by shared vocabulary (no * shared slug/alias/title word) tops out around content's score cap of 30 * (scoreProject caps content at Math.min(30, contentHits * 6)), which never * reaches the 60-point medium threshold. Any positive score here already * passed scoreProject's stopword-filtered token overlap, so it is real * signal, not noise — it is surfaced as a warning, not used to block. */ export declare function findLikelyExistingProject(newSlug: string, context: string, userId: string): Promise; //# sourceMappingURL=resolveProject.d.ts.map