@sokeai/cli 1.0.74 → 1.0.76

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.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/scripts/build-binaries.sh +12 -0
  3. package/scripts/release.sh +50 -1
  4. package/skills/SKILL.md +1 -1
  5. package/skills/ai-coach-director/SKILL.md +379 -45
  6. package/skills/ai-coach-director/coaching/prompt-engineer/parts/part2-roles.md +8 -8
  7. package/skills/ai-coach-director/coaching/prompt-engineer/prompt-engineer.md +70 -43
  8. package/skills/ai-coach-director/platform/adapters/README.md +68 -0
  9. package/skills/ai-coach-director/platform/adapters/qclaw.md +67 -0
  10. package/skills/ai-coach-director/platform/adapters/workbuddy.md +45 -0
  11. package/skills/ai-coach-director/platform/adapters/wukong.md +70 -0
  12. package/skills/ai-coach-director/platform/adapters/zework.md +89 -0
  13. package/skills/ai-coach-director/platform/api-fallback.md +262 -0
  14. package/skills/ai-coach-director/platform/interaction.md +13 -10
  15. package/skills/ai-coach-director/platform/publish-gate.md +44 -0
  16. package/skills/ai-coach-director/platform/resource-finalizer.md +128 -0
  17. package/skills/ai-coach-director/platform/sync-engine.md +217 -90
  18. package/skills/ai-coach-director/references/env-check.md +46 -11
  19. package/skills/ai-coach-director/references/platform-api-pitfalls.md +15 -1
  20. package/skills/ai-coach-director/references/role-resource-matching.md +53 -16
  21. package/skills/ai-coach-director/references/verified-cli-cheatsheet.md +26 -12
  22. package/skills/soke-cli/345/256/211/350/243/205/346/214/207/345/215/227.md +45 -7
  23. package/skills/soke-course/README.md +6 -0
  24. package/skills/soke-course/SKILL.md +9 -7
  25. package/skills/soke-course/references/intent-cases.md +6 -6
  26. package/skills/soke-course/references/sop-full-workflow.md +7 -4
  27. package/skills/soke-course/references/sop-publish-check.md +3 -1
  28. package/skills/soke-course/references/subs/publish/SOP.md +13 -1
  29. package/skills/soke-course/references/subs/settings/SOP.md +86 -25
  30. package/skills/soke-course/soke-cli/345/256/211/350/243/205/346/214/207/345/215/227.md +44 -6
  31. package/skills/soke-exam-question-pool/SKILL.md +80 -112
  32. package/skills/soke-learning-map/soke-cli/345/256/211/350/243/205/346/214/207/345/215/227.md +45 -7
  33. package/skills/soke-training-demand/SKILL.md +149 -42
  34. package/skills/ai-coach-director/.learnings/LEARNINGS.md +0 -71
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sokeai/cli",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
4
4
  "description": "授客AI官方CLI工具 - 支持AI Agent Skills",
