/** * Finding a source from what a person typed. Commands take ids * (`claude-code-local`), while people type what `vana sources` shows them * (`Claude Code`, `claude-code`). */ /** The fields a lookup needs from a catalog entry. */ export interface LookupSource { id: string; name: string; } export interface SourceLookup { /** The one source the input names, when it names exactly one. */ match: T | null; /** The closest id, offered as "Did you mean" when nothing matched. */ suggestion: T | null; } /** * Resolves `input` to a source: an exact id first, then an id or display * name with case, spaces and dashes ignored, then the single id that starts * with the input (`claude-code` for `claude-code-local`). Anything looser is * only a suggestion, never a match, so a typo cannot run the wrong source. */ export declare function lookupSource(input: string, sources: readonly T[]): SourceLookup; /** `Unknown source: x. Did you mean y?` plus where the list is. */ export declare function formatUnknownSourceMessage(input: string, suggestion: LookupSource | null): string; //# sourceMappingURL=lookup.d.ts.map