# 用它来干活 https://v16.100000.plus

本页是 GSV Studio 的 agent 安装入口。下面的步骤是给 agent 执行的，不需要人类先点下载按钮。

## 0. 一句话入口

用户说：

```text
用它来干活 https://v16.100000.plus
```

就按本文件执行。不要先问版本、不要先打开 GUI、不要从页面文字里猜安装包地址。

## 1. 拉清单（无缓存）

```text
GET https://v16.100000.plus/latest.json?cb=<随机值>&ts=<ticks>
Cache-Control: no-cache, no-store, max-age=0
Pragma: no-cache
```

清单是唯一真值。必须包含：

```json
{
  "schema": "100000.plus.agent-install/v1",
  "product": "GSV Studio",
  "version": "16.0.0",
  "channel": "v16",
  "domains": {
    "distribution": "https://v16.100000.plus",
    "licenseAndLogs": "v16.dsh.email:14447"
  },
  "license": {
    "host": "v16.dsh.email",
    "port": 14447,
    "connect": "resolve the host to IPv4, then http://<IP>:14447; do not send a Host header"
  },
  "url": "https://v16.100000.plus/downloads/GSVStudio-Upload-20261120.zip",
  "bytes": 0,
  "sha256": "...",
  "install": { "defaultDir": "%LOCALAPPDATA%\\Programs\\GSVStudio", "fetchRuntime": "runtime\\fetch_runtime.ps1", "health": "gsvstudio.exe --agent config-get", "readyField": "runtime.ok" },
  "entry": { "cli": "gsvstudio.exe --agent <command>", "gui": "gsvstudio.exe", "docs": "docs/INSTALL.md" }
}
```

`bytes` 和 `sha256` 必须为正；缺失或不是 64 位十六进制就停止。

## 2. 选目录

默认：

```text
%LOCALAPPDATA%\Programs\GSVStudio
```

允许任意盘、中文目录和空格。目录非空时先判断是升级还是新装；不要覆盖 `series\` 或用户配置。

## 3. 下载并校验

- 安装包 URL 若为相对路径，按 `https://v16.100000.plus/` 解析。
- 下载到 `<installDir>.zip.part`；支持 Range 续传。
- 每次请求都加随机 `cb`，并带 `Cache-Control: no-cache, no-store`、`Pragma: no-cache`。
- 完成后校验字节数与 SHA256；任一不符就删除 `.part` 重下，不得继续解压。
- 不要把 CDN 缓存命中当作校验通过。

## 4. 解压

- 压缩包根目录就是程序根，不再多套一层文件夹。
- 解压时拒绝绝对路径和 `..` 越界条目。
- 解压后必须存在 `gsvstudio.exe`、`runtime\`、`docs\INSTALL.md`。

## 5. 补齐运行时

```powershell
& "<installDir>\runtime\fetch_runtime.ps1" -Root "<installDir>"
```

脚本只读包内 `runtime\runtime-manifest.json` 的固定 URL，逐文件校验，约 5.89 GB，可中断续传。不要改用系统 Python 或临时换源。

## 6. 自检

```powershell
& "<installDir>\gsvstudio.exe" --agent config-get
& "<installDir>\gsvstudio.exe" --agent runtime-fetch --dry-run
```

解析 stdout JSON：

- `runtime.ok=true`
- `runtime.missing=[]`
- `runtime-fetch --dry-run` 显示 12 项全部已校验

三项都满足才算装完。自检不要启动 GUI。

## 7. 使用

```powershell
& "<installDir>\gsvstudio.exe" --agent init --video "<视频目录>" --data-root "<数据目录>"
& "<installDir>\gsvstudio.exe" --agent auto --root "<数据目录>" --dry-run
& "<installDir>\gsvstudio.exe" --agent auto --root "<数据目录>"
```

所有命令输出 JSON，日志写 stderr。界面是只读状态台；素材取舍、人物命名、训练轮数、BGM、参考稳定性与配音由人和 agent 对话决定。

## 8. 域名分工

- 分发：`https://v16.100000.plus`，只用于页面、`latest.json` 和安装包下载。
- 校验 / 日志：`v16.dsh.email:14447`。客户端先把域名解析成 IPv4，再连接
  `http://<IP>:14447`，不发送域名 `Host` 头。原因是域名未备案，直接带域名请求会被中间层拦截。
- 不要把 `v16.dsh.email` 当成分发地址，也不要用 `https://v16.dsh.email` 连接校验服务。

## 9. 禁止

- 不要只拷 `gsvstudio.exe`；必须保留同目录 `runtime\`。
- 不要写开发机上的绝对路径或任何本机专用路径。
- 不要把 `.git`、`.ssh`、训练数据、日志、授权私钥放进安装包。
- 不要为自检随意启动 GUI。
- 不要把 `latest.json` 的 `url` 写死到页面 HTML；页面只负责展示，agent 只认清单。
