import { z } from 'zod';

/**
 * # Metadata Customization Layer Protocol
 *
 * Defines the overlay system for managing user customizations on top of
 * package-delivered metadata. This protocol solves the critical challenge
 * of separating "vendor-managed" metadata from "customer-customized" metadata,
 * enabling safe package upgrades without losing user changes.
 *
 * ## Architecture Alignment
 * - **Salesforce**: Managed vs Unmanaged metadata components
 * - **ServiceNow**: Update Sets with collision detection
 * - **WordPress**: Parent/child theme overlay model
 * - **Kubernetes**: Strategic merge patch for resource customization
 *
 * ## Three-Layer Model
 * ```
 * ┌─────────────────────────────────┐
 * │  User Layer (scope: user)       │  ← Personal overrides (per-user)
 * ├─────────────────────────────────┤
 * │  Platform Layer (scope: platform)│  ← Admin customizations (per-tenant)
 * ├─────────────────────────────────┤
 * │  System Layer (scope: system)   │  ← Package-delivered metadata (read-only)
 * └─────────────────────────────────┘
 * ```
 *
 * ## Merge Resolution Order
 * Effective metadata = System ← merge(Platform) ← merge(User)
 * Each layer only stores the delta (changed fields), not the full definition.
 */
/**
 * Customization Origin
 * Identifies who created the customization.
 */
declare const CustomizationOriginSchema: z.ZodEnum<{
    api: "api";
    user: "user";
    package: "package";
    migration: "migration";
    admin: "admin";
}>;
/**
 * Field-Level Change Tracking
 * Records exactly which fields were modified by the customer.
 */
