/** * Post-build integrity checks for packaged skills. * * Run after packageSkill() completes — all files are copied, all links rewritten. * Detects unreferenced files and broken links in the packaged output. */ import { type ValidationIssue } from '@vibe-agent-toolkit/agent-schema'; /** * Check that every file in the packaged output is referenced from some markdown or HTML file. * * Two-pass detection: * 1. Walk formal link graph from SKILL.md (strict, transitive, covers .md and .html/.htm). * 2. For files not covered by pass 1, check whether their output-relative path * is mentioned anywhere in packaged content files (markdown or HTML). * Authors often document CLI scripts via invocation examples rather than * formal links, and that counts as documented. * * A third way to not be an orphan is to be DECLARED: `filesConfigDests` carries * the `files:` dests the packager just materialized (the return value of * `applyFilesConfig`). Naming a `source`/`dest` pair in config is proof of intent * on equal footing with a link or a mention — the rule engine has always modeled * it as a peer clause (`ctx.inFilesConfig`) — so the caller MUST pass the list. * Omitting it makes every `files:`-injected file (a vendored engine, a generated * schema, a data pack — none of them meant for a human reader) fail the build as * a file the author forgot to document. The parameter defaults to empty only so a * check against an output dir with no `files:` config reads cleanly. * * @param outputDir Absolute path to the packaged skill output. * @param filesConfigDests Skill-output-relative dests declared in `files:`, as * returned by `applyFilesConfig`. Normalized here so a hand-built list spelled * `./x` or with backslashes still matches. */ export declare function checkUnreferencedFiles(outputDir: string, filesConfigDests?: readonly string[]): Promise; /** * Check that every local file link in packaged markdown and HTML files resolves to a file * that exists in the packaged output. * * @param outputDir Absolute path to the packaged skill output. * @param droppedDests Skill-output-relative dests a glob `files:` entry matched * and the never-package list refused — `applyFilesConfig(...).dropped`, mapped * to `.dest`. A link resolving to one of THESE is broken by deliberate policy, * and gets a remediation that says so instead of the generic "report a VAT bug". * Defaults to none for callers that never ran a files config (e.g. * `validateShippedPluginSkillLinks`, which inspects an already-built plugin * tree): they cannot know a drop happened, so they correctly claim no cause. */ export declare function checkBrokenPackagedLinks(outputDir: string, droppedDests?: readonly string[]): Promise; //# sourceMappingURL=post-build-checks.d.ts.map