export declare const DOWNLOAD_HOSTS: readonly ["github.com", "objects.githubusercontent.com", "api.github.com"]; export declare function assertAllowedDownloadUrl(url: string): void; export declare function assertStableVersionTag(tag: string): void; /** * 平台资产名映射,返回带 `{v}` 占位符的模板(如 Godot_v{v}-stable_win64.exe.zip), * 由 buildReleaseUrls / installGodot 以具体版本填充——与官方 releases 资产命名一致。 */ export declare function platformAssetName(platform: NodeJS.Platform, arch: string): string; export declare function buildReleaseUrls(tag: string, assetTemplate: string): { binaryUrl: string; sumsUrl: string; }; /** 解析官方 SHA512-SUMS.txt(`␣␣` 双空格格式),返回小写 hex。 */ export declare function parseSha512Sums(sumsText: string, filename: string): string; /** 流式 SHA512(大文件不整读内存)。 */ export declare function sha512File(filePath: string): Promise; /** * 解析要安装的版本 tag:GODOT_MCP_INSTALL_TAG(测试/复现 pin,不联网)> GitHub API latest。 */ export declare function fetchLatestStableTag(): Promise; /** 流式下载到 destPath;onProgress 收到累计字节数。 */ export declare function downloadWithProgress(url: string, destPath: string, onProgress?: (bytes: number) => void): Promise; /** SHA512 校验;不匹配即删文件(不留半成品)并抛错。 */ export declare function verifyDownloadedAsset(filePath: string, expectedSha512: string): Promise; /** 解压 zip(自写零依赖 reader,见 zip-extract.ts——系统 tar 方案已废弃:Linux GNU tar 无 zip 支持 + Windows GNU tar 绝对路径 host:path 坑)。 */ import { extractZip } from './zip-extract.js'; export { extractZip }; /** 在解压目录定位 Godot 可执行文件(win: Godot_v*.exe;mac: Godot.app;linux: 无扩展名二进制)。 */ export declare function findExtractedBinary(dir: string): string; export interface InstallResult { godotPath: string; versionTag: string; } /** * 安装编排:tag 解析 → URL 构造 → 用户确认(CLI 交互,非 MCP 链路)→ * 下载 SUMS + 二进制 → SHA512 同源校验(失败即删)→ tar 解压 → 删 zip → * 登记 godot-paths.json(搜索链 + 白名单)→ 机器级审计(成功/失败都记)。 */ export declare function installGodot(opts: { versionTag?: string; confirm: () => Promise; onProgress?: (msg: string) => void; }): Promise; /** install 子命令:可选版本 tag 参数(默认 latest stable),交互确认后安装。 */ export declare function runInstall(args: string[]): Promise;