declare const FieldChangeSchema: z.ZodObject<{
    path: z.ZodString;
    originalValue: z.ZodOptional<z.ZodUnknown>;
    currentValue: z.ZodUnknown;
    changedBy: z.ZodOptional<z.ZodString>;
    changedAt: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * Metadata Overlay Schema
 *
 * Represents a customization layer on top of package-delivered metadata.
 * Each overlay stores only the delta (changed fields) relative to the base definition.
 *
 * During package upgrades, the system performs a 3-way merge:
 * 1. Old package version (base)
 * 2. New package version (theirs)
 * 3. Customer customizations (ours)
 *
 * @example
 * ```yaml
 * # Package delivers: object "crm__account" with field "status" label "Status"
 * # Admin changes label to "Account Status"
 * # Overlay record:
 * baseType: object
 * baseName: crm__account
 * packageId: com.acme.crm
 * packageVersion: "1.0.0"
 * changes:
 *   - path: "fields.status.label"
 *     originalValue: "Status"
 *     currentValue: "Account Status"
 * ```
 */
declare const MetadataOverlaySchema: z.ZodObject<{
    id: z.ZodString;
    baseType: z.ZodString;
    baseName: z.ZodString;
    packageId: z.ZodOptional<z.ZodString>;
    packageVersion: z.ZodOptional<z.ZodString>;
    scope: z.ZodDefault<z.ZodEnum<{
        user: "user";
        platform: "platform";
    }>>;
    tenantId: z.ZodOptional<z.ZodString>;
    owner: z.ZodOptional<z.ZodString>;
    patch: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        originalValue: z.ZodOptional<z.ZodUnknown>;
        currentValue: z.ZodUnknown;
        changedBy: z.ZodOptional<z.ZodString>;
        changedAt: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    active: z.ZodDefault<z.ZodBoolean>;
    createdAt: z.ZodOptional<z.ZodString>;
    createdBy: z.ZodOptional<z.ZodString>;
    updatedAt: z.ZodOptional<z.ZodString>;
    updatedBy: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * Merge Conflict
 * Represents a conflict between package update and customer customization.
 */
declare const MergeConflictSchema: z.ZodObject<{
    path: z.ZodString;
    baseValue: z.ZodUnknown;
    incomingValue: z.ZodUnknown;
    customValue: z.ZodUnknown;
    suggestedResolution: z.ZodEnum<{
        manual: "manual";
        "keep-custom": "keep-custom";
        "accept-incoming": "accept-incoming";
    }>;
    reason: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
 * Merge Strategy Configuration
 * Controls how metadata merging behaves during package upgrades.
 */
declare const MergeStrategyConfigSchema: z.ZodObject<{
    defaultStrategy: z.ZodDefault<z.ZodEnum<{
        "keep-custom": "keep-custom";
        "accept-incoming": "accept-incoming";
        "three-way-merge": "three-way-merge";
    }>>;
    alwaysAcceptIncoming: z.ZodOptional<z.ZodArray<z.ZodString>>;
    alwaysKeepCustom: z.ZodOptional<z.ZodArray<z.ZodString>>;
    autoResolveNonConflicting: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
/**
 * Merge Result
 * Result of a 3-way merge operation during package upgrade.
 */
declare const MergeResultSchema: z.ZodObject<{
    success: z.ZodBoolean;
    mergedMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    updatedOverlay: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        baseValue: z.ZodUnknown;
        incomingValue: z.ZodUnknown;
        customValue: z.ZodUnknown;
        suggestedResolution: z.ZodEnum<{
            manual: "manual";
            "keep-custom": "keep-custom";
            "accept-incoming": "accept-incoming";
        }>;
        reason: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    autoResolved: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        resolution: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    stats: z.ZodOptional<z.ZodObject<{
        totalFields: z.ZodNumber;
        unchanged: z.ZodNumber;
        autoResolved: z.ZodNumber;
        conflicts: z.ZodNumber;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Customizable Metadata Policy
 * Defines what parts of a metadata item can be customized by admins/users.
 * Package vendors use this to control customization boundaries.
 */
declare const CustomizationPolicySchema: z.ZodObject<{
    metadataType: z.ZodString;
    allowCustomization: z.ZodDefault<z.ZodBoolean>;
    lockedFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
    customizableFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
    allowAddFields: z.ZodDefault<z.ZodBoolean>;
    allowDeleteFields: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
type CustomizationOrigin = z.infer<typeof CustomizationOriginSchema>;
type FieldChange = z.infer<typeof FieldChangeSchema>;
type MetadataOverlay = z.infer<typeof MetadataOverlaySchema>;
type MergeConflict = z.infer<typeof MergeConflictSchema>;
type MergeStrategyConfig = z.infer<typeof MergeStrategyConfigSchema>;
type MergeResult = z.infer<typeof MergeResultSchema>;
type CustomizationPolicy = z.infer<typeof CustomizationPolicySchema>;

/**
 * # Metadata Plugin Protocol
 *
 * Defines the specification for the **Metadata Plugin** — the central authority
 * responsible for managing ALL metadata across the ObjectStack platform.
 *
 * ## Architecture
 * The Metadata Plugin consolidates all scattered metadata operations into a single,
 * cohesive plugin that "takes over" the entire platform's metadata management:
 *
 * ```
 * ┌──────────────────────────────────────────────────────────────────┐
 * │                     Metadata Plugin                             │
 * │                                                                  │
 * │  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────┐  │
 * │  │ Type Registry │  │  Loader      │  │ Customization Layer  │  │
 * │  │ (all types)   │  │  (file/db/s3)│  │ (overlay / merge)    │  │
 * │  └──────────────┘  └──────────────┘  └──────────────────────┘  │
 * │                                                                  │
 * │  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────┐  │
 * │  │ Persistence  │  │  Query       │  │ Lifecycle            │  │
 * │  │ (db records) │  │  (search)    │  │ (validate/deploy)    │  │
 * │  └──────────────┘  └──────────────┘  └──────────────────────┘  │
 * └──────────────────────────────────────────────────────────────────┘
 * ```
 *
 * ## Alignment
 * - **Salesforce**: Metadata API (deploy, retrieve, describe)
 * - **ServiceNow**: System Dictionary + Metadata API
 * - **Kubernetes**: API Server + CRD Registry
 *
 * ## References
 * - kernel/metadata-loader.zod.ts — Storage backend protocol
 * - kernel/metadata-customization.zod.ts — Overlay/merge protocol
 * - system/metadata-persistence.zod.ts — Database record format
 * - contracts/metadata-service.ts — Service interface
 */
/**
 * Platform Metadata Type Enum
 *
 * The canonical list of all metadata types managed by the platform.
 * Each type maps to a specific Zod schema (e.g., ObjectSchema, ViewSchema).
 * Plugins can extend this registry via `contributes.kinds` in the manifest.
 */
declare const MetadataTypeSchema: z.ZodEnum<{
    object: "object";
    function: "function";
    field: "field";
    datasource: "datasource";
    profile: "profile";
    role: "role";
    page: "page";
    dashboard: "dashboard";
    action: "action";
    view: "view";
    flow: "flow";
    app: "app";
    validation: "validation";
    trigger: "trigger";
    service: "service";
    approval: "approval";
    workflow: "workflow";
    hook: "hook";
    router: "router";
    agent: "agent";
    report: "report";
    translation: "translation";
    permission: "permission";
}>;
type MetadataType = z.infer<typeof MetadataTypeSchema>;
/**
 * Metadata Type Registry Entry
 *
 * Describes a registered metadata type, including its validation schema,
 * file patterns, and capabilities. Used by the metadata plugin to:
 * 1. Discover metadata files on disk
 * 2. Validate metadata payloads
 * 3. Determine storage behavior
 */
declare const MetadataTypeRegistryEntrySchema: z.ZodObject<{
    type: z.ZodEnum<{
        object: "object";
        function: "function";
        field: "field";
        datasource: "datasource";
        profile: "profile";
        role: "role";
        page: "page";
        dashboard: "dashboard";
        action: "action";
        view: "view";
        flow: "flow";
        app: "app";
        validation: "validation";
        trigger: "trigger";
        service: "service";
        approval: "approval";
        workflow: "workflow";
        hook: "hook";
        router: "router";
        agent: "agent";
        report: "report";
        translation: "translation";
        permission: "permission";
    }>;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    filePatterns: z.ZodArray<z.ZodString>;
    supportsOverlay: z.ZodDefault<z.ZodBoolean>;
    allowRuntimeCreate: z.ZodDefault<z.ZodBoolean>;
    supportsVersioning: z.ZodDefault<z.ZodBoolean>;
    loadOrder: z.ZodDefault<z.ZodNumber>;
    domain: z.ZodEnum<{
        data: "data";
        security: "security";
        system: "system";
        automation: "automation";
        ai: "ai";
        ui: "ui";
    }>;
}, z.core.$strip>;
type MetadataTypeRegistryEntry = z.infer<typeof MetadataTypeRegistryEntrySchema>;
/**
 * Metadata Query Schema
 *
 * Standard protocol for searching and filtering metadata items.
 * Used by the metadata service to support advanced metadata discovery.
 */
declare const MetadataQuerySchema: z.ZodObject<{
    types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
        object: "object";
        function: "function";
        field: "field";
        datasource: "datasource";
        profile: "profile";
        role: "role";
        page: "page";
        dashboard: "dashboard";
        action: "action";
        view: "view";
        flow: "flow";
        app: "app";
        validation: "validation";
        trigger: "trigger";
        service: "service";
        approval: "approval";
        workflow: "workflow";
        hook: "hook";
        router: "router";
        agent: "agent";
        report: "report";
        translation: "translation";
        permission: "permission";
    }>>>;
    namespaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
    packageId: z.ZodOptional<z.ZodString>;
    search: z.ZodOptional<z.ZodString>;
    scope: z.ZodOptional<z.ZodEnum<{
        user: "user";
        system: "system";
        platform: "platform";
    }>>;
    state: z.ZodOptional<z.ZodEnum<{
        deprecated: "deprecated";
        active: "active";
        archived: "archived";
        draft: "draft";
    }>>;
    tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
    sortBy: z.ZodDefault<z.ZodEnum<{
        type: "type";
        name: "name";
        createdAt: "createdAt";
        updatedAt: "updatedAt";
    }>>;
    sortOrder: z.ZodDefault<z.ZodEnum<{
        asc: "asc";
        desc: "desc";
    }>>;
    page: z.ZodDefault<z.ZodNumber>;
    pageSize: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
type MetadataQuery = z.input<typeof MetadataQuerySchema>;
/**
 * Metadata Query Result
 */
declare const MetadataQueryResultSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        type: z.ZodString;
        name: z.ZodString;
        namespace: z.ZodOptional<z.ZodString>;
        label: z.ZodOptional<z.ZodString>;
        scope: z.ZodOptional<z.ZodEnum<{
            user: "user";
            system: "system";
            platform: "platform";
        }>>;
        state: z.ZodOptional<z.ZodEnum<{
            deprecated: "deprecated";
            active: "active";
            archived: "archived";
            draft: "draft";
        }>>;
        packageId: z.ZodOptional<z.ZodString>;
        updatedAt: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    total: z.ZodNumber;
    page: z.ZodNumber;
    pageSize: z.ZodNumber;
}, z.core.$strip>;
type MetadataQueryResult = z.infer<typeof MetadataQueryResultSchema>;
/**
 * Metadata Event Schema
 *
 * Events emitted by the metadata plugin when metadata changes.
 * Enables reactive patterns across the platform (cache invalidation,
 * UI refresh, dependency tracking, etc.).
 */
declare const MetadataEventSchema: z.ZodObject<{
    event: z.ZodEnum<{
        "metadata.registered": "metadata.registered";
        "metadata.updated": "metadata.updated";
        "metadata.unregistered": "metadata.unregistered";
        "metadata.validated": "metadata.validated";
        "metadata.deployed": "metadata.deployed";
        "metadata.overlay.applied": "metadata.overlay.applied";
        "metadata.overlay.removed": "metadata.overlay.removed";
        "metadata.imported": "metadata.imported";
        "metadata.exported": "metadata.exported";
    }>;
    metadataType: z.ZodEnum<{
        object: "object";
        function: "function";
        field: "field";
        datasource: "datasource";
        profile: "profile";
        role: "role";
        page: "page";
        dashboard: "dashboard";
        action: "action";
        view: "view";
        flow: "flow";
        app: "app";
        validation: "validation";
        trigger: "trigger";
        service: "service";
        approval: "approval";
        workflow: "workflow";
        hook: "hook";
        router: "router";
        agent: "agent";
        report: "report";
        translation: "translation";
        permission: "permission";
    }>;
    name: z.ZodString;
    namespace: z.ZodOptional<z.ZodString>;
    packageId: z.ZodOptional<z.ZodString>;
    timestamp: z.ZodString;
    actor: z.ZodOptional<z.ZodString>;
    payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
type MetadataEvent = z.infer<typeof MetadataEventSchema>;
/**
 * Metadata Validation Result
 */
declare const MetadataValidationResultSchema: z.ZodObject<{
    valid: z.ZodBoolean;
    errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        message: z.ZodString;
        code: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
        path: z.ZodString;
        message: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
type MetadataValidationResult = z.infer<typeof MetadataValidationResultSchema>;
/**
 * Metadata Plugin Configuration
 *
 * The unified configuration for the metadata plugin, combining
 * storage, caching, customization, and type registry settings.
 */
declare const MetadataPluginConfigSchema: z.ZodObject<{
    storage: z.ZodObject<{
        datasource: z.ZodOptional<z.ZodString>;
        tableName: z.ZodDefault<z.ZodString>;
        fallback: z.ZodDefault<z.ZodEnum<{
            none: "none";
            memory: "memory";
            filesystem: "filesystem";
        }>>;
        rootDir: z.ZodOptional<z.ZodString>;
        formats: z.ZodDefault<z.ZodArray<z.ZodEnum<{
            javascript: "javascript";
            yaml: "yaml";
            json: "json";
            typescript: "typescript";
        }>>>;
        cache: z.ZodOptional<z.ZodObject<{
            enabled: z.ZodDefault<z.ZodBoolean>;
            ttl: z.ZodDefault<z.ZodNumber>;
            maxSize: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        watch: z.ZodDefault<z.ZodBoolean>;
        watchOptions: z.ZodOptional<z.ZodObject<{
            ignored: z.ZodOptional<z.ZodArray<z.ZodString>>;
            persistent: z.ZodDefault<z.ZodBoolean>;
            ignoreInitial: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>;
        validation: z.ZodOptional<z.ZodObject<{
            strict: z.ZodDefault<z.ZodBoolean>;
            throwOnError: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>;
        loaderOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>;
    customizationPolicies: z.ZodOptional<z.ZodArray<z.ZodObject<{
        metadataType: z.ZodString;
        allowCustomization: z.ZodDefault<z.ZodBoolean>;
        lockedFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
        customizableFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
        allowAddFields: z.ZodDefault<z.ZodBoolean>;
        allowDeleteFields: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    mergeStrategy: z.ZodOptional<z.ZodObject<{
        defaultStrategy: z.ZodDefault<z.ZodEnum<{
            "keep-custom": "keep-custom";
            "accept-incoming": "accept-incoming";
            "three-way-merge": "three-way-merge";
        }>>;
        alwaysAcceptIncoming: z.ZodOptional<z.ZodArray<z.ZodString>>;
        alwaysKeepCustom: z.ZodOptional<z.ZodArray<z.ZodString>>;
        autoResolveNonConflicting: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>;
    additionalTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        filePatterns: z.ZodArray<z.ZodString>;
        supportsOverlay: z.ZodDefault<z.ZodBoolean>;
        allowRuntimeCreate: z.ZodDefault<z.ZodBoolean>;
        supportsVersioning: z.ZodDefault<z.ZodBoolean>;
        loadOrder: z.ZodDefault<z.ZodNumber>;
        domain: z.ZodEnum<{
            data: "data";
            security: "security";
            system: "system";
            automation: "automation";
            ai: "ai";
            ui: "ui";
        }>;
        type: z.ZodString;
    }, z.core.$strip>>>;
    enableEvents: z.ZodDefault<z.ZodBoolean>;
    validateOnWrite: z.ZodDefault<z.ZodBoolean>;
    enableVersioning: z.ZodDefault<z.ZodBoolean>;
    cacheMaxItems: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
type MetadataPluginConfig = z.input<typeof MetadataPluginConfigSchema>;
/**
 * Metadata Plugin Manifest
 *
 * The complete manifest for the Metadata Plugin, declaring its identity,
 * capabilities, and configuration. This is the "contract" between the
 * metadata plugin and the kernel.
 */
declare const MetadataPluginManifestSchema: z.ZodObject<{
    id: z.ZodLiteral<"com.objectstack.metadata">;
    name: z.ZodLiteral<"ObjectStack Metadata Service">;
    version: z.ZodString;
    type: z.ZodLiteral<"standard">;
    description: z.ZodDefault<z.ZodString>;
    capabilities: z.ZodObject<{
        crud: z.ZodDefault<z.ZodBoolean>;
        query: z.ZodDefault<z.ZodBoolean>;
        overlay: z.ZodDefault<z.ZodBoolean>;
        watch: z.ZodDefault<z.ZodBoolean>;
        importExport: z.ZodDefault<z.ZodBoolean>;
        validation: z.ZodDefault<z.ZodBoolean>;
        versioning: z.ZodDefault<z.ZodBoolean>;
        events: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>;
    config: z.ZodOptional<z.ZodObject<{
        storage: z.ZodObject<{
            datasource: z.ZodOptional<z.ZodString>;
            tableName: z.ZodDefault<z.ZodString>;
            fallback: z.ZodDefault<z.ZodEnum<{
                none: "none";
                memory: "memory";
                filesystem: "filesystem";
            }>>;
            rootDir: z.ZodOptional<z.ZodString>;
            formats: z.ZodDefault<z.ZodArray<z.ZodEnum<{
                javascript: "javascript";
                yaml: "yaml";
                json: "json";
                typescript: "typescript";
            }>>>;
            cache: z.ZodOptional<z.ZodObject<{
                enabled: z.ZodDefault<z.ZodBoolean>;
                ttl: z.ZodDefault<z.ZodNumber>;
                maxSize: z.ZodOptional<z.ZodNumber>;
            }, z.core.$strip>>;
            watch: z.ZodDefault<z.ZodBoolean>;
            watchOptions: z.ZodOptional<z.ZodObject<{
                ignored: z.ZodOptional<z.ZodArray<z.ZodString>>;
                persistent: z.ZodDefault<z.ZodBoolean>;
                ignoreInitial: z.ZodDefault<z.ZodBoolean>;
            }, z.core.$strip>>;
            validation: z.ZodOptional<z.ZodObject<{
                strict: z.ZodDefault<z.ZodBoolean>;
                throwOnError: z.ZodDefault<z.ZodBoolean>;
            }, z.core.$strip>>;
            loaderOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strip>;
        customizationPolicies: z.ZodOptional<z.ZodArray<z.ZodObject<{
            metadataType: z.ZodString;
            allowCustomization: z.ZodDefault<z.ZodBoolean>;
            lockedFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
            customizableFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
            allowAddFields: z.ZodDefault<z.ZodBoolean>;
            allowDeleteFields: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>>;
        mergeStrategy: z.ZodOptional<z.ZodObject<{
            defaultStrategy: z.ZodDefault<z.ZodEnum<{
                "keep-custom": "keep-custom";
                "accept-incoming": "accept-incoming";
                "three-way-merge": "three-way-merge";
            }>>;
            alwaysAcceptIncoming: z.ZodOptional<z.ZodArray<z.ZodString>>;
            alwaysKeepCustom: z.ZodOptional<z.ZodArray<z.ZodString>>;
            autoResolveNonConflicting: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>;
        additionalTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
            label: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            filePatterns: z.ZodArray<z.ZodString>;
            supportsOverlay: z.ZodDefault<z.ZodBoolean>;
            allowRuntimeCreate: z.ZodDefault<z.ZodBoolean>;
            supportsVersioning: z.ZodDefault<z.ZodBoolean>;
            loadOrder: z.ZodDefault<z.ZodNumber>;
            domain: z.ZodEnum<{
                data: "data";
                security: "security";
                system: "system";
                automation: "automation";
                ai: "ai";
                ui: "ui";
            }>;
            type: z.ZodString;
        }, z.core.$strip>>>;
        enableEvents: z.ZodDefault<z.ZodBoolean>;
        validateOnWrite: z.ZodDefault<z.ZodBoolean>;
        enableVersioning: z.ZodDefault<z.ZodBoolean>;
        cacheMaxItems: z.ZodDefault<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
type MetadataPluginManifest = z.input<typeof MetadataPluginManifestSchema>;
/**
 * Default Type Registry
 *
 * The built-in metadata type registry with default configurations.
 * Plugins extend this via `contributes.kinds` in the manifest.
 */
declare const DEFAULT_METADATA_TYPE_REGISTRY: MetadataTypeRegistryEntry[];
/**
 * Bulk Register Request
 */
declare const MetadataBulkRegisterRequestSchema: z.ZodObject<{
    items: z.ZodArray<z.ZodObject<{
        type: z.ZodString;
        name: z.ZodString;
        data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        namespace: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    continueOnError: z.ZodDefault<z.ZodBoolean>;
    validate: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
type MetadataBulkRegisterRequest = z.input<typeof MetadataBulkRegisterRequestSchema>;
/**
 * Bulk Operation Result
 */
declare const MetadataBulkResultSchema: z.ZodObject<{
    total: z.ZodNumber;
    succeeded: z.ZodNumber;
    failed: z.ZodNumber;
    errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
        type: z.ZodString;
        name: z.ZodString;
        error: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
type MetadataBulkResult = z.infer<typeof MetadataBulkResultSchema>;
/**
 * Metadata Dependency Schema
 *
 * Tracks dependencies between metadata items.
 * Used for impact analysis and safe deletion checks.
 */
declare const MetadataDependencySchema: z.ZodObject<{
    sourceType: z.ZodString;
    sourceName: z.ZodString;
    targetType: z.ZodString;
    targetName: z.ZodString;
    kind: z.ZodEnum<{
        reference: "reference";
        includes: "includes";
        extends: "extends";
        triggers: "triggers";
    }>;
}, z.core.$strip>;
type MetadataDependency = z.infer<typeof MetadataDependencySchema>;

export { MetadataQueryResultSchema as A, MetadataQuerySchema as B, type CustomizationOrigin as C, DEFAULT_METADATA_TYPE_REGISTRY as D, type MetadataType as E, type FieldChange as F, type MetadataTypeRegistryEntry as G, MetadataTypeRegistryEntrySchema as H, MetadataTypeSchema as I, MetadataValidationResultSchema as J, type MetadataQuery as M, type MetadataQueryResult as a, type MetadataBulkResult as b, type MetadataOverlay as c, type MetadataValidationResult as d, type MetadataDependency as e, CustomizationOriginSchema as f, type CustomizationPolicy as g, CustomizationPolicySchema as h, FieldChangeSchema as i, type MergeConflict as j, MergeConflictSchema as k, type MergeResult as l, MergeResultSchema as m, type MergeStrategyConfig as n, MergeStrategyConfigSchema as o, type MetadataBulkRegisterRequest as p, MetadataBulkRegisterRequestSchema as q, MetadataBulkResultSchema as r, MetadataDependencySchema as s, type MetadataEvent as t, MetadataEventSchema as u, MetadataOverlaySchema as v, type MetadataPluginConfig as w, MetadataPluginConfigSchema as x, type MetadataPluginManifest as y, MetadataPluginManifestSchema as z };
