/** * What kind of Doc Detective document a buffer is, or `null` when the buffer is * not a Doc Detective document at all. The server stays completely silent * (no diagnostics, no completion) for `null` — the detection gate is biased * toward silence, because false noise on an unrelated `package.json` is far * worse than a real spec that a user has to opt into with `$schema`. */ export type DocClass = "spec" | "config" | null; export interface ClassifyInput { /** Document URI (e.g. `file:///abs/path/foo.spec.json`). */ uri: string; /** Full document text. */ text: string; } /** Extract a lowercase basename from a URI or path, sans query/fragment. */ export declare function basenameFromUri(uri: string): string; /** * Classify a document by filename first, then by an explicit `$schema` opt-in, * then by a shape sniff — in that order of confidence. Pure: no filesystem, no * network, tolerant of syntactically broken buffers (an editor sends those * constantly), so it never throws. */ export declare function classifyDocument({ uri, text }: ClassifyInput): DocClass; /** Convenience predicate: is this a document the server should touch at all? */ export declare function shouldHandleDocument(input: ClassifyInput): boolean; /** Is this URI a JSON document (by extension)? */ export declare function isJsonUri(uri: string): boolean; /** Is this URI a YAML document (by extension)? */ export declare function isYamlUri(uri: string): boolean; //# sourceMappingURL=gate.d.ts.map