@qwen-code/arena-agent 0.0.9-dev.14 → 0.0.9-dev.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/docs/BINARY_DISTRIBUTION.md +19 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,9 @@ npm ci
|
|
|
49
49
|
npm run package:binary
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
其中 `linux-x64` 产物使用 glibc 2.17 兼容的内嵌 Node.js Runtime,目标机器无需
|
|
53
|
+
安装 Node.js;Alpine/musl 系统请使用独立的 `linux-x64-musl` 产物。
|
|
54
|
+
|
|
52
55
|
命令会生成 `build/sea/arena`(Windows 为 `arena.exe`),并打出当前平台包和
|
|
53
56
|
`@qwen-code/arena-cli` 的 npm tarball。二进制必须针对目标操作系统、CPU 架构和
|
|
54
57
|
Linux libc 分别构建;不能把 macOS 上生成的文件直接用于 Linux。
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Arena 可以使用 Node.js Single Executable Applications(SEA)构建为一个包含
|
|
4
4
|
Node.js 运行时、应用代码和静态资源的可执行文件。目标机器不需要安装 Node.js。
|
|
5
5
|
|
|
6
|
-
如果业务机只是受安装权限或 Node.js
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
如果业务机只是受安装权限或 Node.js 版本管理限制,这种方式可以绕过安装步骤。
|
|
7
|
+
Linux x64 glibc 包固定使用 Node.js unofficial-builds 的 glibc 2.17 Runtime,支持
|
|
8
|
+
CentOS 7 / glibc 2.17 及更新的 glibc 系统;低于 glibc 2.17 的系统仍无法运行。
|
|
9
9
|
|
|
10
10
|
## npm 安装(业务机有 Node.js 18)
|
|
11
11
|
|
|
@@ -100,9 +100,10 @@ npm run package:binary
|
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
默认命令构建当前 runner 的系统、CPU 和 libc。CI 还支持在 Linux x64 上按 Node
|
|
103
|
-
SEA
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
SEA 跨平台流程生成三个关键目标:`linux-x64` 固定下载完全相同版本的 Node.js
|
|
104
|
+
unofficial-builds glibc 2.17 Runtime,`linux-x64-musl` 下载 unofficial-builds
|
|
105
|
+
musl Runtime,`darwin-x64` 下载官方 macOS x64 Runtime。三者都通过 Aone 可访问的
|
|
106
|
+
npmmirror 二进制镜像下载,并校验对应的
|
|
106
107
|
`SHASUMS256.txt`,关闭 code cache/snapshot 后注入 SEA blob。
|
|
107
108
|
macOS 产物再使用固定版本和 checksum 的 `rcodesign` 做 ad-hoc 签名。Aone 从仓库的
|
|
108
109
|
`toolchains/apple-codesign-0.29.0` 工具链分支拉取固定 commit,避免构建时依赖 GitHub
|
|
@@ -131,8 +132,9 @@ node scripts/package-binaries.mjs \
|
|
|
131
132
|
```
|
|
132
133
|
|
|
133
134
|
CI 应构建并汇总 `build/npm/packages/<target>`。原生 Runtime 通常应在对应环境中
|
|
134
|
-
构建;禁用 SEA snapshot/code cache 后,`
|
|
135
|
-
Linux x64 Runner 上使用经过校验的目标 Node Runtime
|
|
135
|
+
构建;禁用 SEA snapshot/code cache 后,`linux-x64`、`linux-x64-musl` 和
|
|
136
|
+
`darwin-x64` 都可以在 Linux x64 Runner 上使用经过校验的目标 Node Runtime
|
|
137
|
+
组装。
|
|
136
138
|
|
|
137
139
|
本仓库使用 Aone CI,流水线定义在
|
|
138
140
|
[`/.aoneci/arena-binaries.yaml`](../.aoneci/arena-binaries.yaml)。当前项目没有关联
|
|
@@ -191,26 +193,28 @@ npm run publish:binaries -- \
|
|
|
191
193
|
|
|
192
194
|
## 平台与兼容性
|
|
193
195
|
|
|
194
|
-
SEA
|
|
196
|
+
SEA 产物内含目标平台的 Node.js 可执行文件,因此需要为每种目标分别构建:
|
|
195
197
|
|
|
196
198
|
- macOS arm64 与 x64
|
|
197
199
|
- Linux arm64/x64 的 glibc 与 musl
|
|
198
200
|
- Windows x64
|
|
199
201
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
+
除流水线已覆盖的三个关键 x64 目标外,其他目标应在对应操作系统和 CPU 架构的
|
|
203
|
+
构建机或 CI runner 上执行。
|
|
202
204
|
|
|
203
205
|
“业务机不需要 Node.js 20+”不等于“二进制不受 Node.js 20 的系统要求影响”。
|
|
204
206
|
SEA 把 Node.js 可执行文件放进 Arena,运行时仍由操作系统加载这个内嵌运行时:
|
|
205
207
|
|
|
206
|
-
-
|
|
208
|
+
- 当前 Linux x64 glibc 包的最低要求是 glibc 2.17;
|
|
207
209
|
- musl 包用于 Alpine 等 musl 系统,不能代替 glibc 包;
|
|
208
210
|
- 在较新的 Linux 上打包,不能自动获得对更老 glibc 的兼容性。
|
|
209
211
|
|
|
210
212
|
因此,业务机只有 Node.js 18 通常不是问题;真正需要确认的是它的操作系统、CPU
|
|
211
|
-
架构和 `ldd --version
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
架构和 `ldd --version`。Linux x64 的 glibc 2.17 兼容性来自构建脚本选择的
|
|
214
|
+
`linux-x64-glibc-217` Runtime,而不是构建 runner 的系统版本。如果业务机低于
|
|
215
|
+
glibc 2.17,仍必须使用更老系统兼容的 Runtime 重新制作平台包,或升级业务系统。
|
|
216
|
+
仅仅在“更老的 Docker 镜像”里复制同一个官方 Node.js 二进制并不能降低其 glibc
|
|
217
|
+
下限。
|
|
214
218
|
|
|
215
219
|
单文件只消除了目标机器安装 Node.js 的要求,并不会内嵌所有外部程序:
|
|
216
220
|
|