@sokeai/cli 1.0.120 → 1.0.122
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 +1 -1
- package/docs/harmonyos.md +52 -33
- package/docs/windows-signing.md +39 -0
- package/package.json +7 -1
- package/scripts/install.js +0 -4
- package/scripts/run.js +3 -1
- package/scripts/runtime-errors.js +23 -0
- package/scripts/runtime-platform.js +1 -1
- package/skills/ma-probe/README.md +10 -0
- package/skills/ma-probe/SKILL.md +14 -0
- package/skills/ma-probe/run.sh +11 -0
- package/third_party/dingtalk-openharmony/LICENSE +178 -0
- package/third_party/dingtalk-openharmony/NOTICE +15 -0
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
npm install -g @sokeai/cli@latest
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
鸿蒙电脑版 ARM64 采用专用 Go 工具链、静态 ELF 和 OpenHarmony 自签名,仍需设备验收;构建和安装见 [鸿蒙适配说明](docs/harmonyos.md)。不能使用普通 Linux ARM64 包替代。Windows 企业设备的签名与放行说明见 [Windows 代码签名](docs/windows-signing.md)。
|
|
54
54
|
|
|
55
55
|
### 方式二:通过源码编译安装 (需要 Go 环境)
|
|
56
56
|
```bash
|
package/docs/harmonyos.md
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 鸿蒙电脑版 ARM64 CLI
|
|
2
2
|
|
|
3
|
-
从 `1.0.
|
|
3
|
+
从 `1.0.121` 起采用钉钉 DWS 的实践:`openharmony/arm64` 纯 Go 静态 ELF → OpenHarmony 自签名 → 完整性复验 → 生成校验和及专用安装包。仍属于实验性支持:本仓库尚无鸿蒙电脑实机验收结果,构建和签名成功不能代替设备验证。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
已发布的 `1.0.118`—`1.0.120` 使用旧的动态 PIE 构建,不包含本次静态自签名改进。请勿用旧 CDN 文件验证本次改动,也不要覆盖同版本已发布文件;应以新版本分发。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 构建与打包
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- DevEco Studio Native SDK `6.0.2.130`,API 22。
|
|
9
|
+
标准 Go 没有 `openharmony` 目标,需要专用 Go 工具链;当前纯 Go 构建不再需要 Native SDK。本次验证环境为 [sysit/ohos-go](https://github.com/sysit/ohos-go) `release-branch.go1.26`,固定提交 `19667c7abfc332f848b5bd1f293e4aeb0e9991a9`,版本 `go1.26.5`。这是社区工具链,构建环境应固定提交,不自动更新。
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
工具链可在独立目录构建(需要宿主 Go 和 C 编译器):
|
|
13
12
|
|
|
14
13
|
```bash
|
|
15
14
|
git clone https://github.com/sysit/ohos-go.git /path/to/ohos-go
|
|
@@ -18,50 +17,70 @@ cd /path/to/ohos-go/src
|
|
|
18
17
|
GOROOT_BOOTSTRAP=/path/to/host-go GOTOOLCHAIN=local bash make.bash
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
回到本仓库执行:
|
|
22
21
|
|
|
23
22
|
```bash
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
# 构建静态 ELF、签名并复验
|
|
24
|
+
HARMONY_GO=/path/to/ohos-go/bin/go npm run build:harmony
|
|
25
|
+
|
|
26
|
+
# 额外生成包含说明和第三方许可的独立安装包
|
|
27
|
+
HARMONY_GO=/path/to/ohos-go/bin/go npm run package:harmony
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
默认产物位于 `bin/`:
|
|
31
|
+
|
|
32
|
+
- `soke-cli-openharmony-arm64`:签名后的原始二进制,供 npm 安装器下载。
|
|
33
|
+
- `soke-cli-openharmony-arm64.sha256`:签名后文件的 SHA-256。
|
|
34
|
+
- `soke-cli-openharmony-arm64.tar.gz` 及同名 `.sha256`:独立安装包,无需 Node.js。
|
|
35
|
+
|
|
36
|
+
`HARMONY_OUTPUT` 可覆盖原始文件输出位置。构建注入当前包版本及 `app.pro.yaml`,采用 `CGO_ENABLED=0`、`-buildmode=exe`、`-d -s -w`。发布只接受小端 AArch64 `ET_EXEC`,拒绝 `PT_INTERP`、`PT_DYNAMIC`、动态链接节,以及 Go 元数据不匹配的产物。签名和复验失败不会替换已有二进制。
|
|
37
|
+
|
|
38
|
+
## 自签名边界
|
|
30
39
|
|
|
31
|
-
|
|
40
|
+
ELF 重写及 fs-verity 自签名格式基于 DWS 固定提交 `df0fb53b5dcc8de64d49cfe0cce900eef4bc1d15`,出处、改动与 Apache-2.0 许可见 `third_party/dingtalk-openharmony/`。签名工具仅在构建机运行,不增加客户 CLI 的运行依赖。
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
`.codesign` 为 4096 字节对齐节,包含 fs-verity SHA-256 Merkle 根及描述符摘要,使用 DWS 的 `selfSign` 格式。校验器重新计算文件完整性,并检测内容、描述符或签名填充被修改。这不是 CA 发布者身份证明,也不是 Windows Authenticode;设备仍可按自己的代码签名、文件标签、安装路径或沙箱规则拒绝执行。
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
可以独立复验下载的原始文件:
|
|
36
45
|
|
|
37
46
|
```bash
|
|
38
|
-
|
|
39
|
-
./soke-cli-openharmony-arm64 --version
|
|
40
|
-
./soke-cli-openharmony-arm64 --help
|
|
47
|
+
go run ./cmd/harmony-sign verify --input /path/to/soke-cli-openharmony-arm64
|
|
41
48
|
```
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
## 安装与客户复测
|
|
44
51
|
|
|
45
|
-
|
|
52
|
+
从 [1.0.121 发布目录](https://soke-frontendstatic-cdn.soke.cn/soke-cli/releases/v1.0.121/soke-cli-openharmony-arm64.tar.gz)下载独立安装包,以及同目录 [checksums.txt](https://soke-frontendstatic-cdn.soke.cn/soke-cli/releases/v1.0.121/checksums.txt),先验证 SHA-256。原始二进制位于同目录 `soke-cli-openharmony-arm64`。后续版本的 CDN 目录格式为:
|
|
46
53
|
|
|
47
|
-
|
|
54
|
+
```text
|
|
55
|
+
https://soke-frontendstatic-cdn.soke.cn/soke-cli/releases/v<新版本>/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
独立安装包解压得到 `soke-cli`、`README.md`、`LICENSE-DWS` 和 `NOTICE-DWS`。在终端允许安装与执行程序的目录中运行:
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
```bash
|
|
61
|
+
chmod +x ./soke-cli
|
|
62
|
+
./soke-cli --version
|
|
63
|
+
./soke-cli --help
|
|
64
|
+
./soke-cli doctor --offline
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
已安装鸿蒙 Node/npm 时,也可安装对应新版本 `@sokeai/cli`。安装器识别鸿蒙平台名;当 Node 报告 `linux` 时,也支持通过 `OpenHarmony`、`HarmonyOS`、`HongMeng` 系统名识别,无需依赖动态加载器文件存在。任何下载源(包括 GitHub 回退)都必须通过 SHA-256 校验。npm 安装完成只表明下载成功,不代表系统批准执行。
|
|
68
|
+
|
|
69
|
+
若仍报 `Permission denied`:保留系统版本、终端名称、安装路径、完整错误及安全日志,由设备管理员核对执行和签名规则;`chmod` 只设置执行位,无法改变系统信任规则。普通 Linux ARM64 不应替代鸿蒙包。
|
|
70
|
+
|
|
71
|
+
## 真机验收
|
|
53
72
|
|
|
54
|
-
|
|
73
|
+
1. 确认 `--version`、`--help` 正常退出,检查 `doctor --offline` 输出;未配置或未登录时可报告相应检查失败。
|
|
74
|
+
2. 执行 `auth login`,在同一台鸿蒙电脑浏览器中手动打开授权链接,验证本机回调及 `auth status`。
|
|
75
|
+
3. 重启 CLI,验证凭证保存、读取与退出清理。鸿蒙沿用加密文件存储,不依赖 macOS 钥匙串或桌面 D-Bus。
|
|
76
|
+
4. 调用有权限的只读业务接口,验证 DNS、HTTPS 证书及 JSON 输出。
|
|
55
77
|
|
|
56
|
-
|
|
78
|
+
浏览器自动唤起仍需手动操作。若证书目录未被工具链识别,可使用 `SSL_CERT_DIR` 或 `SSL_CERT_FILE` 指向可信 PEM 证书;保持 TLS 校验开启。使用 npm 时还需记录 `process.platform`、`process.arch`。
|
|
57
79
|
|
|
58
|
-
##
|
|
80
|
+
## 发布
|
|
59
81
|
|
|
60
82
|
```bash
|
|
61
|
-
BUILD_HARMONY=true
|
|
62
|
-
HARMONY_GO=/path/to/ohos-go/bin/go \
|
|
63
|
-
OHOS_NATIVE_SDK=/path/to/sdk/openharmony/native \
|
|
64
|
-
npm run release
|
|
83
|
+
BUILD_HARMONY=true HARMONY_GO=/path/to/ohos-go/bin/go npm run release
|
|
65
84
|
```
|
|
66
85
|
|
|
67
|
-
|
|
86
|
+
该选项启用静态构建、签名、专用包、发布前复验,再生成统一 `checksums.txt`、上传 OSS 并预热 CDN。未设置时仍只发布原有四个平台。鸿蒙真机验收完成前,保持实验性支持标记。
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Windows Authenticode 与企业设备执行
|
|
2
|
+
|
|
3
|
+
npm 启动器最终会运行 Go 编译的 `soke-cli.exe`,受 WDAC/AppLocker 等策略约束。企业设备上的 CodeIntegrity 3077 等阻止事件,需要管理员核对签名、发布者及允许规则;通过 npm 分发不会免除这些检查。
|
|
4
|
+
|
|
5
|
+
## 签名机配置
|
|
6
|
+
|
|
7
|
+
需要 Windows 签名机、PowerShell 7(`pwsh`)、Windows SDK SignTool,以及证书存储区中可用的代码签名证书及私钥。私钥可由硬件令牌或相应密钥提供程序管理。此实现使用当前用户证书存储区中的 SHA-1 指纹选择证书,实际文件和时间戳使用 SHA-256。不在仓库保存 PFX、私钥或密码。
|
|
8
|
+
|
|
9
|
+
独立签名或验证:
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
./scripts/sign-windows.ps1 `
|
|
13
|
+
-Path ./bin/soke-cli-windows-amd64.exe `
|
|
14
|
+
-CertificateThumbprint '<证书的40位SHA-1指纹>' `
|
|
15
|
+
-SignTool 'C:\Program Files (x86)\Windows Kits\10\bin\<SDK版本>\x64\signtool.exe'
|
|
16
|
+
|
|
17
|
+
./scripts/sign-windows.ps1 -VerifyOnly `
|
|
18
|
+
-Path ./bin/soke-cli-windows-amd64.exe `
|
|
19
|
+
-CertificateThumbprint '<证书的40位SHA-1指纹>'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
脚本调用 `sign /fd SHA256 /tr <RFC3161地址> /td SHA256`,再执行 `verify /pa /all /tw`,并确认 Authenticode 状态有效、签名证书指纹正确且具有时间戳证书。默认时间戳服务为 `http://timestamp.digicert.com`,可用 `-TimestampUrl` 覆盖。
|
|
23
|
+
|
|
24
|
+
## 接入构建与发布
|
|
25
|
+
|
|
26
|
+
在配置好工具的 Windows Git Bash 环境中执行:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
SIGN_WINDOWS=true \
|
|
30
|
+
WINDOWS_SIGN_CERT_SHA1='<证书指纹>' \
|
|
31
|
+
WINDOWS_SIGN_TOOL='C:/Program Files (x86)/Windows Kits/10/bin/<SDK版本>/x64/signtool.exe' \
|
|
32
|
+
npm run build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
发布时同样传入这些变量,鸿蒙需要额外配置 `BUILD_HARMONY` 与 `HARMONY_GO`。可用 `WINDOWS_TIMESTAMP_URL` 覆盖时间戳服务。
|
|
36
|
+
|
|
37
|
+
顺序为:编译 → 签名及时间戳 → 验证 → 发布前再次验证 → SHA-256 → 上传。启用 `SIGN_WINDOWS=true` 后,缺证书、缺工具或签名验证失败都会中止流程。未启用时仍生成未签名 Windows 文件,不能宣称已解决企业拦截。
|
|
38
|
+
|
|
39
|
+
当前开发环境没有 Windows 签名机及代码签名证书;此流程尚未完成真实证书签名验收。取得证书后,需要在 Windows 签名机和客户策略环境中验证。可信签名不自动等于企业放行,仍需由客户管理员确认其允许规则;鸿蒙自签名不能替代此流程。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sokeai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.122",
|
|
4
4
|
"description": "授客AI官方CLI工具 - 支持AI Agent Skills",
|
|
5
5
|
"bin": {
|
|
6
6
|
"soke-cli": "scripts/run.js"
|
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
"postinstall": "node scripts/install.js",
|
|
10
10
|
"build": "./scripts/build-binaries.sh",
|
|
11
11
|
"build:harmony": "bash ./scripts/build-harmony.sh",
|
|
12
|
+
"package:harmony": "bash ./scripts/package-harmony.sh",
|
|
13
|
+
"test:distribution": "node scripts/test-runtime-platform.js && node scripts/test-harmony-install.js && node scripts/test-runtime-errors.js && node scripts/test-install-portal-skill.js",
|
|
12
14
|
"release": "./scripts/release.sh"
|
|
13
15
|
},
|
|
14
16
|
"files": [
|
|
15
17
|
"scripts/install.js",
|
|
16
18
|
"scripts/run.js",
|
|
17
19
|
"scripts/runtime-platform.js",
|
|
20
|
+
"scripts/runtime-errors.js",
|
|
18
21
|
"docs/harmonyos.md",
|
|
22
|
+
"docs/windows-signing.md",
|
|
23
|
+
"third_party/dingtalk-openharmony/LICENSE",
|
|
24
|
+
"third_party/dingtalk-openharmony/NOTICE",
|
|
19
25
|
"skills/"
|
|
20
26
|
],
|
|
21
27
|
"homepage": "https://github.com/sokeai/soke-cli#readme",
|
package/scripts/install.js
CHANGED
|
@@ -602,10 +602,6 @@ async function verifyChecksum(source, filePath) {
|
|
|
602
602
|
try {
|
|
603
603
|
checksumsText = await downloadText(source.checksumURL);
|
|
604
604
|
} catch (err) {
|
|
605
|
-
if (source.name === 'GitHub Releases') {
|
|
606
|
-
console.warn(`警告: 无法下载校验文件,跳过校验: ${err.message}`);
|
|
607
|
-
return;
|
|
608
|
-
}
|
|
609
605
|
throw new Error(`无法下载校验文件: ${err.message}`);
|
|
610
606
|
}
|
|
611
607
|
|
package/scripts/run.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const { spawn, execSync } = require('child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fs = require('fs');
|
|
6
|
+
const { describeLaunchError } = require('./runtime-errors');
|
|
6
7
|
|
|
7
8
|
// Legacy compatibility command. Connector installations do not invoke this
|
|
8
9
|
// command; WorkBuddy manages PATH and GUI integration itself.
|
|
@@ -115,6 +116,7 @@ try {
|
|
|
115
116
|
fs.chmodSync(binaryPath, 0o755);
|
|
116
117
|
} catch (chmodErr) {
|
|
117
118
|
console.error('错误: 无法设置二进制文件执行权限');
|
|
119
|
+
console.error(describeLaunchError(chmodErr, binaryPath));
|
|
118
120
|
process.exit(1);
|
|
119
121
|
}
|
|
120
122
|
}
|
|
@@ -137,6 +139,6 @@ child.on('exit', (code, signal) => {
|
|
|
137
139
|
|
|
138
140
|
// 处理错误
|
|
139
141
|
child.on('error', (err) => {
|
|
140
|
-
console.error(
|
|
142
|
+
console.error(describeLaunchError(err, binaryPath));
|
|
141
143
|
process.exit(1);
|
|
142
144
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const { resolveRuntimePlatform } = require('./runtime-platform');
|
|
3
|
+
|
|
4
|
+
// 启动失败只能给出排查方向,不能仅凭 errno 认定被某一安全策略拦截。
|
|
5
|
+
function describeLaunchError(error, binaryPath) {
|
|
6
|
+
const lines = [
|
|
7
|
+
`执行 soke-cli 时出错: ${error.message}`,
|
|
8
|
+
`错误代码: ${error.code || '未知'};系统: ${os.platform()}-${os.arch()} (${os.type()})`,
|
|
9
|
+
`二进制文件: ${binaryPath}`
|
|
10
|
+
];
|
|
11
|
+
let target;
|
|
12
|
+
try { target = resolveRuntimePlatform().platform; } catch (_) {}
|
|
13
|
+
if (os.platform() === 'win32' && ['EACCES', 'EPERM', 'UNKNOWN'].includes(error.code)) {
|
|
14
|
+
lines.push('可能与企业 WDAC/AppLocker、杀毒软件或文件权限有关。请由管理员检查 CodeIntegrity/AppLocker 事件及此文件的数字签名,并按企业规则放行。');
|
|
15
|
+
lines.push('npm 安装成功不代表原生 EXE 获准执行;Authenticode 签名也必须符合企业信任规则。');
|
|
16
|
+
} else if (target === 'openharmony' && ['EACCES', 'EPERM', 'ENOEXEC', 'ENOENT'].includes(error.code)) {
|
|
17
|
+
lines.push('请确认使用本版本的鸿蒙 ARM64 静态自签名产物,并检查终端允许的安装目录、代码签名和沙箱执行规则。');
|
|
18
|
+
lines.push('chmod 只能设置执行位,不能授予系统签名或沙箱权限;请保留系统版本、终端名称和完整错误供排查。');
|
|
19
|
+
}
|
|
20
|
+
return lines.join('\n');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = { describeLaunchError };
|
|
@@ -5,7 +5,7 @@ const os = require('os');
|
|
|
5
5
|
function resolveRuntimePlatform(platform = os.platform(), arch = os.arch(), system = os.type()) {
|
|
6
6
|
let target = platform;
|
|
7
7
|
if (['openharmony', 'ohos', 'harmonyos'].includes(platform) ||
|
|
8
|
-
(platform === 'linux' && (/^(openharmony|harmonyos)
|
|
8
|
+
(platform === 'linux' && (/^(openharmony|harmonyos|hongmeng)(?:[ _-]kernel)?$/i.test(system) ||
|
|
9
9
|
fs.existsSync('/system/lib/ld-musl-aarch64.so.1')))) {
|
|
10
10
|
target = 'openharmony';
|
|
11
11
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Soke MA credential probe package
|
|
2
|
+
|
|
3
|
+
This package is for a controlled MA session test. It contains Linux `soke-ma` binaries and one read-only Skill. It is not the full business Skill release.
|
|
4
|
+
|
|
5
|
+
1. Upload the ZIP as a workspace Skill and bind it to the test Agent. Enable the Agent's bash tool, save a new Agent version, then create a new Session bound to one test Vault ID.
|
|
6
|
+
2. Configure the Vault HTTP credential target for `https://opendev.soke.cn` and allow GET. The preproduction OpenDev instance must have `QWENWORK_MA_ENABLED=true` and an exact `GET /skills/exam/list` entry in `QWENWORK_MA_ALLOWED_ROUTES_JSON` after that route's permission review.
|
|
7
|
+
3. Ask the Agent to use `soke-ma-probe` to query one exam. Repeat in a separate new Session bound to the second user's Vault. Compare only the authenticated user and returned business scope in server-side redacted audit; do not expose either JWT.
|
|
8
|
+
4. Repeat with a Session without a Vault. It must fail. Do not use an existing Session created before Vault binding.
|
|
9
|
+
|
|
10
|
+
The CLI binary is fixed to the OpenDev HTTPS origin and does not read `~/.soke-cli` or set an Authorization header. It sends `X-Soke-Client: ma` so a missing Vault injection fails before any legacy debug identity fallback. A successful request in this package proves only the listed probe path and GET method; other methods and business commands require separate verification.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: soke-ma-probe
|
|
3
|
+
description: Run a read-only Soke business request inside a QwenWork Managed Agent session to verify the session Vault HTTP credential.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Soke MA credential probe
|
|
7
|
+
|
|
8
|
+
Use this skill only when the user asks to check the current MA session's Soke business identity. Run the command from this skill's directory:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
bash ./run.sh exam +list-exams --page 1 --page-size 1 --format json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The command makes one GET request to `https://opendev.soke.cn/skills/exam/list`. The CLI does not set `Authorization`; the MA HTTP connection credential must inject the current session Vault's Bearer value. Report the HTTP or business error and request ID if present. Never print request headers, the JWT, Vault contents, or signed URLs. Do not run write commands from this test package.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
skill_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
5
|
+
case "$(uname -s)/$(uname -m)" in
|
|
6
|
+
Linux/x86_64) binary="$skill_dir/bin/linux-amd64/soke-ma" ;;
|
|
7
|
+
Linux/aarch64|Linux/arm64) binary="$skill_dir/bin/linux-arm64/soke-ma" ;;
|
|
8
|
+
*) printf '%s\n' 'Unsupported MA sandbox platform' >&2; exit 1 ;;
|
|
9
|
+
esac
|
|
10
|
+
|
|
11
|
+
exec "$binary" "$@"
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Copyright 2026 Alibaba Group
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
DingTalk Workspace CLI (dws)
|
|
2
|
+
Copyright 2026 Alibaba Group
|
|
3
|
+
|
|
4
|
+
This product includes software developed at
|
|
5
|
+
DingTalk (https://www.dingtalk.com/).
|
|
6
|
+
|
|
7
|
+
OpenHarmony ELF rewriting and fs-verity self-sign format adapted from:
|
|
8
|
+
https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli
|
|
9
|
+
Commit: df0fb53b5dcc8de64d49cfe0cce900eef4bc1d15
|
|
10
|
+
|
|
11
|
+
internal/openharmony/sign/elf.go SHA256 9caa0f72daf23da933c40574f2e9db5380873164c1acd268b7a6dfc2a6753b69
|
|
12
|
+
internal/openharmony/sign/verity.go SHA256 2afaeb71df08f4664720746e9d1e1888fbd6aea1e8b8ea7af295842a0870c5bf
|
|
13
|
+
|
|
14
|
+
授客AI修改:中文错误与注释;增加静态 ARM64、Go 构建元数据与签名完整性校验。
|
|
15
|
+
该自签名不提供 CA 发布者身份认证,也不保证所有鸿蒙设备允许执行。
|