/**
 * Environment Setup Utility
 * Issue #96: npm install CLI support
 * Issue #136: DRY refactoring - isGlobalInstall and getConfigDir extracted to install-context.ts
 * Migrated from scripts/setup-env.sh
 */
import { EnvConfig, EnvSetupOptions, ValidationResult } from '../types';
export { isGlobalInstall, getConfigDir } from './install-context';
/**
 * Default environment configuration values
 * SF-4: DRY - Centralized defaults
 *
 * Issue #135: CM_DB_PATH removed - use getDefaultDbPath() instead
 * for dynamic path resolution based on install type
 */
export declare const ENV_DEFAULTS: {
    readonly CM_PORT: 3000;
    readonly CM_BIND: "127.0.0.1";
    readonly CM_LOG_LEVEL: "info";
    readonly CM_LOG_FORMAT: "text";
};
/**
 * Default root directory for worktrees
 */
export declare const DEFAULT_ROOT_DIR: string;
/**
 * Get the default database path based on install type
 * Issue #135: Dynamic DB path resolution
 * Issue #136: Uses isGlobalInstall from install-context.ts
 *
 * For global installs: ~/.commandmate/data/cm.db
 * For local installs: <cwd>/data/cm.db (as absolute path)
 *
 * @returns Absolute path to the default database file
 */
export declare function getDefaultDbPath(): string;
/**
 * Get the path to .env file based on install type
 * Issue #119: Global install uses ~/.commandmate/, local uses cwd
 * Issue #136: Uses isGlobalInstall from install-context.ts
 * Issue #136: Added issueNo parameter for worktree-specific .env files
 *
 * @param issueNo - Optional issue number for worktree-specific .env
 * @returns Path to .env file
 */
export declare function getEnvPath(issueNo?: number): string;
/**
 * Resolve path securely by resolving symlinks and verifying within allowed directory
 * Issue #125: Path traversal protection (OWASP A01:2021 - Broken Access Control)
 *
 * @param targetPath - The path to resolve and verify
 * @param allowedBaseDir - The base directory that targetPath must be within
 * @returns The resolved real path
 * @throws Error if path resolves outside allowed directory
 */
export declare function resolveSecurePath(targetPath: string, allowedBaseDir: string): string;
/**
 * Get the PIDs directory path
 * Issue #136: Centralized pids directory path resolution
 *
 * @returns Path to pids directory
 */
export declare function getPidsDir(): string;
/**
 * Get the PID file path based on install type
 * Issue #125: DRY principle - centralized PID file path resolution
 * Issue #136: Uses getConfigDir from install-context.ts
 *
 * @param issueNo - Optional issue number for worktree-specific PID file
 * @returns Path to PID file (uses getConfigDir for consistency)
 */
export declare function getPidFilePath(issueNo?: number): string;
/**
 * Sanitize input by removing control characters
 * SF-SEC-3: Input sanitization
 */
export declare function sanitizeInput(input: string): string;
/**
 * Sanitize path input
 * SF-SEC-3: Path sanitization
 */
export declare function sanitizePath(input: string): string;
/**
 * Validate port number
 * SF-SEC-3: Port validation
 */
export declare function validatePort(input: string): number;
/**
 * Escape value for .env file
 * SF-SEC-3: Safe .env value escaping
 */
export declare function escapeEnvValue(value: string): string;
/**
 * Environment setup utility
 */
export declare class EnvSetup {
    private envPath;
    constructor(envPath?: string);
    /**
     * Create .env file
     * SF-SEC-1: Sets file permissions to 0600
     */
    createEnvFile(config: EnvConfig, options?: EnvSetupOptions): Promise<void>;
    /**
     * Backup existing .env file
     */
    backupExisting(): Promise<string | null>;
    /**
     * Generate secure authentication token
     */
    generateAuthToken(): string;
    /**
     * Validate configuration
     */
    validateConfig(config: EnvConfig): ValidationResult;
}
//# sourceMappingURL=env-setup.d.ts.map