/**
 * Constants for AppShell filesystem operations.
 *
 * This module contains blacklist patterns, protected paths, and validation
 * rules used by the AppShell to enforce security constraints on file operations.
 */
/**
 * Files that cannot be deleted, written to, or modified directly.
 * These are critical configuration files that could break the application.
 */
export const PROTECTED_EXACT_PATHS = [
    "package.json",
    "package-lock.json",
    "yarn.lock",
    "pnpm-lock.yaml",
    "tsconfig.json",
    "turbo.json",
    "superblocks.json",
    "vite.config.ts",
];
/**
 * Directories that cannot be deleted or have their contents directly modified.
 * - .git: Version control
 * - node_modules: Dependencies
 * - .superblocks: Internal system files
 * - pages: Must use subdirectories, not direct files
 * - components: Framework internals
 * - apis: Must use virtual API file interface
 */
export const PROTECTED_DIRECTORIES = [
    ".git",
    "node_modules",
    ".superblocks",
    "pages",
    "apis",
];
/**
 * Regex patterns for protected files (environment files, package manager configs).
 */
export const PROTECTED_FILE_PATTERNS = [
    /^\.env$/,
    /^\.env\..+$/,
    /^\.npmrc$/,
    /^\.pnpmrc$/,
];
/**
 * Clark AI specific folders to blacklist from context.
 * These are framework/system folders that Clark shouldn't edit or include in prompts.
 */
export const CLARK_APP_BLACKLIST_PATTERNS = [];
/**
 * Consolidated blacklist configuration for file operations.
 */
export const FILE_OPERATION_BLACKLIST = {
    exactPaths: PROTECTED_EXACT_PATHS,
    directories: PROTECTED_DIRECTORIES,
    patterns: PROTECTED_FILE_PATTERNS,
};
/**
 * Standard ignore patterns for glob operations.
 * Files matching these patterns are excluded from file listings.
 */
export const STANDARD_IGNORE_PATTERNS = ["node_modules/**"];
/**
 * File extensions that are considered application code.
 */
export const APPLICATION_CODE_EXTENSIONS = [
    ".ts",
    ".tsx",
    ".js",
    ".jsx",
    ".css",
    ".yaml",
    ".yml",
];
/**
 * Glob patterns for listing application files.
 */
export const APPLICATION_FILE_PATTERNS = [
    "**/*.{ts,tsx,yaml,css}",
    "package.json",
];
/**
 * Default validation options per operation type.
 */
export const DEFAULT_VALIDATION_OPTIONS = {
    read: {
        checkBlacklist: false,
        checkReadBeforeWrite: false,
        allowApiFiles: true,
        allowScopeFiles: true,
        allowPackageJson: true,
        allowDirectPagePath: true,
    },
    write: {
        checkBlacklist: true,
        checkReadBeforeWrite: true,
        allowApiFiles: false,
        allowScopeFiles: false,
        allowPackageJson: false,
        allowDirectPagePath: false,
    },
    delete: {
        checkBlacklist: true,
        checkReadBeforeWrite: false,
        allowApiFiles: true, // API deletion has special handling
        allowScopeFiles: false,
        allowPackageJson: false,
        allowDirectPagePath: true, // Page deletion has special handling
    },
    rename: {
        checkBlacklist: true,
        checkReadBeforeWrite: false,
        allowApiFiles: false,
        allowScopeFiles: false,
        allowPackageJson: false,
        allowDirectPagePath: false,
    },
    list: {
        checkBlacklist: false,
        checkReadBeforeWrite: false,
        allowApiFiles: true,
        allowScopeFiles: true,
        allowPackageJson: true,
        allowDirectPagePath: true,
    },
};
//# sourceMappingURL=constants.js.map