/**
 * Zod schemas for orchestrator configuration validation.
 *
 * Provides separate schemas for:
 * - localConfigSchema: validates YAML structure for per-orchestrator settings
 * - sharedConfigSchema: validates shared config stored in PostgreSQL
 * - appConfigSchema: validates the final merged config with cross-field validation
 *
 * Provider configuration (GitHub Apps, etc.) is managed via the `sources` table
 * and PgSecretStore, not through config schemas.
 */
import { z } from 'zod';
/**
 * Schema for the local YAML configuration file.
 * All fields optional except database.url.
 */
export declare const localConfigSchema: z.ZodObject<{
    database: z.ZodObject<{
        url: z.ZodString;
    }, z.core.$strip>;
    instance: z.ZodOptional<z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        mode: z.ZodOptional<z.ZodEnum<{
            platform: "platform";
            hybrid: "hybrid";
            independent: "independent";
        }>>;
    }, z.core.$strip>>;
    server: z.ZodOptional<z.ZodObject<{
        port: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        basePath: z.ZodOptional<z.ZodString>;
        logLevel: z.ZodOptional<z.ZodEnum<{
            error: "error";
            debug: "debug";
            info: "info";
            warn: "warn";
        }>>;
        tlsCertPath: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    scaler: z.ZodOptional<z.ZodObject<{
        configPath: z.ZodOptional<z.ZodString>;
        configDir: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type LocalConfigSchemaType = z.infer<typeof localConfigSchema>;
/**
 * Schema for the shared configuration stored in PostgreSQL.
 * All top-level fields are optional (DB may have partial config).
 */
export declare const sharedConfigSchema: z.ZodObject<{
    platform: z.ZodOptional<z.ZodObject<{
        url: z.ZodOptional<z.ZodString>;
        token: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    storage: z.ZodOptional<z.ZodObject<{
        type: z.ZodOptional<z.ZodEnum<{
            s3: "s3";
        }>>;
        bucket: z.ZodOptional<z.ZodString>;
        prefix: z.ZodOptional<z.ZodString>;
        region: z.ZodOptional<z.ZodString>;
        endpoint: z.ZodOptional<z.ZodString>;
        externalEndpoint: z.ZodOptional<z.ZodString>;
        forcePathStyle: z.ZodOptional<z.ZodBoolean>;
        logBucket: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    agentAuth: z.ZodOptional<z.ZodEnum<{
        token: "token";
        none: "none";
    }>>;
    agentTokenTtlMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    queue: z.ZodOptional<z.ZodObject<{
        maxDepth: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        timeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        backpressureThreshold: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
    lockfileCache: z.ZodOptional<z.ZodObject<{
        max: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        ttlMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
    staleDetector: z.ZodOptional<z.ZodObject<{
        scanIntervalMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        thresholdMultiplier: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        heartbeatIntervalMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
    secrets: z.ZodOptional<z.ZodObject<{
        key: z.ZodOptional<z.ZodString>;
        keyFile: z.ZodOptional<z.ZodString>;
        bootstrapAdminToken: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    pgCustomerSecrets: z.ZodDefault<z.ZodBoolean>;
    cluster: z.ZodOptional<z.ZodObject<{
        joinToken: z.ZodOptional<z.ZodString>;
        raftElectionTimeoutMinMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        raftElectionTimeoutMaxMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        raftHeartbeatMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        peerHeartbeatIntervalMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        peerMaxReconnectDelayMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        role: z.ZodOptional<z.ZodEnum<{
            coordinator: "coordinator";
            worker: "worker";
        }>>;
        coordinatorUrl: z.ZodOptional<z.ZodString>;
        peerStaleTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
    webhookPayloadDir: z.ZodOptional<z.ZodString>;
    cacheTtlDays: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    cacheBuildTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    cacheMaxTarballBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    userCacheQuotaBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    userCacheTtlMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    eventRouter: z.ZodOptional<z.ZodObject<{
        maxChainDepth: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        rateLimitPerWorkflowPerMinute: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        eventTtlSeconds: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
        cleanupIntervalMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
    eventLog: z.ZodOptional<z.ZodObject<{
        maxPayloadBytes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type SharedConfigSchemaType = z.infer<typeof sharedConfigSchema>;
/**
 * Schema for the final merged application configuration.
 * Includes cross-field validation via superRefine.
 */
export declare const appConfigSchema: z.ZodObject<{
    instanceId: z.ZodDefault<z.ZodString>;
    mode: z.ZodDefault<z.ZodEnum<{
        platform: "platform";
        hybrid: "hybrid";
        independent: "independent";
    }>>;
    databaseUrl: z.ZodDefault<z.ZodString>;
    port: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    basePath: z.ZodDefault<z.ZodString>;
    tlsCertPath: z.ZodOptional<z.ZodString>;
    scalerConfigPath: z.ZodOptional<z.ZodString>;
    scalerConfigDir: z.ZodOptional<z.ZodString>;
    platformUrl: z.ZodOptional<z.ZodString>;
    platformToken: z.ZodOptional<z.ZodString>;
    storage: z.ZodOptional<z.ZodObject<{
        type: z.ZodOptional<z.ZodEnum<{
            s3: "s3";
        }>>;
        bucket: z.ZodOptional<z.ZodString>;
        prefix: z.ZodOptional<z.ZodString>;
        region: z.ZodOptional<z.ZodString>;
        endpoint: z.ZodOptional<z.ZodString>;
        externalEndpoint: z.ZodOptional<z.ZodString>;
        forcePathStyle: z.ZodOptional<z.ZodBoolean>;
        logBucket: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    agentAuth: z.ZodDefault<z.ZodEnum<{
        token: "token";
        none: "none";
    }>>;
    agentTokenTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    queueMaxDepth: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    queueTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    queueBackpressureThreshold: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    lockfileCacheMax: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    lockfileCacheTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    staleDetectorScanIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    staleDetectorThresholdMultiplier: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    jobHeartbeatIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    secretKey: z.ZodOptional<z.ZodString>;
    secretKeyFile: z.ZodOptional<z.ZodString>;
    bootstrapAdminToken: z.ZodOptional<z.ZodString>;
    pgCustomerSecrets: z.ZodDefault<z.ZodBoolean>;
    cluster: z.ZodPrefault<z.ZodObject<{
        instanceId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
        address: z.ZodOptional<z.ZodString>;
        joinToken: z.ZodOptional<z.ZodString>;
        credentialFile: z.ZodDefault<z.ZodString>;
        autoRotateCredentials: z.ZodDefault<z.ZodBoolean>;
        peers: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>]>>;
        raftElectionTimeoutMinMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
        raftElectionTimeoutMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
        raftHeartbeatMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
        peerHeartbeatIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
        peerMaxReconnectDelayMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
        role: z.ZodDefault<z.ZodEnum<{
            coordinator: "coordinator";
            worker: "worker";
        }>>;
        coordinatorUrl: z.ZodOptional<z.ZodString>;
        peerStaleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    }, z.core.$strip>>;
    webhookPayloadDir: z.ZodOptional<z.ZodString>;
    cacheTtlDays: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    cacheBuildTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    cacheMaxTarballBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    userCacheQuotaBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    userCacheTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    eventRouterMaxChainDepth: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    eventRouterRateLimitPerWorkflowPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    eventRouterEventTtlSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    eventRouterCleanupIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    eventLogMaxPayloadBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    logLevel: z.ZodDefault<z.ZodEnum<{
        error: "error";
        debug: "debug";
        info: "info";
        warn: "warn";
    }>>;
    nodeEnv: z.ZodDefault<z.ZodEnum<{
        development: "development";
        production: "production";
        test: "test";
    }>>;
}, z.core.$strip>;
export type AppConfigSchemaType = z.infer<typeof appConfigSchema>;
//# sourceMappingURL=schema.d.ts.map