chore: initial commit (sources + docs, ignore build artifacts and secrets)

This commit is contained in:
toot
2026-09-16 12:24:49 +08:00
commit 8a6c55d94a
124 changed files with 12168 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Controller
独立的 Wails2 总控程序。运行时由 Go 控制平面与 React/TypeScript 管理界面组成;它不依赖本仓库中的 `multi-claw-dashboard`、`multi-claw-agent`、Python、FastAPI 或旧 MultiClaw 数据。
## 本地启动
```powershell
$wails = Join-Path (go env GOPATH) "bin\wails.exe"
& $wails dev
```
从根目录执行 `build.ps1` 即可构建正式总控。应用数据默认位于当前 Windows 用户配置目录下的 `MultiClawControllerWails`,测试/隔离运行可使用 `MULTICLAW_CONTROLLER_DATA_DIR` 覆盖。
首次启动会在该数据目录生成仅属于本总控的 TLS 证书和 SQLite 数据库,并启动 WSS 配对服务(默认端口 `8443`)。总控界面可生成 10 分钟有效、仅可使用一次的配对码;将显示的 WSS 地址和配对码填入子 Agent 即可完成首次安全配对。
界面中的“概览”页显示当前电脑 IP;配对码只在“安全与配对”页生成,避免把安全操作放在首页。
监听地址与端口由 `config/controller-config.json` 控制。若子 Agent 位于其他机器,请仅在受信任内网中放行该端口,且不要将其映射到公网。
## 编译 Windows 应用
双击 `build.bat`,或在 PowerShell 执行 `./build.ps1`。编译结果为 `build/bin/MultiClawController.exe`;它拥有自己的运行时,不依赖现有 MultiClaw 环境。