@sokeai/cli 1.0.90 → 1.0.91

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sokeai/cli",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "授客AI官方CLI工具 - 支持AI Agent Skills",
5
5
  "bin": {
6
6
  "soke-cli": "scripts/run.js"
@@ -36,11 +36,13 @@ metadata:
36
36
 
37
37
  1. 创建/更新前查询 `+list-categories`,`--train-type` 使用真实分类 UUID。
38
38
  2. `--train-form` 对应接口字段 `train_form`,支持名称或编码:`线上=1`、`线下=2`、`混合培训=3`、`其他=4`、`集中培训=5`、`现场培训=6`;筛选、创建和更新时统一传对应编码。
39
- 3. 更新目标 UUID 必须来自当前列表或创建响应;更新请求固定带 `action=update`。
40
- 4. `+track --uuid` 和 `+list-classes --plan-id` 均指向培训计划 UUID。
41
- 5. `exec_arr` 使用 JSON 数组字符串,字段为 `uuid`、`show_name`、`dept_id`。
42
- 6. 金额、人数等接口返回值可能是字符串;展示可以原样保留,计算必须安全转换。
43
- 7. `+publish`、`+close` 自动提交固定 action;`+delete --uuids` 支持逗号分隔批量删除。
39
+ 3. `--lecturer-source` 对应接口字段 `lecturer_source`,支持名称或编码:`无=0`、`内培=1`、`外聘=2`、`内培+外聘=3`。
40
+ 4. 创建/更新必填计划名称(`title`)、计划分类(`train_type`)、承办部门(`exec_arr`)、培训年份(`year`)、培训月份(`month`);更新另需计划标识(`uuid`)。`status`、`train-form`、`lecturer-source` 为可选字段。
41
+ 5. `exec_arr` 是承办部门数组,每项必须包含部门 `uuid`、名称 `show_name` 和部门 ID `dept_id`,例如 `[{'uuid':'344014737','show_name':'测试授客学堂','dept_id':'344014737'}]`。
42
+ 6. 更新目标 UUID 必须来自当前列表或创建响应;更新请求固定带 `action=update`。
43
+ 7. `+track --uuid` 和 `+list-classes --plan-id` 均指向培训计划 UUID。
44
+ 8. 金额、人数等接口返回值可能是字符串;展示可以原样保留,计算必须安全转换。
45
+ 9. `+publish`、`+close` 自动提交固定 action;`+delete --uuids` 支持逗号分隔批量删除。
44
46
 
45
47
  ## 失败降级
46
48
 
@@ -28,9 +28,11 @@ soke-cli training-plan +list-classes --plan-id "PLAN-UUID" --format json
28
28
 
29
29
  # 写操作(执行前确认标题、分类、时间/月份、部门和状态)
30
30
  soke-cli training-plan +create --title "培训计划" --status 0 \
31
- --train-type "CATEGORY-UUID" --train-form 1 --year 2026 --month 9 --format json
31
+ --train-type "CATEGORY-UUID" --exec-arr '[{"uuid":"344014737","show_name":"测试授客学堂","dept_id":"344014737"}]' \
32
+ --train-form "线上" --year 2026 --month 9 --format json
32
33
  soke-cli training-plan +update --uuid "PLAN-UUID" --title "培训计划" --status 0 \
33
- --train-type "CATEGORY-UUID" --train-form 1 --year 2026 --month 9 --format json
34
+ --train-type "CATEGORY-UUID" --exec-arr '[{"uuid":"344014737","show_name":"测试授客学堂","dept_id":"344014737"}]' \
35
+ --train-form "线上" --year 2026 --month 9 --format json
34
36
  soke-cli training-plan +publish --uuid "PLAN-UUID" --format json
35
37
  soke-cli training-plan +close --uuid "PLAN-UUID" --format json
36
38
  soke-cli training-plan +delete --uuids "PLAN-UUID-1,PLAN-UUID-2" --format json
@@ -40,6 +42,8 @@ soke-cli training-plan +delete --uuids "PLAN-UUID-1,PLAN-UUID-2" --format json
40
42
 
41
43
  - 创建和更新前先用 `+list-categories`,`--train-type` 只能使用返回的分类 UUID,不得猜测或使用文档示例 UUID。
42
44
  - `--train-form`(接口字段 `train_form`)支持名称或编码:`线上=1`、`线下=2`、`混合培训=3`、`其他=4`、`集中培训=5`、`现场培训=6`。查询筛选、创建和更新都会把名称转换为对应编码。
45
+ - `--lecturer-source`(接口字段 `lecturer_source`)支持名称或编码:`无=0`、`内培=1`、`外聘=2`、`内培+外聘=3`。
46
+ - 创建和更新必须传 `--exec-arr` 承办部门 JSON 数组;每个部门必须包含 `uuid`、`show_name`、`dept_id`,实际格式见命令示例。
43
47
  - `+update` 的 `--uuid` 必须来自当前 `+list` 或创建结果;命令会自动提交接口要求的 `action=update`。
44
48
  - `--exec-arr` 传 JSON 数组字符串,例如 `[{"uuid":"1","show_name":"部门","dept_id":1}]`;执行部门字段按接口原样传递。
45
49
  - `+track` 使用培训计划 UUID;`+list-classes` 使用同一计划 UUID 的 `--plan-id`,不要混用培训班 UUID。
@@ -50,6 +54,6 @@ soke-cli training-plan +delete --uuids "PLAN-UUID-1,PLAN-UUID-2" --format json
50
54
 
51
55
  ## 业务字段
52
56
 
53
- 创建和更新的必填字段是 `status`、`title`、`train-type`、`train-form`、`year`、`month`。`train-form` 支持上述 6 个中文名称或 `1-6` 编码。其余字段按需传入:人数 `person-num`、次数 `number`、天数 `days`、预算 `funding`、大纲 `outline`、执行部门 `exec-arr`、讲师来源 `lecturer-source`、地点 `place`、课时 `hours`、目的 `purpose`、备注 `remark` 等。
57
+ 创建和更新的必填字段是计划名称(`title`)、计划分类(`train_type`)、承办部门(`exec_arr`)、培训年份(`year`)、培训月份(`month`);更新另外必填计划标识(`uuid`)。`status`、`train-form` 和 `lecturer-source` 为可选字段,分别支持原有编码及文档中的名称映射。其余字段按需传入:人数 `person-num`、次数 `number`、天数 `days`、预算 `funding`、大纲 `outline`、讲师来源 `lecturer_source`、地点 `place`、课时 `hours`、目的 `purpose`、备注 `remark` 等。
54
58
 
55
59
  统计中 `fundingTotal` 和 `actualFunding` 是金额字符串;跟踪中 `learning_num_all` 和费用字段也可能是字符串,计算前先安全转换。