/** Test-only: clear the in-process resolver cache between cases. */ export declare function resetResolverCache(): void; /** * Parse a GitHub remote URL to `{ owner, repo }`. Returns null for non-GitHub * hosts or malformed input. Repo capture accepts dots (e.g. `pages.github.io`) * and strips an optional trailing `.git`. */ export declare function parseGitHubRemoteUrl(url: string): { owner: string; repo: string; } | null; /** * 0761: Locate a source-tree skill at `/skills//SKILL.md`. * * vskill itself authors skills at this top-level layout (the canonical * author-side location), distinct from the plugin-author layout under * `/plugins//skills/`. Without this probe, the resolver falls through * to bare-name and the platform proxy mistakenly resolves to a same-named * standalone GitHub repo. * * Security: same isUnsafeSegment guard as `findAuthoredSkillDir`, plus a * prefix-containment check against `resolve(, "skills") + sep`. */ export declare function findAuthoredSourceTreeSkillDir(root: string, skill: string): Promise; /** * Locate an authored skill on disk under `/plugins//skills//SKILL.md`. * Returns the absolute directory containing SKILL.md, or null if not found. * On duplicates across plugins, returns the lexicographically first match. * * Security: rejects path-separator or `..` segments in `skill`/`plugin` and * verifies the resolved dir lives under `/plugins/`. */ export declare function findAuthoredSkillDir(root: string, skill: string): Promise; /** * Run `git -C config --get remote.origin.url` and parse to owner/repo. * Returns null if git is missing, the dir is not a git repo, the remote is * absent, or the URL is not a parsable GitHub URL. */ export declare function readGitOriginOwnerRepo(dir: string): Promise<{ owner: string; repo: string; } | null>; /** * Decide whether `plugin` is an installed-agent dir (`.claude`, `.cursor`, * `.windsurf`, `.codex`, `.openclaw`, `.agent`, `.kiro`, `.gemini`, * `.github`, `.aider`, `.copilot`, `.opencode`, `.pi`, ...). The convention * is uniform: every supported agent dir starts with `.`. * * Used by the resolver to pick the right "what is the upstream of this skill" * branch: installed-agent views go straight to the lockfile (which records * the source the install came from); authoring views run the source-tree * probe first so the Studio sees the SAME upstream the author publishes to. */ export declare function isInstalledAgentDirPlugin(plugin: string | null | undefined): boolean; /** * Resolve a bare skill name to `owner/repo/skill`. * * 0765: `plugin` is now part of the lookup. When `plugin` identifies an * installed-agent dir (e.g. `.claude/scout`), the lockfile-derived upstream * wins — the user is looking at a downstream copy whose source is recorded * in the lockfile, NOT the same-named source-tree skill in the local repo. * For authoring plugins (e.g. `vskill/scout`), the existing 0761 source-tree * probe runs first. * * Cache key is `${plugin}::${skill}` so an installed view of `foo` and an * authoring view of `foo` cache independently. * * Order (authoring view): cache → source-tree → lockfile → authored-skill on * disk + git remote → bare-name fallback. * * Order (installed-agent view): cache → lockfile → bare-name fallback. */ export declare function resolveSkillApiName(skill: string, root: string, plugin?: string | null): Promise;