import { numberConfigHelper } from '@aztec/foundation/config';
import { z } from 'zod';
export const ProverBrokerConfig = z.object({
    /** If starting a prover broker locally, the max number of retries per proving job */
    proverBrokerJobMaxRetries: z.number(),
    /** If starting a prover broker locally, the time after which a job times out and gets assigned to a different agent */
    proverBrokerJobTimeoutMs: z.number(),
    /** If starting a prover broker locally, the interval the broker checks for timed out jobs */
    proverBrokerPollIntervalMs: z.number(),
    /** If starting a prover broker locally, the directory to store broker data */
    proverBrokerDataDirectory: z.string().optional(),
});
export const proverBrokerConfigMappings = {
    proverBrokerJobTimeoutMs: {
        env: 'PROVER_BROKER_JOB_TIMEOUT_MS',
        description: 'Jobs are retried if not kept alive for this long',
        ...numberConfigHelper(30000),
    },
    proverBrokerPollIntervalMs: {
        env: 'PROVER_BROKER_POLL_INTERVAL_MS',
        description: 'The interval to check job health status',
        ...numberConfigHelper(1000),
    },
    proverBrokerJobMaxRetries: {
        env: 'PROVER_BROKER_JOB_MAX_RETRIES',
        description: 'If starting a prover broker locally, the max number of retries per proving job',
        ...numberConfigHelper(3),
    },
    proverBrokerDataDirectory: {
        env: 'PROVER_BROKER_DATA_DIRECTORY',
        description: 'If starting a prover broker locally, the directory to store broker data',
    },
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmVyLWJyb2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnRlcmZhY2VzL3Byb3Zlci1icm9rZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUUEsT0FBTyxFQUEyQixrQkFBa0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXZGLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEIsTUFBTSxDQUFDLE1BQU0sa0JBQWtCLEdBQUcsQ0FBQyxDQUFDLE1BQU0sQ0FBQztJQUN6QyxxRkFBcUY7SUFDckYseUJBQXlC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