Skip to content

Commit e96d734

Browse files
chore: launcher 改由 Release 发布 + 文档对齐
- workflow 增 Go 构建步骤(mingw-w64 交叉编译 windows exe,-H windowsgui),附 exe 为 release 资产供用户下载双击即用 - 移除仓库内提交的 bin/ 与 launcher/ 编译产物,加入 .gitignore - install.ps1 从 latest release 下载 launcher 到 bin(失败回退 CLI),替代对源码包内二进制的依赖 - skill/SKILL.md 与 docs/去MCP化迁移方案.md: node-log --source 去掉 mcp、补 node-update 命令说明
1 parent a785f3b commit e96d734

7 files changed

Lines changed: 49 additions & 3 deletions

File tree

.github/workflows/agent-node-release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,28 @@ jobs:
3333
with:
3434
python-version: "3.12"
3535

36+
- name: Setup Go
37+
uses: actions/setup-go@v5
38+
with:
39+
go-version-file: launcher/go.mod
40+
cache-dependency-path: launcher/go.sum
41+
3642
- name: Resolve tag version
3743
id: tag
3844
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
3945

46+
# 构建 Go 启动器(release 资产:用户下载双击即用的单体 exe)。
47+
# systray 在 windows 依赖 cgo,故用 mingw-w64 交叉编译,-H windowsgui 去控制台窗口。
48+
# 仓库不再提交二进制(见 .gitignore),exe 仅在发布时构建产出。
49+
- name: Build launcher exe
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y gcc-mingw-w64-x86-64
53+
mkdir -p bin
54+
cd launcher
55+
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc \
56+
go build -trimpath -ldflags "-H windowsgui -s -w" -o ../bin/agent-node-launcher.exe .
57+
4058
# 把 tag 版本写入 node/version.py(纯 Python,无 npm;同版本幂等)
4159
- name: Bump version.py
4260
run: python3 scripts/bump_version.py "${{ steps.tag.outputs.tag }}"
@@ -67,4 +85,5 @@ jobs:
6785
name: "${{ steps.tag.outputs.tag }}"
6886
tag_name: "${{ steps.tag.outputs.tag }}"
6987
generate_release_notes: true
70-
allowUpdates: true
88+
allowUpdates: true
89+
files: bin/agent-node-launcher.exe # 用户下载双击即用的启动器(release 资产)

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ npm-dist/
2727

2828
# 本地工具/项目记忆(WorkBuddy 等),不回传公共仓库
2929
.workbuddy/
30+
31+
# Go 启动器编译产物(由 Release 时构建,不入库)
32+
**/agent-node-launcher.exe

bin/agent-node-launcher.exe

-10.8 MB
Binary file not shown.

docs/去MCP化迁移方案.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ agent-node <子命令> [参数]
480480
| 命令 | 说明 |
481481
|---|---|
482482
| `agent-node comm-log [--peer] [--direction] [--type] [--corr] [--limit 200]` | 通信日志 |
483-
| `agent-node node-log [--source node\|mcp\|executor\|syncthing] [--lines 200] [--level]` | 节点运行日志 |
483+
| `agent-node node-log [--source node\|executor\|syncthing] [--lines 200] [--level]` | 节点运行日志 |
484484

485485
### 插件
486486
| 命令 | 说明 |
@@ -492,6 +492,7 @@ agent-node <子命令> [参数]
492492
| 命令 | 说明 |
493493
|---|---|
494494
| `agent-node shell --to <node_id> --cmd "command" [--timeout 60]` | 远程命令(受目标 allow_shell) |
495+
| `agent-node node-update --node <node_id> [--timeout 300]` | 远程更新目标节点的代码 |
495496
| `agent-node diag` | 一键健康自检 |
496497
| `agent-node register` | 生成/读取 caller_id 身份(首次) |
497498

launcher/agent-node-launcher.exe

-7.35 MB
Binary file not shown.

scripts/install.ps1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ $PIP_MIRRORS = @(
3838
"https://pypi.org/simple",
3939
"https://pypi.tuna.tsinghua.edu.cn/simple"
4040
)
41+
# Go 启动器 release 资产(仓库不提交二进制,见 .gitignore):从最新 release 下载双击即用的 exe。
42+
# releases/latest/download 始终指向最新 tag 的资产;镜像兜底与源码同理。
43+
$LAUNCHER_MIRRORS = @(
44+
"https://github.com/weifeng-work/agent-node/releases/latest/download/agent-node-launcher.exe",
45+
"https://ghproxy.cn/https://github.com/weifeng-work/agent-node/releases/latest/download/agent-node-launcher.exe",
46+
"https://ghproxy.net/https://github.com/weifeng-work/agent-node/releases/latest/download/agent-node-launcher.exe",
47+
"https://ghfast.top/https://github.com/weifeng-work/agent-node/releases/latest/download/agent-node-launcher.exe",
48+
"https://gh-proxy.com/https://github.com/weifeng-work/agent-node/releases/latest/download/agent-node-launcher.exe"
49+
)
4150

4251
Add-Type -AssemblyName System.IO.Compression.FileSystem
4352

@@ -159,6 +168,19 @@ try {
159168
Get-ChildItem -Path $APP -Force | ForEach-Object { Remove-Item $_.FullName -Recurse -Force -ErrorAction SilentlyContinue }
160169
Get-ChildItem -Path $sub.FullName -Force | Copy-Item -Destination $APP -Recurse -Force
161170

171+
# launcher exe 为 Release 资产(仓库不提交二进制),从最新 release 下载到 bin,
172+
# 供快捷方式/启动接管(6/8 与 8/8)使用。下载失败仅告警,回退 CLI 入口。
173+
$launcher = Join-Path $APP "bin\agent-node-launcher.exe"
174+
try {
175+
New-Item -ItemType Directory -Force -Path (Join-Path $APP "bin") | Out-Null
176+
$lu = Select-Source $LAUNCHER_MIRRORS
177+
Write-Host (" 下载 launcher: " + $lu)
178+
Download-File $lu $launcher
179+
Write-Host " launcher 就绪" -ForegroundColor Green
180+
} catch {
181+
Write-Host (" launcher 下载失败(" + $_.Exception.Message + "),将回退命令行入口") -ForegroundColor Yellow
182+
}
183+
162184
# ---------- 3/8 venv ----------
163185
Step 3 "创建/更新 Python 虚拟环境并安装依赖"
164186
$req = Join-Path $APP "requirements.txt"

skill/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ agent-node <子命令> [参数]
127127
| 命令 | 说明 |
128128
|---|---|
129129
| `agent-node comm-log [--peer] [--direction] [--type] [--corr] [--limit 200]` | 通信日志 |
130-
| `agent-node node-log [--source node\|mcp\|executor\|syncthing] [--lines 200] [--level]` | 节点运行日志 |
130+
| `agent-node node-log [--source node\|executor\|syncthing] [--lines 200] [--level]` | 节点运行日志 |
131131

132132
### 插件
133133
| 命令 | 说明 |
@@ -139,6 +139,7 @@ agent-node <子命令> [参数]
139139
| 命令 | 说明 |
140140
|---|---|
141141
| `agent-node shell --to <node_id> --cmd "command" [--timeout 60]` | 远程命令(受目标 allow_shell) |
142+
| `agent-node node-update --node <node_id> [--timeout 300]` | 远程更新目标节点的代码 |
142143
| `agent-node diag` | 一键健康自检 |
143144
| `agent-node register` | 生成/读取 caller_id 身份(首次) |
144145

0 commit comments

Comments
 (0)