/** * Dependency resolver for market assets. * * 1. Collects the target assets and all transitive asset dependencies. * 2. For each asset, selects an explicitly requested immutable version, or * otherwise takes the latest published version, and verifies it satisfies * ALL constraints from every dependent. * 3. Intersects npm dependency ranges across all resolved assets and checks * that they are compatible. */ import type { MarketClient } from './client.js'; import type { AssetFileEntry } from './contract.js'; import { type AssetDependencyAlias, type AssetDependencies } from './schemas.js'; export interface ResolvedAsset { name: string; type: string; version: string; description: string | null; npmDependencies: Record; assetDependencies: AssetDependencies; skillDependencies: Record; /** The resolved version's file index, carried from resolution so install needs no further reads. */ files: AssetFileEntry[]; } export interface ResolveResult { assets: ResolvedAsset[]; npmDependencies: Record; skillDependencies: Record; /** * File aliases declared by dependents, keyed by dependency name: canonical install path → the * path the dependent's project keeps the file at. Install writes files through this map (a * template whose author renamed a dependency's files reinstalls them at the renamed locations). */ assetAliases?: Record; } interface AssetRequest { name: string; range: string; } export declare class ResolutionError extends Error { constructor(message: string); } export declare function resolve(client: MarketClient['asset'], requests: AssetRequest[], opts?: { includeUnapproved?: boolean; key?: string; }): Promise; export {}; //# sourceMappingURL=resolve.d.ts.map