import { INSTALLED_INDEX, MODULES_DIR } from './paths'; export type ManifestIssue = { path: string; message: string; }; export type ParsedSemver = { major: number; minor: number; patch: number; prerelease: string[]; }; export type AbilityValidator = { validateAbilityManifest(value: unknown): ManifestIssue[]; /** Present on the real vendored artifact — enables the install-time system-pin check (gate 2). */ satisfiesSystemPin?(systemVersion: string, range: string): boolean; /** Frozen semver primitives — the single source of `^`/`~` + prerelease ordering (reused by resolvePins). */ parseSemver?(version: string): ParsedSemver | null; compareSemver?(a: ParsedSemver, b: ParsedSemver): number; SYSTEM_IDENTITY?: { id: string; version: string; skeleton: string; }; }; export type InstalledIndexValidator = { validateInstalledIndex(value: unknown): ManifestIssue[]; isResolvedEntry(entry: Record): boolean; }; export type AbilityManifestLike = { id: string; version: string; title: string; system: { id: string; version: string; skeleton: string; }; activation: { mode: string; }; entry: string; configSchema: string; clips?: { name: string; src: string; }[]; }; export declare function loadVendoredValidator(): Promise; export declare function loadInstalledIndexValidator(): Promise; export type AbilityBundleCheck = { manifest: AbilityManifestLike | null; errors: string[]; }; /** True when an ability's built entry has three.js bundled in rather than left external. */ export declare function bundlesThree(entrySource: string): boolean; /** Validates an ability bundle directory: ability.json against the frozen contract + referenced files exist. */ export declare function checkAbilityBundle(root: string, validator: AbilityValidator): AbilityBundleCheck; export { MODULES_DIR, INSTALLED_INDEX }; export type InstallResult = { id: string; version: string; /** Bundle path relative to the index (== the ability id). */ path: string; /** Total entries in installed.json after this install. */ installedCount: number; }; /** * `helix install --first-party` (a.k.a. `--local`): the FIRST-PARTY whole-bundle copy — * validates, copies the bundle (code AND clips) into `/helix_modules//`, and upserts a * v1 local `installed.json` entry. Used by the engine devs to test co-located assets; consumer * worlds use `helix install` (no path) which is code-only with assets streaming from the CDN. */ export declare function installLocalAbility(bundleDir: string, worldDir: string, validator: AbilityValidator, indexValidator: InstalledIndexValidator): InstallResult;