/** * hosted-skill-set.ts — the single authoritative derivation of the * "hosted metadata skill" set. * * A hosted metadata skill ships its `package.json` and docs but NOT its `src/`. * That set is expressed in three places that can silently drift apart: * * 1. Each skill's own `package.json` -> `skills.runtime` / `skills.source`. * 2. The negated `!skills/{...}/src` glob(s) in the root `package.json` `files`. * * (1) is AUTHORITATIVE. It lives next to the thing it describes, so it cannot be * forgotten when a directory is added, removed, or converted. (2) and (3) are * projections of it and are guarded against drift in `hosted-skill-set.test.ts`. * * Two accessors, deliberately different: * * THIS REPO now has ZERO hosted skills: every catalog entry ships bundled source * or is instruction prose. The guard-facing `requireHostedMetadataSlugs` * accessor, and the five guards derived from it, were retired in the change that * emptied the set — which is precisely what its own emptiness error demanded. * `catalog-runnable.test.ts` now asserts the set stays empty, so re-introducing * a hosted skill fails loudly rather than silently. * * The parsing helpers below remain: `release-guard.ts` still applies them to * ARBITRARY packages, where a non-empty hosted set is a legitimate answer, and * `release-guard.integration.test.ts` exercises them against synthetic fixtures. */ /** Shape of the only part of a skill `package.json` this module reads. */ export interface HostedSkillPackageMarkers { skills?: { runtime?: unknown; source?: unknown; }; } /** * The authoritative predicate: does this parsed skill `package.json` declare * itself as hosted metadata (implementation lives off-repo)? */ export declare function isHostedMetadataPackage(pkg: unknown): boolean; /** Read a skill directory's `package.json` and apply the authoritative predicate. */ export declare function isHostedMetadataSkillDir(skillDir: string): boolean; /** * Enumerate the hosted metadata slugs under a `skills/` root, sorted. * Returns `[]` for this repo, and may legitimately be non-empty for another. */ export declare function listHostedMetadataSlugs(skillsRoot: string): string[]; export declare const HOSTED_METADATA_SET_EMPTY_ERROR: string; /** * Extract the set of slugs whose `src/` the root `files` array genuinely * excludes from the published package, sorted and de-duplicated. * * Only negations that survive to the end of the array count: a later entry that * re-includes `skills/` discards every exclusion before it, exactly as npm * resolves them. */ export declare function parseHostedSourceExclusionSlugs(files: readonly string[]): string[]; /** * Render the canonical `files` exclusion entry for a slug set, so a drift * failure can print the exact line to paste. Emits the bare form for a single * slug because the one-element brace form is inert under `npm pack`. */ export declare function buildHostedSourceExclusionGlob(slugs: readonly string[]): string; /** Paths in a packed file list that would ship a hosted skill's implementation source. */ export declare function findHostedSourcePacklistLeaks(packedPaths: readonly string[], hostedSlugs: Iterable): string[]; /** Symmetric difference between two slug sets, for readable drift failures. */ export declare function diffSlugSets(expected: readonly string[], actual: readonly string[]): { missing: string[]; unexpected: string[]; };