import type { ResourceFormat, Surface } from './types.js'; /** * Detects the format of a resource at the given path * * Detection logic: * 1. Check if path exists * 2. If directory: * - Check for .claude-plugin/plugin.json → plugin * - Check for .claude-plugin/marketplace.json → marketplace * - If both exist: * • Check if marketplace has plugin with source: "./" (co-located pattern) → marketplace * • Otherwise → unknown (truly ambiguous) * 3. If file: * - Must have .json extension * - Check filename: installed_plugins.json or known_marketplaces.json * 4. Otherwise → unknown * * Co-located plugin pattern: A marketplace that contains a plugin in the same directory * (source: "./" or ".") rather than in a subdirectory. This is valid for single-plugin * marketplaces and avoids unnecessary directory nesting. * * @param resourcePath - Path to the resource to detect * @returns ResourceFormat discriminated union */ export declare function detectResourceFormat(resourcePath: string): Promise; /** * Enumerate all manifest surfaces present at a directory's root layer. * * Unlike {@link detectResourceFormat} (single-answer), this returns every * recognized manifest found in the same directory. A skill-claude-plugin * (root SKILL.md + .claude-plugin/plugin.json) returns two surfaces; a * canonical plugin layout returns one (SKILL.md lives under skills//, * not at the plugin root, so no agent-skill surface at this level). * * Detection rules (independent, all applied): * - `/SKILL.md` exists → { type: 'agent-skill', path: /SKILL.md } * - `/.claude-plugin/plugin.json` exists → { type: 'claude-plugin', path: } * - `/.claude-plugin/marketplace.json` exists → { type: 'marketplace', path: } * * Returns `[]` for nonexistent paths, files, or directories with no recognized manifests. * * @param dirPath - Absolute path to a directory * @returns Array of surfaces in enumerator-stable order (skill, plugin, marketplace) */ export declare function enumerateSurfaces(dirPath: string): Promise; //# sourceMappingURL=format-detection.d.ts.map