/** * Global constants for Playwright Oracle Reporter * Copyright (c) 2026 Mihajlo Stojanovski */ /** * System Requirements */ export declare const SYSTEM_REQUIREMENTS: { /** Minimum Node.js major version */ readonly MIN_NODE_VERSION: 18; /** Minimum Node.js version string for display */ readonly MIN_NODE_VERSION_STRING: "18.0.0"; /** Minimum free memory in bytes (512MB) */ readonly MIN_FREE_MEMORY_BYTES: number; /** Minimum CPU cores recommended */ readonly MIN_CPU_CORES: 2; }; /** * Configuration Defaults */ export declare const CONFIG_DEFAULTS: { /** Default output directory name */ readonly OUTPUT_DIR: "playwright-oracle-report"; /** Default history directory name */ readonly HISTORY_DIR: ".playwright-oracle-history"; /** Default telemetry sampling interval in seconds */ readonly TELEMETRY_INTERVAL_SECONDS: 3; /** Default AI analysis mode */ readonly AI_MODE: "auto"; /** Default OpenAI model */ readonly OPENAI_MODEL: "gpt-4o"; /** Default OpenAI max tokens */ readonly OPENAI_MAX_TOKENS: 4000; /** Default OpenAI timeout in milliseconds */ readonly OPENAI_TIMEOUT_MS: 30000; /** Default OpenAI retry attempts */ readonly OPENAI_RETRIES: 3; /** Default max sanitized payload size for OpenAI */ readonly OPENAI_MAX_INPUT_CHARS: 15000; /** Default Claude model */ readonly CLAUDE_MODEL: "claude-sonnet-4-20250514"; /** Default Claude max tokens */ readonly CLAUDE_MAX_TOKENS: 4000; /** Default Claude timeout in milliseconds */ readonly CLAUDE_TIMEOUT_MS: 30000; /** Default Claude retry attempts */ readonly CLAUDE_RETRIES: 3; /** Default max sanitized payload size for Claude */ readonly CLAUDE_MAX_INPUT_CHARS: 15000; /** HTML report filename */ readonly REPORT_FILENAME: "index.html"; }; /** * Validation Constraints */ export declare const VALIDATION_CONSTRAINTS: { /** Valid AI modes */ readonly AI_MODES: { readonly AUTO: "auto"; readonly RULES: "rules"; readonly OPENAI: "openai"; readonly CLAUDE: "claude"; readonly OFF: "off"; }; /** Minimum recommended telemetry interval in seconds */ readonly MIN_TELEMETRY_INTERVAL: 1; /** Maximum recommended telemetry interval in seconds */ readonly MAX_TELEMETRY_INTERVAL: 60; /** Telemetry interval constraints */ readonly TELEMETRY_INTERVAL: { readonly MIN: 1; readonly MAX: 60; }; /** Minimum free memory warning threshold in bytes */ readonly MIN_FREE_MEMORY_BYTES: number; /** System memory warning threshold (percentage) */ readonly MEMORY_WARNING_THRESHOLD: 0.85; /** System memory critical threshold (percentage) */ readonly MEMORY_CRITICAL_THRESHOLD: 0.95; }; /** * Rate Limiting Configuration */ export declare const RATE_LIMIT_CONFIG: { /** Token bucket max capacity */ readonly MAX_TOKENS: 50; /** Token refill rate per second */ readonly REFILL_RATE: 10; /** Circuit breaker failure threshold */ readonly CIRCUIT_BREAKER_THRESHOLD: 5; /** Circuit breaker reset timeout in milliseconds */ readonly CIRCUIT_BREAKER_RESET_MS: 60000; }; /** * Memory Optimization */ export declare const MEMORY_CONFIG: { /** Default chunk size for batch processing */ readonly DEFAULT_CHUNK_SIZE: 100; /** Maximum samples to keep in memory monitor */ readonly MAX_MEMORY_SAMPLES: 100; /** Memory monitoring interval in milliseconds */ readonly MONITORING_INTERVAL_MS: 5000; /** Default object pool size */ readonly DEFAULT_POOL_SIZE: 10; }; /** * Byte Conversion Constants */ export declare const BYTES: { /** Bytes per kilobyte */ readonly KB: 1024; /** Bytes per megabyte */ readonly MB: number; /** Bytes per gigabyte */ readonly GB: number; }; /** * Platform-Specific Constants */ export declare const PLATFORM_COMMANDS: { /** Command to open files on macOS */ readonly MACOS_OPEN: "open"; /** Command to open files on Linux */ readonly LINUX_OPEN: "xdg-open"; /** Command to open files on Windows */ readonly WINDOWS_OPEN: "start"; }; /** * Environment Variable Names */ export declare const ENV_VARS: { readonly OPENAI_API_KEY: "OPENAI_API_KEY"; readonly ANTHROPIC_API_KEY: "ANTHROPIC_API_KEY"; readonly OUTPUT_DIR: "PW_ORACLE_OUTPUT_DIR"; readonly HISTORY_DIR: "PW_ORACLE_HISTORY_DIR"; readonly OPEN_REPORT: "PW_ORACLE_OPEN_REPORT"; readonly RUN_LABEL: "PW_ORACLE_RUN_LABEL"; readonly TELEMETRY_INTERVAL: "PW_ORACLE_TELEMETRY_INTERVAL"; readonly AI_MODE: "PW_ORACLE_AI_MODE"; readonly OPENAI_MODEL: "PW_ORACLE_OPENAI_MODEL"; readonly OPENAI_MAX_TOKENS: "PW_ORACLE_OPENAI_MAX_TOKENS"; readonly OPENAI_TIMEOUT_MS: "PW_ORACLE_OPENAI_TIMEOUT_MS"; readonly OPENAI_RETRIES: "PW_ORACLE_OPENAI_RETRIES"; readonly OPENAI_ENABLED: "PW_ORACLE_OPENAI_ENABLED"; readonly CLAUDE_MODEL: "PW_ORACLE_CLAUDE_MODEL"; readonly CLAUDE_MAX_TOKENS: "PW_ORACLE_CLAUDE_MAX_TOKENS"; readonly CLAUDE_TIMEOUT_MS: "PW_ORACLE_CLAUDE_TIMEOUT_MS"; readonly CLAUDE_RETRIES: "PW_ORACLE_CLAUDE_RETRIES"; readonly CLAUDE_CONCURRENCY: "PW_ORACLE_CLAUDE_CONCURRENCY"; readonly CLAUDE_MAX_INPUT_CHARS: "PW_ORACLE_CLAUDE_MAX_INPUT_CHARS"; readonly LOG_LEVEL: "PW_ORACLE_LOG_LEVEL"; readonly SILENT: "PW_ORACLE_SILENT"; readonly AI_TIMEOUT_MS: "PW_ORACLE_AI_TIMEOUT_MS"; readonly THRESHOLD_LOAD1: "PW_ORACLE_THRESHOLD_LOAD1"; readonly THRESHOLD_PRESSURE: "PW_ORACLE_THRESHOLD_PRESSURE"; readonly THRESHOLD_IOWAIT: "PW_ORACLE_THRESHOLD_IOWAIT"; readonly THRESHOLD_STEAL: "PW_ORACLE_THRESHOLD_STEAL"; readonly OPENAI_MAX_INPUT_CHARS: "PW_ORACLE_OPENAI_MAX_INPUT_CHARS"; readonly HISTORY_DAYS: "PW_ORACLE_HISTORY_DAYS"; }; type EnvVarKey = keyof typeof ENV_VARS; export declare function getEnvVar(key: EnvVarKey): string | undefined; export declare function getBooleanEnvVar(key: EnvVarKey): boolean | undefined; /** * Valid AI modes */ export declare const AI_MODES: readonly ["auto", "rules", "openai", "claude", "off"]; export type AIMode = (typeof AI_MODES)[number]; /** * Supported platforms */ export declare const SUPPORTED_PLATFORMS: readonly ["darwin", "linux", "win32"]; export type SupportedPlatform = (typeof SUPPORTED_PLATFORMS)[number]; /** * Exit Codes */ export declare const EXIT_CODES: { /** Success */ readonly SUCCESS: 0; /** General error */ readonly ERROR: 1; /** Configuration invalid */ readonly CONFIG_INVALID: 2; /** Invalid configuration (alias for backwards compatibility) */ readonly INVALID_CONFIG: 2; /** File not found */ readonly FILE_NOT_FOUND: 3; /** Command not supported */ readonly NOT_SUPPORTED: 4; /** Unexpected/unhandled error */ readonly UNEXPECTED_ERROR: 5; }; /** * Timeout values for various operations */ export declare const TIMEOUTS: { /** Shellcommand execution timeout in milliseconds */ readonly SHELL_COMMAND_MS: 10000; /** File operation timeout in milliseconds */ readonly FILE_OPERATION_MS: 5000; /** Network request timeout in milliseconds */ readonly NETWORK_REQUEST_MS: 30000; }; /** * CPU Usage Estimation (for Windows) */ export declare const CPU_ESTIMATION: { /** Estimated system CPU percentage multiplier */ readonly SYSTEM_MULTIPLIER: 0.2; /** Estimated user CPU percentage multiplier */ readonly USER_MULTIPLIER: 0.8; }; export {}; //# sourceMappingURL=constants.d.ts.map