/** * Plugin format registry. * * The single ordered list of every supported plugin format. Readers, the * marketplace parser, and `ProposePlugin` all go through here instead of * branching on a format, so adding or evolving a vendor layout is a one-file * change (write/adjust an adapter, add it to {@link PLUGIN_FORMATS}). * * Order is precedence order — native `.agents-plugin` first, then Claude, then * Copilot — so "first match wins" when a directory carries more than one format. */ import type { NormalizedPlugin } from "../manifest.js"; import { claudeFormat } from "./claude.js"; import { copilotFormat } from "./copilot.js"; import type { EmittedFile, MarketplacePlatform, PluginDraft, PluginFormatAdapter, PluginFormatId } from "./types.js"; /** All registered formats, in precedence order (lower `precedence` first). */ export declare const PLUGIN_FORMATS: readonly PluginFormatAdapter[]; /** Look up an adapter by its internal format id. */ export declare function getFormat(id: PluginFormatId): PluginFormatAdapter | undefined; /** Look up an adapter by its public platform token (`"github"` → Copilot). */ export declare function getFormatByPlatform(platform: MarketplacePlatform): PluginFormatAdapter | undefined; /** * Whether `root` carries an actual manifest file, in any supported format. * Cheap: existence only, no parse. */ export declare function hasAnyManifest(root: string): boolean; /** * Whether the skill scanner should treat `root` as a plugin and stop descending. * * Keyed on the **manifest**, deliberately not on `detectPlugin`. Claude's * manifest-optional rule counts a bare `SKILL.md` as enough to make a directory a * plugin — true inside a plugins directory, catastrophic inside a skills * directory, where it describes every plain skill folder there is. Using * `detectPlugin` here would make the scanner skip all of them. */ export declare function isPluginRoot(root: string): boolean; /** * Parse a plugin directory using the highest-precedence format present. * Returns null when no registered format recognizes the directory. * * `supportPlatform` records *every* format present (not just the winner), so a * directory carrying more than one vendor layout reports all of them. */ export declare function parsePluginWithFormats(root: string, options?: { requireManifest?: boolean; }): NormalizedPlugin | null; /** * Render a draft into the on-disk files for the given platforms (defaulting to * the draft's own `supportPlatform`, then to every format). Files from different * formats live under distinct marker directories, so the merge never collides. */ export declare function emitForPlatforms(draft: PluginDraft, platforms?: MarketplacePlatform[]): EmittedFile[]; export { claudeFormat, copilotFormat }; export type { EmittedFile, MarketplacePlatform, PluginDraft, PluginFormatAdapter, PluginFormatId, } from "./types.js"; /** * Everything the adapters claim to understand: manifest keys, plugin-relative * paths they read, marketplace index locations, and the surfaces they knowingly * skip. * * This is the input to the Tier 2 drift check (§2.2), and it is a *declaration* * on purpose. A checker that inferred coverage by reading the parsers would be * validating its own inference; a declared set is a claim the codebase makes, * which a vendor reference can falsify. * * `unsupportedSurfaces` is not a gap list. Those paths are known and * deliberately unhandled, so re-flagging them every run would bury the one * finding that matters: a vendor path in neither set. */ export declare function declaredVocabulary(): { manifestKeys: string[]; marketplaceKeys: string[]; readPaths: string[]; marketplaceFiles: string[]; unsupportedSurfaces: string[]; }; //# sourceMappingURL=index.d.ts.map