require("../../_virtual/_rolldown/runtime.cjs");
let zod_v3 = require("zod/v3");
//#region src/agents/middleware/constants.ts
const RetrySchema = zod_v3.z.object({
	/**
	* Maximum number of retry attempts after the initial call.
	* Default is 2 retries (3 total attempts). Must be >= 0.
	*/
	maxRetries: zod_v3.z.number().min(0).default(2),
	/**
	* Either an array of error constructors to retry on, or a function
	* that takes an error and returns `true` if it should be retried.
	* Default is to retry on all errors.
	*/
	retryOn: zod_v3.z.union([zod_v3.z.function().args(zod_v3.z.instanceof(Error)).returns(zod_v3.z.boolean()), zod_v3.z.array(zod_v3.z.custom())]).default(() => () => true),
	/**
	* Multiplier for exponential backoff. Each retry waits
	* `initialDelayMs * (backoffFactor ** retryNumber)` milliseconds.
	* Set to 0.0 for constant delay. Default is 2.0.
	*/
	backoffFactor: zod_v3.z.number().min(0).default(2),
	/**
	* Initial delay in milliseconds before first retry. Default is 1000 (1 second).
	*/
	initialDelayMs: zod_v3.z.number().min(0).default(1e3),
	/**
	* Maximum delay in milliseconds between retries. Caps exponential
	* backoff growth. Default is 60000 (60 seconds).
	*/
	maxDelayMs: zod_v3.z.number().min(0).default(6e4),
	/**
	* Whether to add random jitter (±25%) to delay to avoid thundering herd.
	* Default is `true`.
	*/
	jitter: zod_v3.z.boolean().default(true)
});
//#endregion
exports.RetrySchema = RetrySchema;

//# sourceMappingURL=constants.cjs.map