/** * Install resolved assets into a local project. * * 1. Streams asset files into the project. * 2. Merges npm dependencies into package.json. * 3. Runs the package manager to install npm deps. * 4. Installs skill dependencies via the `skills` CLI (`skills add `). * * NOTE: This module uses Node.js APIs (fs, path, nypm, child_process) and is * available from the package's Node-only `./install` entry point. */ import type { MarketClient } from './client.js'; import type { AssetInstallMetadata } from './contract.js'; import { findInstallRoot } from './project-walk.js'; import type { ResolveResult } from './resolve.js'; export { findInstallRoot }; export interface InstallOptions { /** Directory to start project root discovery from (default: cwd) */ cwd?: string; /** Overwrite existing files that differ from the asset zip. */ force?: boolean; /** Top-level assets requested by the user, used for package.json assetDependencies. */ rootRequests?: InstallRootRequest[]; /** Asset-type install policy from the Market API. */ installMetadata?: Record; /** Capability key of a shared private asset (`market install --key `). */ key?: string; /** Log progress */ onProgress?: (message: string) => void; /** * Override how a single resolved skill source is installed. The default * shells out to `npx skills add -y`. Exposed for tests and for * callers that want to drive a different skills runner. */ runSkillAdd?: (source: string, cwd: string) => Promise; /** Override package installation for tests or an embedding runner. */ runPackageManagerInstall?: (cwd: string, log: (message: string) => void) => Promise; /** * Static-root folders (relative to the install root, e.g. `public`). Asset files destined for * one are not downloaded; `/_redirects` gains an exact-match 302 rule to the file's * canonical data-plane URL instead — the standard static-host redirects format, so any host * (or dev middleware) that understands `_redirects` serves the asset straight from the CDN. */ redirectRoots?: string[]; } export interface InstallRootRequest { name: string; range: string; saveRange: string; save: boolean; } export interface InstalledAsset { name: string; type: string; version: string; description: string | null; files: string[]; /** Install paths served via `_redirects` instead of being written to disk. */ redirectedFiles: string[]; } export interface InstallResult { assets: InstalledAsset[]; npmDependencies: Record; /** Installed skills, keyed by label, with the source passed to `skills add`. */ skillDependencies: Record; warnings: string[]; } export declare function install(client: MarketClient, resolution: ResolveResult, opts?: InstallOptions): Promise; //# sourceMappingURL=install.d.ts.map