import { DEFAULT_RETRY_SCHEDULE_CONFIG, } from '../../../../modules/claude-invocation/entities/retrySchedule/retrySchedule.schema.js';
export function planRetry(currentAttempt, config = DEFAULT_RETRY_SCHEDULE_CONFIG) {
    const nextAttempt = currentAttempt + 1;
    if (nextAttempt > config.maxAttempts) {
        return { status: 'give-up' };
    }
    const exponential = config.initialDelayMs * config.multiplier ** currentAttempt;
    const delayMs = Math.min(exponential, config.maxDelayMs);
    return { status: 'retry', delayMs, nextAttempt };
}
//# sourceMappingURL=retrySchedule.valueObject.js.map