/** * Module Instrumentation - 모듈 자동 계측 * * Node.js의 Module 시스템을 훅킹하여 사용자 모듈의 함수들을 * 자동으로 래핑합니다. */ import { FunctionLogEntry } from './wrapper'; import { ContextManager } from './context/context'; import { SanitizerOptions } from './masking/sanitizer'; import { FunctionMaskingOverride } from './masking/rule-builder'; /** * Instrumentation 옵션 */ export interface InstrumentationOptions { /** 로그 콜백 */ onLog: (entry: FunctionLogEntry) => void; /** Context Manager (옵션) */ contextManager?: ContextManager; /** 포함할 경로 패턴 (정규식 배열) */ include?: RegExp[]; /** 제외할 경로 패턴 (정규식 배열) */ exclude?: RegExp[]; /** 제외할 함수 이름 패턴 (정규식 배열) */ excludeFunctions?: RegExp[]; /** 중첩 객체의 함수도 래핑할지 여부 */ wrapNestedObjects?: boolean; /** Sanitizer 옵션 */ sanitizerOptions?: SanitizerOptions; /** 파라미터 기반 자동 마스킹 활성화 (기본값: true) */ enableAutoMasking?: boolean; /** 추가 민감 키워드 */ sensitiveKeywords?: string[]; /** 함수별 마스킹 Override 설정 */ maskingOverrides?: FunctionMaskingOverride[]; /** getter/setter 래핑 여부 (기본값: true) */ wrapGettersSetters?: boolean; } /** * 사용자 모듈인지 확인합니다. */ export declare function isUserModule(modulePath: string): boolean; /** * 모듈을 계측해야 하는지 확인합니다. */ export declare function shouldInstrument(modulePath: string, options: InstrumentationOptions): boolean; /** * 모듈의 exports를 래핑합니다. */ export declare function wrapExports(exports: Record, modulePath: string, options: InstrumentationOptions, prefix?: string): Record; export declare function startInstrumentation(options: InstrumentationOptions): void; /** * 모듈 계측을 중지합니다. */ export declare function stopInstrumentation(): void; /** * 계측이 활성화되어 있는지 확인합니다. */ export declare function isInstrumentationActive(): boolean;