@sokeai/cli 1.0.92 → 1.0.94
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 +1 -1
- package/skills/mono/references/modules/soke-course/MODULE.md +3 -1
- package/skills/mono/references/modules/soke-course/cli-facts.md +6 -0
- package/skills/mono/references/modules/soke-supervisor/MODULE.md +3 -0
- package/skills/multi/soke-ai-training/SKILL.md +45 -0
- package/skills/multi/soke-course/SKILL.md +3 -1
- package/skills/multi/soke-course/references/cli-facts.md +6 -0
- package/skills/multi/soke-supervisor/SKILL.md +10 -0
- package/skills/.claude/settings.local.json +0 -7
package/package.json
CHANGED
|
@@ -70,7 +70,9 @@ tags: [soke, course, orchestration, publish]
|
|
|
70
70
|
| publish(发布/上线/定时发布) | Phase 4(指派后最后一步,仅明确 E1 执行) |
|
|
71
71
|
| query(进度/完成率/谁学了/作业提交) | Phase 5 |
|
|
72
72
|
| maintain(关闭/删除/复制/模板) | Phase 5 维护 |
|
|
73
|
-
| category
|
|
73
|
+
| category(分类查询/创建/更新/删除) | read/write subs/category |
|
|
74
|
+
|
|
75
|
+
分类维护:查询使用 `course +category-detail` 或 `course +list-categories`;创建、更新、删除前必须确认目标分类和父路径。写操作分别使用 `+category-create`、`+category-update`、`+category-delete`,删除遇到 `delete_error` 时展示接口返回的课程列表并停止后续删除。
|
|
74
76
|
|
|
75
77
|
上下文规则:
|
|
76
78
|
|
|
@@ -42,6 +42,12 @@ list: `--keyword` `--category-path`(分类筛选,**不是 --category-id**) `--
|
|
|
42
42
|
### +list-categories
|
|
43
43
|
`--page` `--page-size`(max 100)。当前事实表未确认 `--parent-id`/`--level`,不得直接使用;如需末级分类,先按返回的 parent_id/level 递归查询或执行 --help 实测后补录。
|
|
44
44
|
|
|
45
|
+
### 课程分类维护
|
|
46
|
+
`+category-detail --category-id`:查询分类详情。
|
|
47
|
+
`+category-create --title --path`:创建分类;`--path` 为父分类路径 UUID,多个用英文逗号分隔。可选 `--unify-perm`、`--modify-unify-perm`、`--visible-type`、`--type`、`--weight`。
|
|
48
|
+
`+category-update --category-id --title --path`:更新分类;可选 `--old-title`、`--old-path` 以及上述权限、可见范围和排序字段。
|
|
49
|
+
`+category-delete --category-id`:删除分类。删除前应确认分类下没有课程;接口返回 `code=delete_error` 时保留并展示 `data` 中的阻止删除课程列表。
|
|
50
|
+
|
|
45
51
|
### +lesson-create 创建课件
|
|
46
52
|
`--course-id`(必填) `--title` `--type` video/audio/photo_gallery/document/exam
|
|
47
53
|
非 exam:`--media-id`(素材UUID,**不是 --uuid**) `--filename` `--ext` `--filesize` `--object` `--length`(秒,**不是 --duration**)
|
|
@@ -61,6 +61,7 @@ metadata:
|
|
|
61
61
|
| `soke-cli supervisor +create-scenario` | 创建督导场景草稿 |
|
|
62
62
|
| `soke-cli supervisor +list-scoring-criteria` | 查询评分标准模板 |
|
|
63
63
|
| `soke-cli supervisor +update-scenario` | 更新场景信息并设置评分标准 |
|
|
64
|
+
| `soke-cli supervisor +edit-scenario-criteria` | 在内存中交互式新增/删除评分维度,确认后一次性提交完整配置 |
|
|
64
65
|
| `soke-cli supervisor +list-assigns` | 查询场景已有指派 |
|
|
65
66
|
| `soke-cli supervisor +list-department-children` | 查询可指派部门 |
|
|
66
67
|
| `soke-cli supervisor +list-department-members` | 查询部门成员 |
|
|
@@ -99,6 +100,8 @@ soke-cli supervisor +list-scoring-criteria --page 1 --page-size 10 --pretty
|
|
|
99
100
|
|
|
100
101
|
选择模板时,保存 `data.list[].id` 和该模板的 `dimensions[]`。
|
|
101
102
|
|
|
103
|
+
需要补充或删除已有场景的评分维度时,使用 `+edit-scenario-criteria`。该命令在进程内编辑完整维度数组,确认后通过现有更新接口一次性提交;不会生成临时 JSON 文件,也不是后端单维度新增接口。取消或中断不会修改服务端。
|
|
104
|
+
|
|
102
105
|
3. 更新场景和评分配置:
|
|
103
106
|
|
|
104
107
|
```bash
|
|
@@ -247,3 +247,48 @@ soke-cli ai-training +restore-scenario-snapshot \
|
|
|
247
247
|
- 场景创建请求体中的 `corp_id`、`company_id`、`user_id`、`implementation_corp_id` 会由代理剥离,不要依赖它们选择租户。
|
|
248
248
|
- 场景更新前必须以 `+get-scenario` 的 `updated_at` 作为 `base_updated_at`。
|
|
249
249
|
- 场景发布需要 `+publish-scenario --scenario-id <id>`,默认带 `version=1` 和 `version_description=CLI发布`;不要把它当作局部更新命令。
|
|
250
|
+
|
|
251
|
+
## 场景生命周期、指派与分析命令
|
|
252
|
+
|
|
253
|
+
以下命令已注册并使用 MentorAI 原生接口;危险写操作必须显式 `--confirm`,写操作失败时以服务端错误为准,不自动重试:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
soke-cli ai-training +close-scenario --scenario-id <id> --confirm
|
|
257
|
+
soke-cli ai-training +delete-scenario --scenario-id <id> --confirm
|
|
258
|
+
soke-cli ai-training +copy-scenario --scenario-id <id> --new-name "副本"
|
|
259
|
+
soke-cli ai-training +assign-scenario --scenario-id <id> --user-ids "u1,u2" --dept-ids "d1"
|
|
260
|
+
soke-cli ai-training +cancel-assign --scenario-id <id> --assign-id <assign-id> --confirm
|
|
261
|
+
soke-cli ai-training +list-scenario-stats --scenario-id <id> --start-date 2026-01-01 --end-date 2026-01-31
|
|
262
|
+
soke-cli ai-training +get-team-analysis --scenario-id <id>
|
|
263
|
+
soke-cli ai-training +get-student-analysis --scenario-id <id> --user-id <user-id>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
复制默认包含对话环节、AI角色、评分标准和知识库;复制没有幂等键,勿自动重试。团队分析是企业级结果,不支持 `--dept-id`。
|
|
267
|
+
|
|
268
|
+
## 对话环节安全更新
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
soke-cli ai-training +create-conversation-steps --scenario-id <id> --steps-file steps.json
|
|
272
|
+
soke-cli ai-training +update-conversation-steps --scenario-id <id> --step-id <step-id> --patch-file patch.json --confirm
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
命令执行 get → preview;未传 `--confirm` 时只输出预览,确认后只执行一次 apply,并使用 `updated_at` 和稳定幂等键。输入字段使用 `ai_task`,不使用旧的 `ai_objective`;禁止租户归属字段。
|
|
276
|
+
|
|
277
|
+
## 异步对话导出
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
soke-cli ai-training +export-conversations --scenario-id <id> --format xlsx
|
|
281
|
+
soke-cli ai-training +export-conversations --scenario-id <id> --format xlsx --wait --timeout 300 --output exports/conversations.xlsx
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
导出固定 `include_dialogue=true`,格式仅支持 XLSX。`--wait` 与 `--output` 必须同时出现;等待完成后只接受 HTTPS 签名 URL,拒绝重定向、绝对路径、目录穿越和符号链接,使用 `.part` 文件原子替换,下载签名域名不发送 CLI Authorization。
|
|
285
|
+
|
|
286
|
+
## 训练路径和资产角色
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
soke-cli ai-training +create-training-path --name "新人训练" --stages-file stages.json
|
|
290
|
+
soke-cli ai-training +list-asset-roles --page 1 --page-size 20 --keyword "客户"
|
|
291
|
+
soke-cli ai-training +create-asset-role --request-file role.json
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
训练路径在服务端以单事务创建元数据、阶段和内容引用;stages 与角色请求不得包含 `corp_id`、`created_by`、`source_type` 等服务端归属字段。成功写入后应立即使用详情/列表命令回读验收。
|
|
@@ -46,7 +46,9 @@ tags: [课程管理, 流程编排, 发布管理]
|
|
|
46
46
|
| publish(发布/上线/定时发布) | Phase 4(指派后最后一步,仅明确 E1 执行) |
|
|
47
47
|
| query(进度/完成率/谁学了/作业提交) | Phase 5 |
|
|
48
48
|
| maintain(关闭/删除/复制/模板) | Phase 5 维护 |
|
|
49
|
-
| category
|
|
49
|
+
| category(分类查询/创建/更新/删除) | read/write subs/category |
|
|
50
|
+
|
|
51
|
+
分类维护:查询使用 `course +category-detail` 或 `course +list-categories`;创建、更新、删除前必须确认目标分类和父路径。写操作分别使用 `+category-create`、`+category-update`、`+category-delete`,删除遇到 `delete_error` 时展示接口返回的课程列表并停止后续删除。
|
|
50
52
|
|
|
51
53
|
上下文规则:有 course-id → 当前课程操作,不新建;学习统计未指定课程 → 先列出已发布线上课前 20 个并在表格下方提示「回复「搜索 XX」可模糊匹配;"下一页"翻页(当前仅 1 页)。」,用户选定后再查统计;有文件附件 → 倾向课件;歧义 → 弹窗列可能操作;**显式调用本技能且意图不明或与课程无关 → 默认走创建/上传主流程(1.2 提示输入标题→三问弹窗),不展开无关话题**;含明确他意图(查询/发布/指派/设置/维护)→ 对应 Phase。案例库见 [`references/intent-cases.md`](./references/intent-cases.md)。
|
|
52
54
|
|
|
@@ -55,6 +55,12 @@ list: `--keyword` `--category-path`(分类筛选,**不是 --category-id**) `--
|
|
|
55
55
|
### +list-categories
|
|
56
56
|
`--page` `--page-size`(max 100)。当前事实表未确认 `--parent-id`/`--level`,不得直接使用;如需末级分类,先按返回的 parent_id/level 递归查询或执行 --help 实测后补录。
|
|
57
57
|
|
|
58
|
+
### 课程分类维护
|
|
59
|
+
`+category-detail --category-id`:查询分类详情。
|
|
60
|
+
`+category-create --title --path`:创建分类;`--path` 为父分类路径 UUID,多个用英文逗号分隔。可选 `--unify-perm`、`--modify-unify-perm`、`--visible-type`、`--type`、`--weight`。
|
|
61
|
+
`+category-update --category-id --title --path`:更新分类;可选 `--old-title`、`--old-path` 以及上述权限、可见范围和排序字段。
|
|
62
|
+
`+category-delete --category-id`:删除分类。删除前应确认分类下没有课程;接口返回 `code=delete_error` 时保留并展示 `data` 中的阻止删除课程列表。
|
|
63
|
+
|
|
58
64
|
### +lesson-create 创建课件
|
|
59
65
|
`--course-id`(必填) `--title` `--type` video/audio/photo_gallery/document/exam
|
|
60
66
|
非 exam:`--media-id`(素材UUID,**不是 --uuid**) `--filename` `--ext` `--filesize` `--object` `--length`(秒,**不是 --duration**)
|
|
@@ -28,6 +28,7 @@ metadata:
|
|
|
28
28
|
| `soke-cli supervisor +create-scenario` | 创建督导场景草稿 |
|
|
29
29
|
| `soke-cli supervisor +list-scoring-criteria` | 查询评分标准模板 |
|
|
30
30
|
| `soke-cli supervisor +update-scenario` | 更新场景信息并设置评分标准 |
|
|
31
|
+
| `soke-cli supervisor +edit-scenario-criteria` | 在内存中交互式新增/删除评分维度,确认后一次性提交完整配置 |
|
|
31
32
|
| `soke-cli supervisor +list-assigns` | 查询场景已有指派 |
|
|
32
33
|
| `soke-cli supervisor +list-department-children` | 查询可指派部门 |
|
|
33
34
|
| `soke-cli supervisor +list-department-members` | 查询部门成员 |
|
|
@@ -66,6 +67,15 @@ soke-cli supervisor +list-scoring-criteria --page 1 --page-size 10 --pretty
|
|
|
66
67
|
|
|
67
68
|
选择模板时,保存 `data.list[].id` 和该模板的 `dimensions[]`。
|
|
68
69
|
|
|
70
|
+
如需在已有场景上补充或删除多个评分维度,使用内存交互编辑命令:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
soke-cli supervisor +edit-scenario-criteria \
|
|
74
|
+
--scenario-id "<scenario_id>"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
该命令会先读取场景详情,在当前进程内编辑完整 `dimensions` 数组,输入 `s` 后才调用现有全量更新接口;输入 `q`、Ctrl+C 或进程退出不会生成临时 JSON,也不会修改服务端。它不是后端单维度新增接口。
|
|
78
|
+
|
|
69
79
|
3. 更新场景和评分配置:
|
|
70
80
|
|
|
71
81
|
```bash
|