/**
 * Manifest Loader Utility
 *
 * Loads and validates SpecVerse manifest files.
 * Provides default manifests for testing and development.
 */
import type { CapabilityMapping, InstanceMapping, DefaultMappings, DeploymentReference } from '../types/index.js';
import type { DefaultMappingsV2, OverrideMapping } from '../types/unified-mappings.js';
/**
 * Instance Factory Declaration
 *
 * Declares an instance factory with its source metadata.
 * Source structure matches registry FactorySource exactly.
 */
export interface InstanceFactoryDeclaration {
    /** Factory name (must match registry) */
    name: string;
    /** Source metadata */
    source: {
        /** Source type */
        type: 'npm' | 'git' | 'url';
        /** NPM package name (for npm type) */
        package?: string;
        /** Version constraint (for npm type) */
        version?: string;
        /** Git repository URL (for git type) */
        url?: string;
        /** Entry point file path */
        entrypoint?: string;
    };
}
export interface ManifestConfig {
    specVersion: string;
    name: string;
    description?: string;
    version: string;
    /** v3.3 Deployment Reference (REQUIRED) */
    deployment: DeploymentReference;
    /**
     * Instance Factories (NEW - v3.6+)
     *
     * Explicit declarations of instance factories with source metadata.
     * This allows validation without registry lookup.
     */
    instanceFactories?: InstanceFactoryDeclaration[];
    /**
     * Two-Level Mapping System (v3.6+) - RECOMMENDED
     *
     * Simplified mapping system with two clear levels:
     * - defaults: Sugar syntax for common cases
     * - overrides: Explicit control with optional configuration
     */
    defaults?: DefaultMappingsV2;
    overrides?: OverrideMapping[];
    /**
     * Three-Level Mapping System (v3.3) - LEGACY
     *
     * Maintained for backward compatibility.
     * Will be deprecated in future versions.
     * Use two-level system (defaults + overrides) instead.
     */
    defaultMappings?: DefaultMappings;
    capabilityMappings?: CapabilityMapping[];
    instanceMappings?: InstanceMapping[];
    /** Global configuration */
    configuration?: Record<string, any>;
    /** Manifest templates for common tech stacks */
    manifestTemplates?: Array<{
        template: string;
        version?: string;
    }>;
    /** Internal metadata */
    _manifestName?: string;
    _manifestPath?: string;
    _isDefault?: boolean;
}
export interface ManifestValidationResult {
    valid: boolean;
    errors: string[];
}
/**
 * Load manifest from file
 */
export declare function loadManifest(manifestPath: string): ManifestConfig;
/**
 * Get manifest configuration value by path
 */
export declare function getManifestValue(manifest: ManifestConfig | null | undefined, path: string, defaultValue?: any): any;
/**
 * Validate manifest structure (v3.3 only - no backward compatibility)
 */
export declare function validateManifest(manifest: ManifestConfig | null | undefined): ManifestValidationResult;
/**
 * Merge manifests (v3.3 composition)
 */
export declare function mergeManifests(baseManifest: ManifestConfig | null | undefined, overrideManifest: ManifestConfig | null | undefined): ManifestConfig | null;
/**
 * Get manifest summary for debugging
 */
export declare function getManifestSummary(manifest: ManifestConfig): {
    name: string;
    version: string;
    deployment: string;
    mappingStrategies: string[];
    instanceCount?: number;
};
//# sourceMappingURL=manifest-loader.d.ts.map