@sokeai/cli 1.0.84 → 1.0.85

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.
@@ -1,451 +0,0 @@
1
- #!/bin/bash
2
-
3
- # soke-cli 自动化发布脚本
4
- # 完整流程: 编译 -> 创建标签 -> 上传 GitHub Releases -> 发布 NPM
5
-
6
- set -e
7
-
8
- # 颜色输出
9
- RED='\033[0;31m'
10
- GREEN='\033[0;32m'
11
- YELLOW='\033[1;33m'
12
- BLUE='\033[0;34m'
13
- NC='\033[0m'
14
-
15
- # 获取版本号
16
- VERSION=$(node -p "require('./package.json').version")
17
- SOURCE_VERSION=$(sed -nE 's/.*var Version = "([^"]+)".*/\1/p' internal/version/checker.go)
18
-
19
- # 阿里云 OSS/CDN 发布配置
20
- # OSS_BUCKET 需要替换为真实 bucket,例如: oss://soke-cli-release
21
- # CDN_BASE_URL 需要与 scripts/install.js 中的 DEFAULT_BINARY_HOST 使用同一 CDN 域名。
22
- OSS_BUCKET="oss://jiangben-soke-front-end-static-resources"
23
- OSS_PREFIX="soke-cli/releases"
24
- OSS_REGION="cn-hangzhou"
25
- OSS_ENDPOINT="https://oss-cn-hangzhou.aliyuncs.com"
26
- CDN_BASE_URL="https://soke-frontendstatic-cdn.soke.cn"
27
- REQUIRE_OSS=true
28
-
29
- echo -e "${BLUE}========================================${NC}"
30
- echo -e "${BLUE} soke-cli 发布脚本 v${VERSION}${NC}"
31
- echo -e "${BLUE}========================================${NC}"
32
- echo ""
33
-
34
- # 检查必要的工具
35
- check_tools() {
36
- echo -e "${YELLOW}检查必要工具...${NC}"
37
-
38
- if ! command -v go &> /dev/null; then
39
- echo -e "${RED}错误: 未安装 Go${NC}"
40
- exit 1
41
- fi
42
-
43
- if ! command -v gh &> /dev/null; then
44
- echo -e "${RED}错误: 未安装 GitHub CLI (gh)${NC}"
45
- echo "安装方法: brew install gh"
46
- exit 1
47
- fi
48
-
49
- if ! command -v npm &> /dev/null; then
50
- echo -e "${RED}错误: 未安装 npm${NC}"
51
- exit 1
52
- fi
53
-
54
- if [ -n "$OSS_BUCKET" ] || [ "$REQUIRE_OSS" = "true" ]; then
55
- if ! command -v ossutil &> /dev/null; then
56
- echo -e "${RED}错误: 已启用 OSS 上传,但未安装 ossutil${NC}"
57
- echo "安装与配置参考: https://help.aliyun.com/zh/oss/developer-reference/install-ossutil"
58
- exit 1
59
- fi
60
- fi
61
-
62
- if [ -n "$CDN_BASE_URL" ] && ! command -v aliyun &> /dev/null; then
63
- echo -e "${YELLOW}警告: 已配置 CDN 地址,但未安装 aliyun CLI,将跳过 CDN 预热${NC}"
64
- fi
65
-
66
- echo -e "${GREEN}✓ 所有工具已就绪${NC}"
67
- echo ""
68
- }
69
-
70
- # 检查 Git 状态
71
- check_git_status() {
72
- echo -e "${YELLOW}检查 Git 状态...${NC}"
73
-
74
- # 检查当前分支是否为 soke-cli
75
- CURRENT_BRANCH=$(git branch --show-current)
76
- if [ "$CURRENT_BRANCH" != "soke-cli" ]; then
77
- echo -e "${RED}错误: 当前分支为 $CURRENT_BRANCH,发布必须在 soke-cli 分支上进行${NC}"
78
- #exit 1
79
- fi
80
-
81
- if [ -n "$(git status --porcelain)" ]; then
82
- echo -e "${RED}错误: 工作目录有未提交的更改${NC}"
83
- echo "请先提交或暂存所有更改"
84
- git status --short
85
- exit 1
86
- fi
87
-
88
- # 配置 GitHub 远程仓库
89
- GITHUB_REMOTE="git@github.com:sokeai/soke-cli.git"
90
- if git remote get-url github &> /dev/null; then
91
- CURRENT_URL=$(git remote get-url github)
92
- if [ "$CURRENT_URL" != "$GITHUB_REMOTE" ]; then
93
- echo -e "${YELLOW}更新 github 远程仓库地址...${NC}"
94
- git remote set-url github "$GITHUB_REMOTE"
95
- fi
96
- else
97
- echo -e "${YELLOW}添加 github 远程仓库...${NC}"
98
- git remote add github "$GITHUB_REMOTE"
99
- fi
100
-
101
- echo -e "${GREEN}✓ 工作目录干净${NC}"
102
- echo ""
103
- }
104
-
105
- # 比较两个 x.y.z 版本号,左侧大于右侧时返回 0
106
- version_gt() {
107
- local left=$1
108
- local right=$2
109
- local left_major left_minor left_patch
110
- local right_major right_minor right_patch
111
-
112
- IFS=. read -r left_major left_minor left_patch <<< "$left"
113
- IFS=. read -r right_major right_minor right_patch <<< "$right"
114
-
115
- if [ "$left_major" -ne "$right_major" ]; then
116
- [ "$left_major" -gt "$right_major" ]
117
- return
118
- fi
119
- if [ "$left_minor" -ne "$right_minor" ]; then
120
- [ "$left_minor" -gt "$right_minor" ]
121
- return
122
- fi
123
- [ "$left_patch" -gt "$right_patch" ]
124
- }
125
-
126
- # 检查版本来源是否合理
127
- check_versions() {
128
- echo -e "${YELLOW}检查版本号...${NC}"
129
-
130
- if [ "${SOURCE_VERSION}" != "dev" ] && [ "${SOURCE_VERSION}" != "${VERSION}" ]; then
131
- echo -e "${RED}错误: internal/version/checker.go 中的版本 (${SOURCE_VERSION}) 与 package.json (${VERSION}) 不一致${NC}"
132
- echo "建议将 checker.go 默认版本保持为 dev,正式版本由 build-binaries.sh 注入"
133
- exit 1
134
- fi
135
-
136
- if npm view @sokeai/cli@"${VERSION}" version >/dev/null 2>&1; then
137
- echo -e "${RED}错误: NPM 上已经存在 @sokeai/cli@${VERSION}${NC}"
138
- echo "请提升 package.json 中的版本号"
139
- exit 1
140
- fi
141
-
142
- LATEST_VERSION=$(npm view @sokeai/cli version 2>/dev/null || true)
143
- if [ -n "${LATEST_VERSION}" ] && ! version_gt "${VERSION}" "${LATEST_VERSION}"; then
144
- echo -e "${RED}错误: package.json 版本 (${VERSION}) 必须大于 NPM latest (${LATEST_VERSION})${NC}"
145
- exit 1
146
- fi
147
-
148
- echo -e "${GREEN}✓ 版本号检查通过${NC}"
149
- echo ""
150
- }
151
-
152
- # 检查标签是否已存在
153
- check_tag() {
154
- echo -e "${YELLOW}检查标签 v${VERSION}...${NC}"
155
-
156
- if git rev-parse "v${VERSION}" >/dev/null 2>&1; then
157
- echo -e "${RED}错误: 标签 v${VERSION} 已存在${NC}"
158
- echo "请更新 package.json 中的版本号"
159
- exit 1
160
- fi
161
-
162
- echo -e "${GREEN}✓ 标签不存在,可以继续${NC}"
163
- echo ""
164
- }
165
-
166
- # 运行测试
167
- run_tests() {
168
- echo -e "${YELLOW}运行单元测试...${NC}"
169
-
170
- if ! go test ./...; then
171
- echo -e "${RED}错误: 单元测试失败${NC}"
172
- exit 1
173
- fi
174
-
175
- echo -e "${GREEN}✓ 单元测试通过${NC}"
176
- echo ""
177
-
178
- echo -e "${YELLOW}运行端到端测试...${NC}"
179
-
180
- if ! ./scripts/e2e-test.sh; then
181
- echo -e "${RED}错误: 端到端测试失败${NC}"
182
- exit 1
183
- fi
184
-
185
- echo -e "${GREEN}✓ 端到端测试通过${NC}"
186
- echo ""
187
- }
188
-
189
- # 编译所有平台
190
- build_binaries() {
191
- echo -e "${YELLOW}编译所有平台...${NC}"
192
-
193
- if ! ./scripts/build-binaries.sh; then
194
- echo -e "${RED}错误: 编译失败${NC}"
195
- exit 1
196
- fi
197
-
198
- echo -e "${GREEN}✓ 编译完成${NC}"
199
- echo ""
200
- }
201
-
202
- # 生成二进制校验文件
203
- generate_checksums() {
204
- echo -e "${YELLOW}生成 sha256 校验文件...${NC}"
205
-
206
- local checksum_file="bin/checksums.txt"
207
- rm -f "$checksum_file"
208
-
209
- for file in \
210
- bin/soke-cli-darwin-amd64 \
211
- bin/soke-cli-darwin-arm64 \
212
- bin/soke-cli-linux-amd64 \
213
- bin/soke-cli-windows-amd64.exe; do
214
- if [ ! -f "$file" ]; then
215
- echo -e "${RED}错误: 缺少编译产物 $file${NC}"
216
- exit 1
217
- fi
218
-
219
- local hash
220
- hash=$(shasum -a 256 "$file" | awk '{print $1}')
221
- echo "${hash} $(basename "$file")" >> "$checksum_file"
222
- done
223
-
224
- echo -e "${GREEN}✓ 校验文件已生成: ${checksum_file}${NC}"
225
- cat "$checksum_file"
226
- echo ""
227
- }
228
-
229
- # 上传二进制到阿里云 OSS,并可选预热 CDN
230
- upload_oss_release() {
231
- if [ -z "$OSS_BUCKET" ]; then
232
- if [ "$REQUIRE_OSS" = "true" ]; then
233
- echo -e "${RED}错误: REQUIRE_OSS=true,但未配置 OSS_BUCKET${NC}"
234
- exit 1
235
- fi
236
-
237
- echo -e "${YELLOW}未配置 OSS_BUCKET,跳过 OSS 上传${NC}"
238
- echo ""
239
- return
240
- fi
241
-
242
- if [ "$OSS_BUCKET" = "oss://your-bucket" ]; then
243
- echo -e "${RED}错误: 请先在 scripts/release.sh 中配置真实的 OSS_BUCKET${NC}"
244
- exit 1
245
- fi
246
-
247
- echo -e "${YELLOW}上传二进制到阿里云 OSS...${NC}"
248
-
249
- local bucket="${OSS_BUCKET%/}"
250
- local prefix="${OSS_PREFIX#/}"
251
- prefix="${prefix%/}"
252
- local oss_dir="${bucket}/${prefix}/v${VERSION}"
253
-
254
- # 提前检查 endpoint,避免逐个文件上传时才暴露 DNS 配置错误。
255
- local oss_host="${OSS_ENDPOINT#https://}"
256
- oss_host="${oss_host#http://}"
257
- oss_host="${oss_host%%/*}"
258
- if ! getent hosts "$oss_host" >/dev/null 2>&1 && ! dscacheutil -q host -a name "$oss_host" >/dev/null 2>&1; then
259
- echo -e "${RED}错误: OSS endpoint 无法解析: ${OSS_ENDPOINT}${NC}"
260
- echo "请确认 OSS_REGION/OSS_ENDPOINT 配置正确"
261
- exit 1
262
- fi
263
-
264
- for file in \
265
- bin/soke-cli-darwin-amd64 \
266
- bin/soke-cli-darwin-arm64 \
267
- bin/soke-cli-linux-amd64 \
268
- bin/soke-cli-windows-amd64.exe \
269
- bin/checksums.txt; do
270
- ossutil \
271
- --region "$OSS_REGION" \
272
- --endpoint "$OSS_ENDPOINT" \
273
- cp "$file" "${oss_dir}/$(basename "$file")" -f
274
- done
275
-
276
- echo -e "${GREEN}✓ OSS 上传完成: ${oss_dir}${NC}"
277
-
278
- if [ -n "$CDN_BASE_URL" ]; then
279
- local cdn_base="${CDN_BASE_URL%/}"
280
- local cdn_prefix="${prefix}"
281
- local urls=(
282
- "${cdn_base}/${cdn_prefix}/v${VERSION}/soke-cli-darwin-amd64"
283
- "${cdn_base}/${cdn_prefix}/v${VERSION}/soke-cli-darwin-arm64"
284
- "${cdn_base}/${cdn_prefix}/v${VERSION}/soke-cli-linux-amd64"
285
- "${cdn_base}/${cdn_prefix}/v${VERSION}/soke-cli-windows-amd64.exe"
286
- "${cdn_base}/${cdn_prefix}/v${VERSION}/checksums.txt"
287
- )
288
-
289
- echo -e "${YELLOW}CDN 下载地址:${NC}"
290
- printf ' %s\n' "${urls[@]}"
291
-
292
- if command -v aliyun &> /dev/null; then
293
- echo -e "${YELLOW}预热 CDN 文件...${NC}"
294
- for url in "${urls[@]}"; do
295
- if ! aliyun cdn PushObjectCache --ObjectPath "$url" >/dev/null; then
296
- echo -e "${YELLOW}警告: CDN 预热失败: ${url}${NC}"
297
- fi
298
- done
299
- echo -e "${GREEN}✓ CDN 预热请求已提交${NC}"
300
- fi
301
- fi
302
-
303
- echo ""
304
- }
305
-
306
- # 创建并推送标签
307
- create_tag() {
308
- echo -e "${YELLOW}创建 Git 标签 v${VERSION}...${NC}"
309
-
310
- git tag -a "v${VERSION}" -m "Release v${VERSION}"
311
- git push github "v${VERSION}"
312
-
313
- echo -e "${GREEN}✓ 标签已创建并推送${NC}"
314
- echo ""
315
- }
316
-
317
- # 上传到 GitHub Releases
318
- upload_github_release() {
319
- echo -e "${YELLOW}上传到 GitHub Releases...${NC}"
320
-
321
- # 生成 Release Notes(可以自定义)
322
- RELEASE_NOTES="Release v${VERSION}
323
-
324
- ## 安装方法
325
-
326
- \`\`\`bash
327
- npm install -g @sokeai/cli
328
- \`\`\`
329
-
330
- ## 更新日志
331
-
332
- 请查看 commit 历史了解详细更改。
333
- "
334
-
335
- gh release create "v${VERSION}" \
336
- bin/soke-cli-darwin-amd64 \
337
- bin/soke-cli-darwin-arm64 \
338
- bin/soke-cli-linux-amd64 \
339
- bin/soke-cli-windows-amd64.exe \
340
- bin/checksums.txt \
341
- --title "v${VERSION}" \
342
- --notes "${RELEASE_NOTES}"
343
-
344
- echo -e "${GREEN}✓ GitHub Release 创建成功${NC}"
345
- echo ""
346
- }
347
-
348
- # 发布到 NPM
349
- publish_npm() {
350
- echo -e "${YELLOW}发布到 NPM...${NC}"
351
-
352
- # 如果有环境变量,优先配置(会持久化到 ~/.npmrc)
353
- if [ -n "$NPM_TOKEN" ]; then
354
- npm config set //registry.npmjs.org/:_authToken="${NPM_TOKEN}"
355
- echo -e "${GREEN}✓ 已通过 NPM_TOKEN 配置认证${NC}"
356
- fi
357
-
358
- # 验证认证是否有效(支持 npm login 和 token 两种方式)
359
- if ! npm whoami &> /dev/null; then
360
- echo -e "${RED}错误: NPM 认证失败${NC}"
361
- echo ""
362
- echo "可能原因:"
363
- echo " 1. 未配置认证令牌"
364
- echo " 2. 令牌已过期或被撤销"
365
- echo ""
366
- echo "解决方法(任选其一):"
367
- echo " 方法1: 持久化配置令牌(推荐,一次配置永久生效)"
368
- echo " npm config set //registry.npmjs.org/:_authToken=npm_xxx"
369
- echo ""
370
- echo " 方法2: 交互式登录(需要浏览器)"
371
- echo " npm login"
372
- echo ""
373
- echo "令牌创建地址: https://www.npmjs.com/settings/<YOUR_USER>/tokens"
374
- echo "注意: 需要创建 Granular Access Token,并勾选「Bypass 2FA」"
375
- exit 1
376
- fi
377
-
378
- echo -e "${GREEN}✓ NPM 认证已就绪 ($(npm whoami 2>/dev/null))${NC}"
379
-
380
- # 发布
381
- #npm publish --access public
382
- npm publish --access public --tag latest
383
-
384
- echo -e "${GREEN}✓ NPM 包发布成功${NC}"
385
- echo ""
386
- }
387
-
388
- # 清理编译产物
389
- cleanup() {
390
- echo -e "${YELLOW}清理编译产物...${NC}"
391
- rm -rf bin/
392
- echo -e "${GREEN}✓ 清理完成${NC}"
393
- echo ""
394
- }
395
-
396
- # 主流程
397
- main() {
398
- echo -e "${BLUE}开始发布流程...${NC}"
399
- echo ""
400
-
401
- check_tools
402
- check_git_status
403
- check_versions
404
- check_tag
405
- run_tests
406
- build_binaries
407
- generate_checksums
408
- upload_oss_release
409
- #create_tag
410
- #upload_github_release
411
- publish_npm
412
- cleanup
413
-
414
- echo -e "${GREEN}========================================${NC}"
415
- echo -e "${GREEN} 发布成功! 🎉${NC}"
416
- echo -e "${GREEN}========================================${NC}"
417
- echo ""
418
- echo -e "版本: ${GREEN}v${VERSION}${NC}"
419
- echo -e "NPM: ${BLUE}https://www.npmjs.com/package/@sokeai/cli${NC}"
420
- echo -e "GitHub: ${BLUE}https://github.com/sokeai/soke-cli/releases/tag/v${VERSION}${NC}"
421
- echo ""
422
- echo "安装或升级到最新版本:"
423
- echo -e "${YELLOW}npm install -g @sokeai/cli@latest${NC}"
424
- }
425
-
426
- # 确认发布
427
- echo -e "${YELLOW}即将发布 soke-cli v${VERSION}${NC}"
428
- echo ""
429
- echo "发布流程包括:"
430
- echo " 1. 检查工具和 Git 状态"
431
- echo " 2. 运行测试"
432
- echo " 3. 编译所有平台二进制文件"
433
- echo " 4. 生成 sha256 校验文件"
434
- echo " 5. 上传到 OSS(如已配置)并预热 CDN"
435
- echo " 6. 创建 Git 标签并推送"
436
- echo " 7. 上传到 GitHub Releases"
437
- echo " 8. 发布到 NPM"
438
- echo ""
439
- read -p "确认继续? [Y/n] " -n 1 -r
440
- echo ""
441
-
442
- # 默认是 Y
443
- REPLY=${REPLY:-Y}
444
-
445
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
446
- echo "已取消发布"
447
- exit 0
448
- fi
449
-
450
- echo ""
451
- main
@@ -1,142 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * 测试 install.js 的自动检测功能
5
- */
6
-
7
- const fs = require('fs');
8
- const path = require('path');
9
-
10
- // 复制 detectSkillNames 函数
11
- function detectSkillNames(packagedSkillsDir) {
12
- if (!fs.existsSync(packagedSkillsDir)) return [];
13
-
14
- try {
15
- const entries = fs.readdirSync(packagedSkillsDir, { withFileTypes: true });
16
- return entries
17
- .filter(entry => entry.isDirectory() && entry.name.startsWith('soke-'))
18
- .map(entry => entry.name)
19
- .sort();
20
- } catch (_) {
21
- return [];
22
- }
23
- }
24
-
25
- // 复制 parseSkillMetadata 函数
26
- function parseSkillMetadata(skillDir) {
27
- const skillMdPath = path.join(skillDir, 'SKILL.md');
28
- if (!fs.existsSync(skillMdPath)) {
29
- return null;
30
- }
31
-
32
- try {
33
- const content = fs.readFileSync(skillMdPath, 'utf8');
34
-
35
- const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
36
- if (!frontmatterMatch) return null;
37
-
38
- const frontmatter = frontmatterMatch[1];
39
- const metadata = {};
40
-
41
- const nameMatch = frontmatter.match(/^name:\s*(.+)$/m);
42
- if (nameMatch) metadata.name = nameMatch[1].trim();
43
-
44
- const summaryMatch = frontmatter.match(/^summary:\s*(.+)$/m);
45
- if (summaryMatch) metadata.summary = summaryMatch[1].trim();
46
-
47
- const descMatch = frontmatter.match(/^description:\s*["'](.+)["']$/m);
48
- if (descMatch) {
49
- metadata.description = descMatch[1].trim();
50
- } else {
51
- const descMatch2 = frontmatter.match(/^description:\s*(.+)$/m);
52
- if (descMatch2) metadata.description = descMatch2[1].trim();
53
- }
54
-
55
- const versionMatch = frontmatter.match(/^version:\s*(.+)$/m);
56
- if (versionMatch) metadata.version = versionMatch[1].trim();
57
-
58
- const binsMatch = frontmatter.match(/bins:\s*\[(.+?)\]/);
59
- if (binsMatch) {
60
- metadata.bins = binsMatch[1].split(',').map(b => b.trim().replace(/['"]/g, ''));
61
- }
62
-
63
- return metadata;
64
- } catch (_) {
65
- return null;
66
- }
67
- }
68
-
69
- // 测试
70
- const packageRoot = path.join(__dirname, '..');
71
- const skillsDir = path.join(packageRoot, 'skills', 'multi');
72
-
73
- console.log('🔍 测试自动检测功能\n');
74
- console.log('Skills 目录:', skillsDir);
75
- console.log('');
76
-
77
- // 检测所有 skills
78
- const skillNames = detectSkillNames(skillsDir);
79
-
80
- console.log(`✅ 检测到 ${skillNames.length} 个 skills:\n`);
81
-
82
- // 显示每个 skill 的详细信息
83
- for (const skillName of skillNames) {
84
- const skillDir = path.join(skillsDir, skillName);
85
- const metadata = parseSkillMetadata(skillDir);
86
-
87
- console.log(`📦 ${skillName}`);
88
-
89
- if (metadata) {
90
- console.log(` 名称: ${metadata.name || '未知'}`);
91
- console.log(` 摘要: ${metadata.summary || '未知'}`);
92
- console.log(` 版本: ${metadata.version || '未知'}`);
93
- console.log(` 依赖: ${metadata.bins ? metadata.bins.join(', ') : '无'}`);
94
- console.log(` 描述: ${metadata.description ? metadata.description.substring(0, 60) + '...' : '未知'}`);
95
- } else {
96
- console.log(' ⚠️ 无法解析 SKILL.md');
97
- }
98
-
99
- console.log('');
100
- }
101
-
102
- // 验证结果
103
- console.log('📊 验证结果:\n');
104
-
105
- const expectedSkills = [
106
- 'soke-ai-coach-director',
107
- 'soke-ai-training',
108
- 'soke-assign',
109
- 'soke-certificate',
110
- 'soke-course',
111
- 'soke-exam',
112
- 'soke-exam-question-pool',
113
- 'soke-learning-map',
114
- 'soke-learning-profile',
115
- 'soke-lesson',
116
- 'soke-material',
117
- 'soke-photo-gallery',
118
- 'soke-shared',
119
- 'soke-supervisor',
120
- 'soke-task',
121
- 'soke-training-demand'
122
- ];
123
- const missingSkills = expectedSkills.filter(s => !skillNames.includes(s));
124
- const extraSkills = skillNames.filter(s => !expectedSkills.includes(s));
125
-
126
- if (missingSkills.length > 0) {
127
- console.log(`❌ 缺少的 skills: ${missingSkills.join(', ')}`);
128
- } else {
129
- console.log('✅ 所有预期的 skills 都已检测到');
130
- }
131
-
132
- if (extraSkills.length > 0) {
133
- console.log(`ℹ️ 额外的 skills: ${extraSkills.join(', ')}`);
134
- }
135
-
136
- console.log('');
137
- console.log('🎉 测试完成!');
138
- console.log('');
139
- console.log('💡 提示:');
140
- console.log(' - 新增 skill 时,只需在 skills/multi/ 目录下创建 soke-* 目录');
141
- console.log(' - 确保每个 skill 都有 SKILL.md 文件,包含完整的 frontmatter');
142
- console.log(' - install.js 会自动检测并注册所有 skills');