import { EnvCPConfig } from '../types.js'; export type ConfigScope = 'project' | 'home' | 'merged'; export declare function loadConfig(projectPath: string): Promise; export declare function loadScopedConfig(projectPath: string, scope: ConfigScope): Promise; export declare function saveConfigSignature(projectPath: string, configContent: string, key: string): Promise; export interface ConfigPathOptions { global?: boolean; } export declare function getConfigFilePath(projectPath: string, options?: ConfigPathOptions): string; export declare function saveConfig(config: EnvCPConfig, projectPath: string, options?: ConfigPathOptions): Promise; export declare function saveScopedConfig(config: EnvCPConfig, projectPath: string, scope: Exclude): Promise; export declare function initConfig(projectPath: string, projectName?: string, options?: ConfigPathOptions): Promise; interface McpTarget { name: string; getPath: (projectPath: string, home: string, platform: string) => string; projectLocal: boolean; requireExisting: boolean; detectDir?: string; format: 'mcpServers' | 'servers' | 'context_servers' | 'mcp_key' | 'mcp_servers_array'; } export declare function writeToConfig(config: Record, format: McpTarget['format'], entry: Record): { written: boolean; alreadyExists: boolean; }; export declare function registerMcpConfig(projectPath: string): Promise<{ registered: string[]; alreadyConfigured: string[]; manual: string[]; }>; /** * Parses a `.env` file into a key/value map with strict dotenv semantics. * Handles double-quoted values with backslash escape sequences (`\"`, `\\`). * Single-quoted values are taken literally. Lines starting with `#` are ignored. * Keys that are not valid POSIX identifiers are dropped. * @param content - Raw text content of a `.env` file */ export declare function parseEnvFile(content: string): Record; export declare function validateVariableName(name: string): boolean; export declare function matchesPattern(name: string, pattern: string): boolean; /** * Returns true if the variable `name` is permitted by the access policy. * Evaluated in order: blacklist → denied_patterns → allowed_patterns. * @security This is the primary access-control gate for AI-facing operations. */ export declare function canAccess(name: string, config: EnvCPConfig): boolean; export type VariableAccessOperation = 'read' | 'write' | 'delete' | 'export' | 'execute'; export declare function isVariableRuleActive(name: string, config: EnvCPConfig, now?: Date, clientId?: string): boolean; export declare function getDefaultAccessFlag(config: EnvCPConfig, operation: VariableAccessOperation, clientId?: string): boolean; export declare function resolveAccessRuleFlag(name: string, config: EnvCPConfig, operation: VariableAccessOperation, clientId?: string): boolean; export declare function canAccessVariable(name: string, config: EnvCPConfig, operation: VariableAccessOperation, clientId?: string): boolean; export declare function requiresConfirmationForVariable(name: string, config: EnvCPConfig, clientId?: string): boolean; /** * Returns true if the variable `name` matches any `blacklist_patterns` entry. * Blacklisted variables are always denied regardless of other access rules. */ export declare function isBlacklisted(name: string, config: EnvCPConfig): boolean; export declare function canAIActiveCheck(config: EnvCPConfig, clientId?: string): boolean; export declare function requiresUserReference(config: EnvCPConfig): boolean; export {}; //# sourceMappingURL=manager.d.ts.map