5
5
  "bin": {
6
6
  "soke-cli": "scripts/run.js"
@@ -15,6 +15,9 @@ NC='\033[0m' # No Color
15
15
  VERSION=$(node -p "require('./package.json').version")
16
16
  echo -e "${GREEN}开始编译 soke-cli v${VERSION}${NC}"
17
17
 
18
+ HOST_GOOS=$(go env GOOS)
19
+ HOST_GOARCH=$(go env GOARCH)
20
+
18
21
  # 正式发版固定使用正式环境配置
19
22
  CONFIG_FILE="app.pro.yaml"
20
23
  if [ ! -f "${CONFIG_FILE}" ]; then
@@ -51,6 +54,15 @@ build() {
51
54
  if [ $? -eq 0 ]; then
52
55
  local SIZE=$(du -h ${BIN_DIR}/${OUTPUT} | cut -f1)
53
56
  echo -e "${GREEN}✓ ${OUTPUT} (${SIZE})${NC}"
57
+
58
+ if [ "${GOOS}" = "${HOST_GOOS}" ] && [ "${GOARCH}" = "${HOST_GOARCH}" ]; then
59
+ local BUILT_VERSION=$("${BIN_DIR}/${OUTPUT}" --version | awk '{print $NF}')
60
+ if [ "${BUILT_VERSION}" != "${VERSION}" ]; then
61
+ echo -e "${RED}✗ ${OUTPUT} 版本校验失败: 期望 ${VERSION}, 实际 ${BUILT_VERSION}${NC}"
62
+ exit 1
63
+ fi
64
+ echo -e "${GREEN}✓ ${OUTPUT} 版本校验通过 (${BUILT_VERSION})${NC}"
65
+ fi
54
66
  else
55
67
  echo -e "${RED}✗ ${OUTPUT} 编译失败${NC}"
56
68
  exit 1
@@ -14,6 +14,7 @@ NC='\033[0m'
14
14
 
15
15
  # 获取版本号
16
16
  VERSION=$(node -p "require('./package.json').version")
17
+ SOURCE_VERSION=$(sed -nE 's/.*var Version = "([^"]+)".*/\1/p' internal/version/checker.go)
17
18
 
18
19
  echo -e "${BLUE}========================================${NC}"
19
20
  echo -e "${BLUE} soke-cli 发布脚本 v${VERSION}${NC}"
@@ -79,6 +80,53 @@ check_git_status() {
79
80
  echo ""
80
81
  }
81
82
 
83
+ # 比较两个 x.y.z 版本号,左侧大于右侧时返回 0
84
+ version_gt() {
85
+ local left=$1
86
+ local right=$2
87
+ local left_major left_minor left_patch
88
+ local right_major right_minor right_patch
89
+
90
+ IFS=. read -r left_major left_minor left_patch <<< "$left"
91
+ IFS=. read -r right_major right_minor right_patch <<< "$right"
92
+
93
+ if [ "$left_major" -ne "$right_major" ]; then
94
+ [ "$left_major" -gt "$right_major" ]
95
+ return
96
+ fi
97
+ if [ "$left_minor" -ne "$right_minor" ]; then
98
+ [ "$left_minor" -gt "$right_minor" ]
99
+ return
100
+ fi
101
+ [ "$left_patch" -gt "$right_patch" ]
102
+ }
103
+
104
+ # 检查版本来源是否合理
105
+ check_versions() {
106
+ echo -e "${YELLOW}检查版本号...${NC}"
107
+
108
+ if [ "${SOURCE_VERSION}" != "dev" ] && [ "${SOURCE_VERSION}" != "${VERSION}" ]; then
109
+ echo -e "${RED}错误: internal/version/checker.go 中的版本 (${SOURCE_VERSION}) 与 package.json (${VERSION}) 不一致${NC}"
110
+ echo "建议将 checker.go 默认版本保持为 dev,正式版本由 build-binaries.sh 注入"
111
+ exit 1
112
+ fi
113
+
114
+ if npm view @sokeai/cli@"${VERSION}" version >/dev/null 2>&1; then
115
+ echo -e "${RED}错误: NPM 上已经存在 @sokeai/cli@${VERSION}${NC}"
116
+ echo "请提升 package.json 中的版本号"
117
+ exit 1
118
+ fi
119
+
120
+ LATEST_VERSION=$(npm view @sokeai/cli version 2>/dev/null || true)
121
+ if [ -n "${LATEST_VERSION}" ] && ! version_gt "${VERSION}" "${LATEST_VERSION}"; then
122
+ echo -e "${RED}错误: package.json 版本 (${VERSION}) 必须大于 NPM latest (${LATEST_VERSION})${NC}"
123
+ exit 1
124
+ fi
125
+
126
+ echo -e "${GREEN}✓ 版本号检查通过${NC}"
127
+ echo ""
128
+ }
129
+
82
130
  # 检查标签是否已存在
83
131
  check_tag() {
84
132
  echo -e "${YELLOW}检查标签 v${VERSION}...${NC}"
@@ -224,7 +272,8 @@ main() {
224
272
 
225
273
  check_tools
226
274
  check_git_status
227
- # check_tag
275
+ check_versions
276
+ check_tag
228
277
  run_tests
229
278
  build_binaries
230
279
  create_tag
package/skills/SKILL.md CHANGED
@@ -18,7 +18,7 @@ metadata:
18
18
 
19
19
  - **安装 soke-cli**:`npm install -g @sokeai/cli@latest`
20
20
  - **登录授权**:`soke-cli auth login`(OAuth 浏览器授权流程)
21
- - **验证安装**:`soke-cli --version` / `soke-cli config show`
21
+ - **验证安装**:`soke-cli --version` / `soke-cli doctor` / `soke-cli config show`
22
22
  - **常见问题**:`command not found`、Token 过期、浏览器未自动打开等
23
23
 
24
24
  未完成安装和登录,所有业务 skill 均无法正常工作。