/** Selection filter for dir entries (mirrors build-payload Pass-2 logic). */ export interface PayloadSelect { recursive?: boolean; ext?: string[]; include?: string[]; exclude?: string[]; prefix?: string[]; } /** A single payload manifest entry. */ export interface PayloadEntry { /** Repo-relative path under forge/forge/ (file or directory root). */ source: string; /** Destination path inside dist/forge-payload/ that build-payload emits. */ bundle: string; /** Destination inside a bootstrapped project (absent for bundleOnly entries). */ install?: string; /** True when shipped to the bundle but NOT vendored into a project (FORGE-BUG-044/045). */ bundleOnly?: boolean; /** Removal owner consumed by uninstall.ts. */ owner: string; kind: "file" | "dir"; /** True when build-payload synthesizes the artifact rather than copying it. */ synthesized?: boolean; select?: PayloadSelect; note?: string; } export interface PayloadManifest { entries: PayloadEntry[]; [key: string]: unknown; } /** * Does `name` satisfy an entry's ext/prefix filter? Curated `include` is handled * by the caller (applySelect); `exclude` is matched separately on path segments. */ export declare function matchesFilter(name: string, select?: PayloadSelect): boolean; /** Is any path segment of `rel` (or the basename) in the exclude list? */ export declare function isExcluded(rel: string, name: string, select?: PayloadSelect): boolean; /** * Resolve a dir entry's `select` against a concrete directory, returning the * sorted list of entry-relative paths the select claims. Mirrors the walk + * claim logic of check-payload-manifest.cjs (recursive / ext / prefix / exclude * / curated include) so build, bundle and install agree on the set. */ export declare function applySelect(absDir: string, select?: PayloadSelect): string[]; /** * Load + shape-validate the payload manifest from a root directory (the forge * root at build time, or the payload root at runtime — both carry the file). * Throws on a missing file or a malformed (no entries[]) manifest. */ export declare function loadManifest(root: string): PayloadManifest; /** * Entries that are vendored into a bootstrapped project (bundleOnly entries are * excluded — they ship to the bundle for tool resolution only). Order is * preserved from the manifest. FORGE-S32-T06 collapsed the former two command * trees into a single unified `commands/` entry, so there is no longer a * commands-union precedence or name-collision ordering to honour. */ export declare function installEntries(manifest: PayloadManifest): PayloadEntry[]; /** Group install-bearing entries by their install destination (manifest order). */ export declare function groupByInstall(manifest: PayloadManifest): Map; /** Group install-bearing entries by removal owner (uninstall grouping). */ export declare function groupByOwner(manifest: PayloadManifest): Map;