import { PACK_INSTALLER_SKILL, type CatalogResult, type InstallType } from "./skill-catalog.js"; /** * Service layer for search_skills / get_skill (issue #4 §4). All names, * paths, and install arguments in the output originate from the validated * catalog snapshot — user input is only used for lookup, never spliced into * commands. */ export type SkillSearchInput = { query: string; pack?: string; platform?: string; install_type?: InstallType; limit?: number; }; export type SkillMatchView = { name: string; description: string; pack: string; repo: string; catalog_path: string; install_type: InstallType; source_url: string; score: number; matched_terms: string[]; match_reason: string; }; export type SearchSkillsOutput = { matches: SkillMatchView[]; catalog_revision: string; fetched_at: string; warnings: string[]; guidance: string; /** Machine-readable guidance kind, e.g. invalid_input for zero-token queries. */ guidance_kind: string; }; export type FlatInstallation = { type: "flat"; command: "npx"; args: string[]; display_command: string; requires_user_request: true; version_policy: "installer_default_not_catalog_pinned"; docs_url: string; note: string; }; export type WorkspaceInstallation = { type: "workspace"; handoff_skill: typeof PACK_INSTALLER_SKILL; installer: { command: "npx"; args: string[]; display_command: string; }; pack: { name: string; repo: string; ref: string; catalog_dir: string; install_script: string; workspace_dir: string; verify_paths: string[]; }; requires_project_root: true; requires_user_request: true; docs_url: string; note: string; }; export type Installation = FlatInstallation | WorkspaceInstallation; export type GetSkillOutput = { name: string; description: string; pack: string; repo: string; catalog_path: string; install_type: InstallType; source_url: string; catalog_revision: string; fetched_at: string; warnings: string[]; installation: Installation; }; export type SkillServiceDeps = { loadCatalog?: () => Promise; }; /** POSIX-style single quoting for display commands; safe for any validated value. */ export declare function shellQuote(argv: string[]): string; export declare function searchSkills(input: SkillSearchInput, deps?: SkillServiceDeps): Promise; export declare function getSkillDetail(input: { name: string; }, deps?: SkillServiceDeps): Promise;