"use strict";
/**
 * Schedule Execution Configuration Constants
 * Issue #294: Centralized constants for schedule-related API routes
 *
 * Eliminates duplication of validation constants and UUID validation
 * across schedules/route.ts, schedules/[scheduleId]/route.ts,
 * and execution-logs/[logId]/route.ts.
 *
 * [S4-014] UUID v4 format validation
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.UUID_V4_PATTERN = exports.DEFAULT_PERMISSIONS = exports.VIBE_LOCAL_PERMISSIONS = exports.GEMINI_PERMISSIONS = exports.CODEX_SANDBOXES = exports.CLAUDE_PERMISSIONS = exports.MAX_SCHEDULE_CRON_LENGTH = exports.MAX_SCHEDULE_MESSAGE_LENGTH = exports.MAX_SCHEDULE_NAME_LENGTH = void 0;
exports.isValidUuidV4 = isValidUuidV4;
// =============================================================================
// Validation Constants
// =============================================================================
/** Maximum schedule name length */
exports.MAX_SCHEDULE_NAME_LENGTH = 100;
/** Maximum message length for schedule execution */
exports.MAX_SCHEDULE_MESSAGE_LENGTH = 10000;
/** Maximum cron expression length */
exports.MAX_SCHEDULE_CRON_LENGTH = 100;
// =============================================================================
// Permission Constants
// =============================================================================
/** Allowed permission values for claude CLI (--permission-mode) */
exports.CLAUDE_PERMISSIONS = ['default', 'acceptEdits', 'plan', 'dontAsk', 'bypassPermissions'];
/** Allowed sandbox values for codex CLI (--sandbox) */
exports.CODEX_SANDBOXES = ['read-only', 'workspace-write', 'danger-full-access'];
/** Allowed permission values for gemini CLI (no permission flags) */
exports.GEMINI_PERMISSIONS = [];
/** Allowed permission values for vibe-local CLI (no permission flags) */
exports.VIBE_LOCAL_PERMISSIONS = [];
/** Default permission per CLI tool */
exports.DEFAULT_PERMISSIONS = {
    claude: 'acceptEdits',
    codex: 'workspace-write',
    gemini: '',
    'vibe-local': '',
};
// =============================================================================
// UUID Validation
// =============================================================================
/**
 * UUID v4 validation pattern.
 * Matches standard UUID v4 format: xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx
 *
 * [S4-014] Used to validate schedule IDs and execution log IDs
 */
exports.UUID_V4_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
/**
 * Validate that a string is a valid UUID v4 format.
 *
 * @param id - String to validate
 * @returns true if the string matches UUID v4 format
 */
function isValidUuidV4(id) {
    return exports.UUID_V4_PATTERN.test(id);
}
