import type { ServiceHost } from "./service-host.js"; export type WindowsServiceSecurityStage = "process" | "ancestor" | "acl-build" | "create" | "exclusive-create" | "inspect" | "verify"; export declare class WindowsServiceSecurityError extends Error { readonly stage: WindowsServiceSecurityStage; constructor(stage: WindowsServiceSecurityStage); } /** * 为首次工作区建立受保护目录。先以最终 ACL 创建随机同级目录,再用 Directory.Move * 排他发布;目标已存在或竞态出现都失败,绝不检查后认领既有目录。 */ export declare function createExclusiveWindowsServiceDirectory(host: ServiceHost, directory: string): string; /** * 在任何 TS 日志或候选工件落盘前建立 SCM 管理事务的 Windows 权威边界。 * ACL 只保留已提升 Administrators 与 LocalSystem;过滤 token 中 deny-only 的管理员组 * 不会命中 Allow ACE,因此同一用户的非提升进程不能改写管理工件。 */ export declare function secureWindowsServiceDirectory(host: ServiceHost, directory: string): string; /** 恢复对账只读复核目录 DACL;绝不借恢复入口重写或收紧现场权限。 */ export declare function inspectWindowsServiceDirectorySecurity(host: ServiceHost, directory: string): string; /** 只读证明服务文件本身的 DACL;目录 ACL 不能替代文件 ACL 身份。 */ export declare function inspectWindowsServiceFileSecurity(host: ServiceHost, file: string): string; /** 仅用于尚未发布、位于已验证私有目录内的安装临时文件。 */ export declare function secureWindowsServiceFile(host: ServiceHost, file: string): string; //# sourceMappingURL=windows-service-security.d.ts.map