@kriston-ai/kst-im-cli 0.0.13 → 0.0.14
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 +15 -0
- package/dist/index.js +79 -79
- package/package.json +1 -1
- package/skills/kst-im-cli/SKILL.md +16 -1
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ kst-im-cli stats basic-board web --period today --sites 118501,118503
|
|
|
40
40
|
kst-im-cli history schema
|
|
41
41
|
kst-im-cli history web --start "2026-06-01 00:00:00" --end "2026-06-03 23:59:59"
|
|
42
42
|
kst-im-cli history channel --start "2026-06-01 00:00:00" --end "2026-06-03 23:59:59"
|
|
43
|
+
kst-im-cli history context --rec-id 100 --source web
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
## 命令列表
|
|
@@ -63,6 +64,7 @@ kst-im-cli history channel --start "2026-06-01 00:00:00" --end "2026-06-03 23:59
|
|
|
63
64
|
| `history schema` | 历史记录字段说明 |
|
|
64
65
|
| `history web --start <time> --end <time>` | 查询网页历史会话 |
|
|
65
66
|
| `history channel --start <time> --end <time>` | 查询渠道历史会话 |
|
|
67
|
+
| `history context --rec-id <id> --source web\|channel` | 查询对话上下文(优先临时表,无数据查历史表) |
|
|
66
68
|
|
|
67
69
|
## 输出格式
|
|
68
70
|
|
|
@@ -104,6 +106,19 @@ kst-im-cli history web \
|
|
|
104
106
|
- `--page-size` 最大 1000,大范围查询请分页
|
|
105
107
|
- 时间格式固定为 `yyyy-MM-dd HH:mm:ss`
|
|
106
108
|
|
|
109
|
+
### Agent 下一句话术
|
|
110
|
+
|
|
111
|
+
当用户在 Agent 中询问“下一句怎么聊”,并提供当前对话的 `recId` 和来源时,调用:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
kst-im-cli history context --rec-id <recId> --source web
|
|
115
|
+
kst-im-cli history context --rec-id <recId> --source channel
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
该命令返回按时间升序排列的对话记录。网页来源先查询 `online.TD_DIALOGRECORD`,无数据时查询 `ONLINEHD.OC_HDVISITORINFO` 校验会话并读取历史消息;渠道来源先查询 `ks_wechat_td.wx_dialogrecord`,无数据时查询 `ks_wechat_hd.wx_dialogrecordhis`。两者均只返回 `recType` 为 `1`、`2`、`5` 的访客、客服和机器人记录,不支持 SDK 来源。
|
|
119
|
+
|
|
120
|
+
Agent 可以结合用户额外提供的当前身份描述,基于 `.data.records` 生成 1 至 3 句合适的话术;接口本身只提供对话上下文,不生成话术。
|
|
121
|
+
|
|
107
122
|
## 配置
|
|
108
123
|
|
|
109
124
|
配置文件位于 `~/.config/.kst-im-cli/config.json`,可通过环境变量 `KST_IM_CLI_CONFIG_DIR` 覆盖路径。
|