import type { IdeId } from '../ide/ide-types.js'; /** * The 8 platforms per Slice #12 final piece. Slice #0.7 + Slice * #0.5.2 registered these in the IdeId union; this list is the * single source of truth for the sync fan-out. */ export declare const SYNC_PLATFORMS: readonly IdeId[]; export interface PlatformSyncResult { /** The platform that was attempted. */ readonly platform: IdeId; /** True if installBundledSkills returned without error. */ readonly ok: boolean; /** Skills newly symlinked (idempotent re-runs return []). */ readonly installed: readonly string[]; /** Skills whose target was not a managed symlink (third-party owned). */ readonly skipped: readonly string[]; /** Error message; present when ok=false. */ readonly error?: string; /** Wall-clock duration in ms. */ readonly durationMs: number; } export interface SyncServiceInput { readonly projectRoot: string; /** When omitted, the service iterates all 8 platforms. */ readonly platforms?: readonly IdeId[] | undefined; /** When true, the installer is invoked in dry-run mode. */ readonly dryRun?: boolean | undefined; } export interface SyncServiceResult { readonly applied: boolean; readonly dryRun: boolean; readonly projectRoot: string; readonly perPlatform: readonly PlatformSyncResult[]; readonly syncedCount: number; readonly failedCount: number; readonly totalInstalled: number; } interface InstallBundledSkillsOptions { readonly ideId: IdeId; readonly projectRoot: string; readonly dryRun?: boolean; readonly targetRoot?: string; } interface InstallResult { readonly installed: readonly string[]; readonly skipped: readonly string[]; } type InstallerFn = (opts: InstallBundledSkillsOptions) => InstallResult; /** * Resolve the path of `install-skills.mjs` inside the peaks-cli * install root, walking up from `import.meta.url` until a * `package.json` with `"name": "peaks-cli"` is found. Returns * `null` when peaks-cli is not on the import path or the script * is absent (e.g. a partial install). */ export declare function resolvePeaksCliInstallerPath(): string | null; /** * Test seam: attempt to import the installer at `scriptPath`. * Returns the `installBundledSkills` function on success, or * `null` when the file is missing / not importable. The * production code calls this through `loadInstaller`; tests * `vi.spyOn` it to drive the three-tier probe without touching * the real filesystem. */ export declare function loadInstallerForTest(scriptPath: string): Promise; /** * Validate a single platform id against the SYNC_PLATFORMS * allowlist. Throws on a bogus value. */ export declare function assertValidPlatform(platform: string): asserts platform is IdeId; export declare function runSkillSync(input: SyncServiceInput): Promise; /** * Test-only export surface. Not part of the public API; subject * to breaking changes without a major version bump. * * The seam exposes the `services` indirection table (so tests * can `vi.spyOn` the resolver and loader) and a cache reset. */ export declare const __testing: { services: { resolvePeaksCliInstallerPath(): string | null; loadInstallerForTest(scriptPath: string): Promise; }; resetInstallerCache(): void; }; export {};