/** * Host Scanner * * Scans the host system for environment variables, secrets, and skills * from multiple sources: application config, process.env, and shell profiles. * * IMPORTANT: This module is strictly READ-ONLY. It never writes to any file * or modifies any source data. All operations use fs.readFileSync/existsSync only. */ import type { ScannedSkill, ScannedEnvVar, MigrationScanResult } from '@agenshield/ipc'; /** * Read openclaw.json (or similar app config) and extract skills + env vars. * Returns skills and associated env vars. Never modifies the file. */ export declare function scanOpenClawConfig(configJsonPath: string): { skills: ScannedSkill[]; envVars: ScannedEnvVar[]; warnings: string[]; }; /** * Scan process.env for env vars that look like secrets. */ export declare function scanProcessEnv(): ScannedEnvVar[]; /** * Scan shell profiles for exported environment variables. */ export declare function scanShellProfiles(home: string): { envVars: ScannedEnvVar[]; scannedProfiles: string[]; warnings: string[]; }; /** * Mask a secret value for display. Shows first 3 and last 4 chars for long values. */ export declare function maskSecretValue(value: string): string; /** * Resolve the actual (unmasked) value of an env var from its original source. * Called at migration time when the user has confirmed which secrets to import. */ export declare function resolveEnvVarValue(name: string, source: ScannedEnvVar['source'], profilePath?: string, configJsonPath?: string): string | null; export interface ScanHostOptions { /** Path to the application config file (e.g. ~/.openclaw/openclaw.json) */ configPath?: string; /** Home directory to scan for shell profiles (defaults to current user home) */ home?: string; } /** * Scan the host for skills and environment variables from all sources. * Deduplicates env vars, preferring more specific sources: * app-config > shell-profile > process-env */ export declare function scanHost(options?: ScanHostOptions): MigrationScanResult; //# sourceMappingURL=host-scanner.d.ts.map