export declare const REDACTED = "[REDACTED]"; export declare const RUNTIME_FAILURE_TAIL_LIMIT: number; /** key 命中即整值脱敏(深度脱敏用)。 */ export declare const SECRET_KEY_RE: RegExp; /** Replace exact injected credentials and common encodings before persistence. */ export declare function redactInjectedCredentials(text: string, additionalSecrets?: readonly string[]): string; /** Refuse raw workspace bytes that contain an injected credential or common encoding. */ export declare function assertNoInjectedCredentials(data: Buffer, additionalSecrets?: readonly string[]): void; export declare function redactSecretString(text: string, additionalSecrets?: readonly string[]): string; /** * 深度脱敏:对象 key 命中 SECRET_KEY_RE → 整值替换;字符串走 redactSecretString; * 递归数组/对象。超过 depth 的容器整体替换为 REDACTED(宁可截断不可泄露)。 */ export declare function redactSecretsDeep(value: unknown, depth?: number, additionalSecrets?: readonly string[]): unknown; /** runtime 失败文本脱敏 + 尾部截断(stderr/stdout tail、错误信息)。 */ export declare function sanitizeRuntimeFailureText(value: string, limit?: number): string; export declare function tailText(value: string, limit: number): string; /** argv 脱敏:逐段 sanitize(512 上限),secret-value flag 的下一个参数整体替换。 */ export declare function safeCommand(argv: string[]): string[]; export declare function errorInfo(err: unknown): { error_name?: string; error_message: string; }; export declare function truncateText(value: string, maxChars: number): string;