beautx-cli 1.0.9-beta.1 → 1.1.1-beta.2
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 +40 -26
- package/dist/{analyze-CtxR02Xr.mjs → analyze-Cq-Hmoqp.mjs} +5 -5
- package/dist/{api-BdaZkABF.mjs → api-jIGM86TK.mjs} +1 -1
- package/dist/{audio-DlgPatwd.mjs → audio-p2QCYFdq.mjs} +3 -3
- package/dist/beauty-plan-D9B8kaf-.mjs +51 -0
- package/dist/beauty-plan-reminder-D-gVCeWO.mjs +79 -0
- package/dist/capability-profile-DxrzExct.mjs +61 -0
- package/dist/cli.mjs +21 -19
- package/dist/{config-DICowNg_.mjs → config-V1amf6sh.mjs} +2 -2
- package/dist/{consultant-Det5PdFh.mjs → consultant-DZeIOYgS.mjs} +1 -1
- package/dist/{content-BOTX5RjP.mjs → content-CfzyDYSy.mjs} +2 -2
- package/dist/{current-aBOk-h5x.mjs → current-xqaZxhbN.mjs} +1 -1
- package/dist/{customer-Dr_mISml.mjs → customer-iWrGhESH.mjs} +1 -1
- package/dist/{deal-analysis-K0jAibrc.mjs → deal-analysis-Da8iNy64.mjs} +3 -3
- package/dist/detail-BnUTSlRa.mjs +44 -0
- package/dist/{doc-BuvQ5-m4.mjs → doc-_TnZLbtD.mjs} +3 -3
- package/dist/{fields-CiWGp1Uy.mjs → fields-F00auxKR.mjs} +3 -3
- package/dist/{focus-c7Sx7x3t.mjs → focus-DlptSJrZ.mjs} +1 -1
- package/dist/{get-ByeAOvme.mjs → get-BDXbs-_c.mjs} +2 -2
- package/dist/get-ByAQXto5.mjs +40 -0
- package/dist/golden-sentence-CwT4AyLu.mjs +11 -0
- package/dist/{kb-DsyLK84W.mjs → kb-CBj6tJE9.mjs} +2 -2
- package/dist/{list-CGDMjHuN.mjs → list-BGjT1Ovk.mjs} +14 -4
- package/dist/{list-Cq9rAt2i.mjs → list-Boz4Dr1p.mjs} +4 -4
- package/dist/{list-u0XN5Mv3.mjs → list-CB-bwmRO2.mjs} +4 -4
- package/dist/{list-DD5SDjF3.mjs → list-CQOLK3Xu.mjs} +4 -4
- package/dist/{list-D4gnORuG.mjs → list-CnsJlbrZ.mjs} +1 -1
- package/dist/{list-Bt87oTfo.mjs → list-Cnz5CuQB.mjs} +4 -4
- package/dist/{list-BPBUK6SR.mjs → list-D7_yNqIG.mjs} +1 -3
- package/dist/{list-CDhdZByU.mjs → list-DMFhAeTT.mjs} +4 -4
- package/dist/{list-BTsFZamG.mjs → list-DPVEnWni.mjs} +4 -4
- package/dist/{mcp-args-CG7OuBep.mjs → mcp-args-DK3IGaO1.mjs} +1 -1
- package/dist/{mcp-client-huLKHRT3.mjs → mcp-client-BTZH22b5.mjs} +3 -3
- package/dist/{mcp-result-BzDGJUdM.mjs → mcp-result-De_0PPlD.mjs} +1 -1
- package/dist/panke-DmzQyQHt.mjs +14 -0
- package/dist/{portrait-tags-DDfhu52n.mjs → portrait-tags-c7OW_KzT.mjs} +3 -3
- package/dist/{project-CFjWR38i.mjs → project-DeLeVoA3.mjs} +3 -3
- package/dist/project-access-Bf87OLJP.mjs +2 -0
- package/dist/{project-access-ChmJv4Z4.mjs → project-access-pTN7ry15.mjs} +2 -3
- package/dist/project-store-DDVZ7T4t.mjs +2 -0
- package/dist/{project-store-DUlIIW51.mjs → project-store-Dl35JzZr.mjs} +207 -2
- package/dist/{qa-BvSY8aGf.mjs → qa-DIZmvMwE.mjs} +5 -5
- package/dist/{resistance-BsDf3Ywa.mjs → resistance-CC4cxxUk.mjs} +1 -1
- package/dist/{search-Chnn4fM0.mjs → search-eIzMHyPL.mjs} +5 -5
- package/dist/staff-BVu2Hmu1.mjs +11 -0
- package/dist/{summary-BBOsN5T9.mjs → summary-CYLljvrY.mjs} +4 -4
- package/dist/task-Fa1R-6DI.mjs +40 -0
- package/dist/{text-CCxnry4V.mjs → text-BIIl7PmC.mjs} +4 -4
- package/dist/{use-DAcv-VQ0.mjs → use-DIjJeiXP.mjs} +2 -2
- package/dist/{visit-B70PkDSX.mjs → visit-D-HS1jjx.mjs} +2 -2
- package/dist/{visit-evaluate-CaO2KvPG.mjs → visit-evaluate-COKpVvhv.mjs} +3 -3
- package/dist/{visit-query-args-DW3qNnoL.mjs → visit-query-args-BsfU3CUz.mjs} +2 -2
- package/package.json +1 -1
- package/dist/beauty-plan-DNsCkUJY.mjs +0 -36
- package/dist/env-vars-osVxvm7z.mjs +0 -212
- package/dist/install-DQmxrW3j.mjs +0 -50
- package/dist/list-SIx70dm2.mjs +0 -77
- package/dist/project-access-D4b4oc5E.mjs +0 -2
- package/dist/project-store-DlbRmRAS.mjs +0 -2
- package/dist/skill-7jpFz8M3.mjs +0 -15
- package/dist/skill-client-DEbjlHcX.mjs +0 -146
- package/dist/upload-BSwTTmow.mjs +0 -76
- /package/dist/{util-BtgWHKWv.mjs → util-Bko-nm_R.mjs} +0 -0
package/README.md
CHANGED
|
@@ -57,27 +57,6 @@ beautx-cli project current
|
|
|
57
57
|
beautx-cli project use --project-id <项目ID>
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### Skill 中心
|
|
61
|
-
|
|
62
|
-
Skill 中心命令走 REST,并使用 Host 注入的沙箱双凭证鉴权。
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# 按 personal / tenant / project 分组列出当前项目可见的 Skill
|
|
66
|
-
beautx-cli skill list [--type <personal|tenant|project>] [--project-id <项目ID>]
|
|
67
|
-
|
|
68
|
-
# 按数字 ID 下载安装包;默认项目取当前激活项目
|
|
69
|
-
beautx-cli skill install <Skill ID> [--project-id <项目ID>] [--dir <安装目录>]
|
|
70
|
-
|
|
71
|
-
# 上传包含 SKILL.md 的 zip;默认新建 personal Skill
|
|
72
|
-
beautx-cli skill upload <zip路径> [--type <personal|tenant|project>] \
|
|
73
|
-
[--project-id <项目ID>] [--skill-id <已有Skill ID>] [--tags <JSON数组>]
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- `list` 省略 `--type` 时按归属分组;返回的雪花 ID 始终按字符串处理。
|
|
77
|
-
- `install` 默认写入 `SKILL_INSTALL_DIR`,未设置时写入 `/home/wuying/jvscrew/.wangai-cli/skills`,并校验 SHA-256 checksum。
|
|
78
|
-
- `upload` 内部一次完成申请上传、对象存储 PUT 和服务端确认;`type=project` 时必须传 `--project-id`。
|
|
79
|
-
- 三个子命令均支持 `--format toon|json|yaml`。
|
|
80
|
-
|
|
81
60
|
### 顾问管理
|
|
82
61
|
|
|
83
62
|
```bash
|
|
@@ -90,6 +69,8 @@ beautx-cli consultant list [--page <页码>] [--size <每页条数>]
|
|
|
90
69
|
```bash
|
|
91
70
|
# 列出客户
|
|
92
71
|
beautx-cli customer list [选项]
|
|
72
|
+
--customer-id <客户ID> # 单个 wang_id 精确匹配
|
|
73
|
+
--customer-ids <客户ID列表> # 多个 wang_id,逗号分隔
|
|
93
74
|
--user-id <顾问ID> # 过滤特定顾问的客户
|
|
94
75
|
--user-name <顾问名> # 顾问姓名模糊搜索
|
|
95
76
|
--customer-name <客户名> # 客户姓名模糊搜索
|
|
@@ -101,6 +82,33 @@ beautx-cli customer list [选项]
|
|
|
101
82
|
--size <每页条数> # 每页条数
|
|
102
83
|
```
|
|
103
84
|
|
|
85
|
+
### 员工能力
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
beautx-cli staff capability-profile [选项]
|
|
89
|
+
--staff-user-id <员工ID> # basic_staff.user_id,必填
|
|
90
|
+
--from <开始时间> # 可选,yyyy-MM-dd HH:mm:ss
|
|
91
|
+
--to <结束时间> # 可选,yyyy-MM-dd HH:mm:ss
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 盘客详情
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# 查询小美待盘客任务
|
|
98
|
+
beautx-cli panke task --panke-task-id <任务ID>
|
|
99
|
+
|
|
100
|
+
# 查询地产盘客 SOP
|
|
101
|
+
beautx-cli panke detail [选项]
|
|
102
|
+
--panke-id <盘客SOP ID> # 必填,不能使用待盘客任务ID代替
|
|
103
|
+
--include-transcript # 可选,查询录音原文
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 小美金句
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
beautx-cli golden-sentence get --golden-sentence-id <金句ID>
|
|
110
|
+
```
|
|
111
|
+
|
|
104
112
|
### 来访管理
|
|
105
113
|
|
|
106
114
|
```bash
|
|
@@ -153,6 +161,16 @@ beautx-cli visit-evaluate [选项]
|
|
|
153
161
|
|
|
154
162
|
# 查询变美计划
|
|
155
163
|
beautx-cli beauty-plan [选项]
|
|
164
|
+
--followup-report-id <计划ID>
|
|
165
|
+
--followup-report-ids <计划ID列表>
|
|
166
|
+
|
|
167
|
+
# 查询变美计划未及时发送提醒批次
|
|
168
|
+
beautx-cli beauty-plan-reminder [选项]
|
|
169
|
+
--project-id <项目ID>
|
|
170
|
+
--batch-id <批次ID>
|
|
171
|
+
--generated-date <生成日期 yyyy-MM-dd>
|
|
172
|
+
--from-date <起始日期 yyyy-MM-dd>
|
|
173
|
+
--to-date <结束日期 yyyy-MM-dd>
|
|
156
174
|
|
|
157
175
|
# 查询成交/未成交分析
|
|
158
176
|
beautx-cli deal-analysis [选项]
|
|
@@ -245,11 +263,9 @@ CLI 通过环境变量获取身份(由 QCA / Host 沙箱注入)。当前项
|
|
|
245
263
|
| --- | --- |
|
|
246
264
|
| ENV | `test` / `prod` |
|
|
247
265
|
| TENANT_ID / USER_ID | 租户、用户 |
|
|
248
|
-
| SANDBOX_TENANT_SECRET / SANDBOX_USER_SECRET | 沙箱双 secret
|
|
266
|
+
| SANDBOX_TENANT_SECRET / SANDBOX_USER_SECRET | 沙箱双 secret,用于向 `/out/v2/mcp-token` 借 AT |
|
|
249
267
|
| XB_APP_ID | 应用 ID(`aike` 时禁止 `project use`) |
|
|
250
268
|
| SESSION_ID | 可选;有则 MCP 请求带 `X-MCP-Session-Id` |
|
|
251
|
-
| SKILL_BFF_URL | 可选;覆盖当前环境内置的 Skill BFF 地址 |
|
|
252
|
-
| SKILL_INSTALL_DIR | 可选;覆盖 `skill install` 的安装根目录 |
|
|
253
269
|
|
|
254
270
|
- **MCP AT**:每次调用向 `{callbackBaseUrl}/api/qca-wangclaw/out/v2/mcp-token` 借用(进程内缓存)。
|
|
255
271
|
- **当前项目**:`GET/PUT /api/qca-wangclaw/out/v2/current-project`(`project current` / `project use`)。
|
|
@@ -261,7 +277,6 @@ CLI 通过环境变量获取身份(由 QCA / Host 沙箱注入)。当前项
|
|
|
261
277
|
|
|
262
278
|
```
|
|
263
279
|
beautx-cli → MCP Gateway → beautx-mcp-bff → wangai-mcp-application (beautx 端点)
|
|
264
|
-
↘ Skill BFF REST (`/api/wc-skill/out/**`)
|
|
265
280
|
```
|
|
266
281
|
|
|
267
282
|
- **beautx-cli**:TypeScript CLI 工具,发送 JSON-RPC 请求
|
|
@@ -285,7 +300,6 @@ src/
|
|
|
285
300
|
│ ├── resistance/ # 抗性点
|
|
286
301
|
│ ├── audio/ # 录音管理
|
|
287
302
|
│ ├── kb/ # 知识库
|
|
288
|
-
│ ├── skill/ # Skill 中心
|
|
289
303
|
│ ├── config/ # 配置查看
|
|
290
304
|
│ ├── qa.ts # SQL Agent
|
|
291
305
|
│ └── api.ts # 通用 API 调用
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as requireActiveProject } from "./project-store-
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
2
|
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
3
|
-
import { n as mcpCall } from "./mcp-client-
|
|
4
|
-
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-
|
|
5
|
-
import { n as writeMcpDataResult } from "./mcp-result-
|
|
6
|
-
import { t as csvToArray } from "./util-
|
|
3
|
+
import { n as mcpCall } from "./mcp-client-BTZH22b5.mjs";
|
|
4
|
+
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-DK3IGaO1.mjs";
|
|
5
|
+
import { n as writeMcpDataResult } from "./mcp-result-De_0PPlD.mjs";
|
|
6
|
+
import { t as csvToArray } from "./util-Bko-nm_R.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/audio/analyze.ts
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as writeError, r as writeResult, t as formatCliArg } from "./cli.mjs";
|
|
2
|
-
import { n as mcpCall, t as MCP_SERVICE_CODE } from "./mcp-client-
|
|
2
|
+
import { n as mcpCall, t as MCP_SERVICE_CODE } from "./mcp-client-BTZH22b5.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/commands/api.ts
|
|
5
5
|
/**
|
|
@@ -6,9 +6,9 @@ var audio_default = defineCommand({
|
|
|
6
6
|
description: "录音元数据分页 / 单条文本查询 / 全文批量分析"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
text: () => import("./text-
|
|
11
|
-
analyze: () => import("./analyze-
|
|
9
|
+
list: () => import("./list-Cnz5CuQB.mjs").then((m) => m.default),
|
|
10
|
+
text: () => import("./text-BIIl7PmC.mjs").then((m) => m.default),
|
|
11
|
+
analyze: () => import("./analyze-Cq-Hmoqp.mjs").then((m) => m.default)
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
|
+
import { n as writeError } from "./cli.mjs";
|
|
3
|
+
import { t as mcpCallPage } from "./mcp-result-De_0PPlD.mjs";
|
|
4
|
+
import { n as mergeIds, t as csvToArray } from "./util-Bko-nm_R.mjs";
|
|
5
|
+
import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-BsfU3CUz.mjs";
|
|
6
|
+
import { defineCommand } from "citty";
|
|
7
|
+
//#region src/commands/beauty-plan/index.ts
|
|
8
|
+
/**
|
|
9
|
+
* `beautx-cli beauty-plan` — page beautx beauty plans via MCP gateway.
|
|
10
|
+
*/
|
|
11
|
+
function buildBeautyPlanArgs(args, active) {
|
|
12
|
+
return buildVisitBatchQueryArgs(args, active, {
|
|
13
|
+
followup_report_ids: mergeIds(args["followup-report-id"], csvToArray(args["followup-report-ids"])),
|
|
14
|
+
latest_only: args["latest-only"]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
var beauty_plan_default = defineCommand({
|
|
18
|
+
meta: {
|
|
19
|
+
name: "beauty-plan",
|
|
20
|
+
description: "医美变美计划分页查询"
|
|
21
|
+
},
|
|
22
|
+
args: {
|
|
23
|
+
...visitBatchQueryCliArgs,
|
|
24
|
+
"followup-report-id": {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "单个变美计划/跟进报告 ID(会转为 MCP followup_report_ids)"
|
|
27
|
+
},
|
|
28
|
+
"followup-report-ids": {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "变美计划/跟进报告 ID CSV → MCP followup_report_ids"
|
|
31
|
+
},
|
|
32
|
+
"latest-only": {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
description: "按客户查询时是否只返回最近一次;不传则使用后端默认 true"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
async run({ args }) {
|
|
38
|
+
try {
|
|
39
|
+
await mcpCallPage("beauty-plan", buildBeautyPlanArgs(args, await requireActiveProject()), args.format, {
|
|
40
|
+
itemsKey: "beautyPlans",
|
|
41
|
+
defaultPage: Number(args.page),
|
|
42
|
+
defaultSize: Number(args.size)
|
|
43
|
+
});
|
|
44
|
+
} catch (err) {
|
|
45
|
+
writeError(err, args.format);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { beauty_plan_default as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
|
+
import { n as writeError } from "./cli.mjs";
|
|
3
|
+
import { t as mcpCallPage } from "./mcp-result-De_0PPlD.mjs";
|
|
4
|
+
import { defineCommand } from "citty";
|
|
5
|
+
//#region src/commands/beauty-plan-reminder/index.ts
|
|
6
|
+
/**
|
|
7
|
+
* `beautx-cli beauty-plan-reminder` — query unsent beauty-plan reminder batches.
|
|
8
|
+
*/
|
|
9
|
+
var beauty_plan_reminder_default = defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "beauty-plan-reminder",
|
|
12
|
+
description: "查询变美计划未及时发送提醒批次"
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
"project-id": {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "项目 ID;默认取当前激活项目"
|
|
18
|
+
},
|
|
19
|
+
"batch-id": {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "提醒批次 ID,可选"
|
|
22
|
+
},
|
|
23
|
+
"generated-date": {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "生成日期 yyyy-MM-dd,可选"
|
|
26
|
+
},
|
|
27
|
+
"from-date": {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "起始生成日期 yyyy-MM-dd,可选"
|
|
30
|
+
},
|
|
31
|
+
"to-date": {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "结束生成日期 yyyy-MM-dd,可选"
|
|
34
|
+
},
|
|
35
|
+
"only-unsent": {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
description: "是否只返回未发送明细,默认 true"
|
|
38
|
+
},
|
|
39
|
+
page: {
|
|
40
|
+
type: "string",
|
|
41
|
+
default: "1",
|
|
42
|
+
description: "页码,从 1 开始"
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
type: "string",
|
|
46
|
+
default: "10",
|
|
47
|
+
description: "每页条数,最大 100"
|
|
48
|
+
},
|
|
49
|
+
format: {
|
|
50
|
+
type: "string",
|
|
51
|
+
default: "table",
|
|
52
|
+
description: "输出格式"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
async run({ args }) {
|
|
56
|
+
try {
|
|
57
|
+
const active = await requireActiveProject();
|
|
58
|
+
await mcpCallPage("beauty-plan-reminder", {
|
|
59
|
+
project_id: args["project-id"] || active.projectId,
|
|
60
|
+
batch_id: args["batch-id"],
|
|
61
|
+
generated_date: args["generated-date"],
|
|
62
|
+
from_date: args["from-date"],
|
|
63
|
+
to_date: args["to-date"],
|
|
64
|
+
only_unsent: args["only-unsent"] ?? true,
|
|
65
|
+
page: Number(args.page),
|
|
66
|
+
size: Number(args.size)
|
|
67
|
+
}, args.format, {
|
|
68
|
+
itemsKey: "batches",
|
|
69
|
+
defaultPage: Number(args.page),
|
|
70
|
+
defaultSize: Number(args.size)
|
|
71
|
+
});
|
|
72
|
+
} catch (err) {
|
|
73
|
+
writeError(err, args.format);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { beauty_plan_reminder_default as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
|
+
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
3
|
+
import { n as mcpCall } from "./mcp-client-BTZH22b5.mjs";
|
|
4
|
+
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-DK3IGaO1.mjs";
|
|
5
|
+
import { n as writeMcpDataResult } from "./mcp-result-De_0PPlD.mjs";
|
|
6
|
+
import { i as toLocalDateTime } from "./util-Bko-nm_R.mjs";
|
|
7
|
+
import { defineCommand } from "citty";
|
|
8
|
+
//#region src/commands/staff/capability-profile.ts
|
|
9
|
+
function buildStaffCapabilityProfileArgs(args, active) {
|
|
10
|
+
const staffUserId = String(args["staff-user-id"] || "").trim();
|
|
11
|
+
if (!staffUserId) throw new Error("--staff-user-id is required");
|
|
12
|
+
const start = toLocalDateTime(args.from);
|
|
13
|
+
const end = toLocalDateTime(args.to);
|
|
14
|
+
return {
|
|
15
|
+
project_id: resolveProjectId(args["project-id"], active),
|
|
16
|
+
variables: {
|
|
17
|
+
staff_user_id: staffUserId,
|
|
18
|
+
...start ? { staff_metric_start_time: start } : {},
|
|
19
|
+
...end ? { staff_metric_end_time: end } : {}
|
|
20
|
+
},
|
|
21
|
+
...start || end ? { time_range: {
|
|
22
|
+
...start ? { start } : {},
|
|
23
|
+
...end ? { end } : {}
|
|
24
|
+
} } : {}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
var capability_profile_default = defineCommand({
|
|
28
|
+
meta: {
|
|
29
|
+
name: "capability-profile",
|
|
30
|
+
description: "查询指定员工的基础信息、能力指标与团队参考"
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
...projectIdCliArg,
|
|
34
|
+
"staff-user-id": {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "员工 basic_staff.user_id"
|
|
37
|
+
},
|
|
38
|
+
from: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "统计开始时间 yyyy-MM-dd HH:mm:ss"
|
|
41
|
+
},
|
|
42
|
+
to: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "统计结束时间 yyyy-MM-dd HH:mm:ss"
|
|
45
|
+
},
|
|
46
|
+
format: formatCliArg
|
|
47
|
+
},
|
|
48
|
+
async run({ args }) {
|
|
49
|
+
try {
|
|
50
|
+
writeMcpDataResult(await mcpCall("staff-capability-profile", {
|
|
51
|
+
arguments: buildStaffCapabilityProfileArgs(args, await requireActiveProject()),
|
|
52
|
+
timeoutMs: 9e4
|
|
53
|
+
}), args.format);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
writeError(err, args.format);
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
//#endregion
|
|
61
|
+
export { capability_profile_default as default };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-YLnNgb9a.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { i as invalidateProjectAccessCache } from "./project-access-
|
|
5
|
-
import { o as loadActiveProject } from "./project-store-DUlIIW51.mjs";
|
|
3
|
+
import { C as MissingAccessTokenError, S as ConfigInvalidError, _ as readEnv, b as syncProcessEnv, g as readCredentials, h as needsRefresh, m as isTokenExpired, o as loadActiveProject, u as ENV_KEYS, v as requireUserId, x as AccessTokenExpiredError, y as resolveEndpoints } from "./project-store-Dl35JzZr.mjs";
|
|
4
|
+
import { i as invalidateProjectAccessCache } from "./project-access-pTN7ry15.mjs";
|
|
6
5
|
import { appendFileSync, mkdirSync, readFileSync } from "node:fs";
|
|
7
6
|
import { dirname, join } from "node:path";
|
|
8
7
|
import { fileURLToPath } from "node:url";
|
|
@@ -7636,22 +7635,25 @@ runMain(defineCommand({
|
|
|
7636
7635
|
}
|
|
7637
7636
|
},
|
|
7638
7637
|
subCommands: {
|
|
7639
|
-
config: () => import("./config-
|
|
7640
|
-
project: () => import("./project-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
"
|
|
7649
|
-
"
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7638
|
+
config: () => import("./config-V1amf6sh.mjs").then((m) => m.default),
|
|
7639
|
+
project: () => import("./project-DeLeVoA3.mjs").then((m) => m.default),
|
|
7640
|
+
consultant: () => import("./consultant-DZeIOYgS.mjs").then((m) => m.default),
|
|
7641
|
+
staff: () => import("./staff-BVu2Hmu1.mjs").then((m) => m.default),
|
|
7642
|
+
"golden-sentence": () => import("./golden-sentence-CwT4AyLu.mjs").then((m) => m.default),
|
|
7643
|
+
panke: () => import("./panke-DmzQyQHt.mjs").then((m) => m.default),
|
|
7644
|
+
audio: () => import("./audio-p2QCYFdq.mjs").then((m) => m.default),
|
|
7645
|
+
customer: () => import("./customer-iWrGhESH.mjs").then((m) => m.default),
|
|
7646
|
+
visit: () => import("./visit-D-HS1jjx.mjs").then((m) => m.default),
|
|
7647
|
+
"visit-evaluate": () => import("./visit-evaluate-COKpVvhv.mjs").then((m) => m.default),
|
|
7648
|
+
"beauty-plan": () => import("./beauty-plan-D9B8kaf-.mjs").then((m) => m.default),
|
|
7649
|
+
"beauty-plan-reminder": () => import("./beauty-plan-reminder-D-gVCeWO.mjs").then((m) => m.default),
|
|
7650
|
+
"deal-analysis": () => import("./deal-analysis-Da8iNy64.mjs").then((m) => m.default),
|
|
7651
|
+
"portrait-tags": () => import("./portrait-tags-c7OW_KzT.mjs").then((m) => m.default),
|
|
7652
|
+
focus: () => import("./focus-DlptSJrZ.mjs").then((m) => m.default),
|
|
7653
|
+
resistance: () => import("./resistance-CC4cxxUk.mjs").then((m) => m.default),
|
|
7654
|
+
qa: () => import("./qa-DIZmvMwE.mjs").then((m) => m.default),
|
|
7655
|
+
kb: () => import("./kb-CBj6tJE9.mjs").then((m) => m.default)
|
|
7654
7656
|
}
|
|
7655
7657
|
}));
|
|
7656
7658
|
//#endregion
|
|
7657
|
-
export { debugLogInfo as a, runPreflight as c,
|
|
7659
|
+
export { debugLogInfo as a, runPreflight as c, debugLogError as i, ensureAuth as l, writeError as n, debugLogPath as o, writeResult as r, isVerboseDebugEnabled as s, formatCliArg as t };
|
|
@@ -6,9 +6,9 @@ var config_default = defineCommand({
|
|
|
6
6
|
description: "沙箱配置:list 只读诊断;doctor 自检;fields 客户字段字典"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
9
|
+
list: () => import("./list-D7_yNqIG.mjs").then((m) => m.default),
|
|
10
10
|
doctor: () => import("./doctor-DuGxP40X.mjs").then((m) => m.default),
|
|
11
|
-
fields: () => import("./fields-
|
|
11
|
+
fields: () => import("./fields-F00auxKR.mjs").then((m) => m.default)
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
@@ -5,7 +5,7 @@ var consultant_default = defineCommand({
|
|
|
5
5
|
name: "consultant",
|
|
6
6
|
description: "查询有权限的顾问列表"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-DPVEnWni.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { consultant_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
2
|
-
import { n as mcpCall } from "./mcp-client-
|
|
3
|
-
import { n as writeMcpDataResult } from "./mcp-result-
|
|
2
|
+
import { n as mcpCall } from "./mcp-client-BTZH22b5.mjs";
|
|
3
|
+
import { n as writeMcpDataResult } from "./mcp-result-De_0PPlD.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/commands/kb/doc/content.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as requireActiveProject } from "./project-store-
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
2
|
import { n as writeError, r as writeResult, t as formatCliArg } from "./cli.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/commands/project/current.ts
|
|
@@ -5,7 +5,7 @@ var customer_default = defineCommand({
|
|
|
5
5
|
name: "customer",
|
|
6
6
|
description: "客户画像分页查询"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-BGjT1Ovk.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { customer_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as requireActiveProject } from "./project-store-
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
2
|
import { n as writeError } from "./cli.mjs";
|
|
3
|
-
import { t as mcpCallPage } from "./mcp-result-
|
|
4
|
-
import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-
|
|
3
|
+
import { t as mcpCallPage } from "./mcp-result-De_0PPlD.mjs";
|
|
4
|
+
import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-BsfU3CUz.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
//#region src/commands/deal-analysis/index.ts
|
|
7
7
|
/**
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
|
+
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
3
|
+
import { n as mcpCall } from "./mcp-client-BTZH22b5.mjs";
|
|
4
|
+
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-DK3IGaO1.mjs";
|
|
5
|
+
import { n as writeMcpDataResult } from "./mcp-result-De_0PPlD.mjs";
|
|
6
|
+
import { defineCommand } from "citty";
|
|
7
|
+
//#region src/commands/panke/detail.ts
|
|
8
|
+
function buildPankeDetailArgs(args, active) {
|
|
9
|
+
const pankeId = String(args["panke-id"] || "").trim();
|
|
10
|
+
if (!/^[1-9]\d*$/.test(pankeId)) throw new Error("--panke-id must be a positive SOP ID");
|
|
11
|
+
return {
|
|
12
|
+
project_id: resolveProjectId(args["project-id"], active),
|
|
13
|
+
panke_id: pankeId,
|
|
14
|
+
include_transcript: args["include-transcript"] === true
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
var detail_default = defineCommand({
|
|
18
|
+
meta: {
|
|
19
|
+
name: "detail",
|
|
20
|
+
description: "按盘客 SOP ID 查询盘客详情"
|
|
21
|
+
},
|
|
22
|
+
args: {
|
|
23
|
+
...projectIdCliArg,
|
|
24
|
+
"panke-id": {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "盘客 SOP ID,不能传任务 ID 或事件记录 ID"
|
|
27
|
+
},
|
|
28
|
+
"include-transcript": {
|
|
29
|
+
type: "boolean",
|
|
30
|
+
description: "包含录音原文;默认不查询"
|
|
31
|
+
},
|
|
32
|
+
format: formatCliArg
|
|
33
|
+
},
|
|
34
|
+
async run({ args }) {
|
|
35
|
+
try {
|
|
36
|
+
writeMcpDataResult(await mcpCall("panke-detail", { arguments: buildPankeDetailArgs(args, await requireActiveProject()) }), args.format);
|
|
37
|
+
} catch (err) {
|
|
38
|
+
writeError(err, args.format);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
export { detail_default as default };
|
|
@@ -6,9 +6,9 @@ var doc_default = defineCommand({
|
|
|
6
6
|
description: "知识库文档列表 / 元数据 / 全文"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
get: () => import("./get-
|
|
11
|
-
content: () => import("./content-
|
|
9
|
+
list: () => import("./list-DMFhAeTT.mjs").then((m) => m.default),
|
|
10
|
+
get: () => import("./get-BDXbs-_c.mjs").then((m) => m.default),
|
|
11
|
+
content: () => import("./content-CfzyDYSy.mjs").then((m) => m.default)
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as requireActiveProject } from "./project-store-
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
2
|
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
3
|
-
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-
|
|
4
|
-
import { t as mcpCallPage } from "./mcp-result-
|
|
3
|
+
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-DK3IGaO1.mjs";
|
|
4
|
+
import { t as mcpCallPage } from "./mcp-result-De_0PPlD.mjs";
|
|
5
5
|
import { defineCommand } from "citty";
|
|
6
6
|
//#region src/commands/config/fields.ts
|
|
7
7
|
/**
|
|
@@ -5,7 +5,7 @@ var focus_default = defineCommand({
|
|
|
5
5
|
name: "focus",
|
|
6
6
|
description: "客户关注点标签分页查询"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-Boz4Dr1p.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { focus_default as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
2
|
-
import { n as mcpCall } from "./mcp-client-
|
|
3
|
-
import { n as writeMcpDataResult } from "./mcp-result-
|
|
2
|
+
import { n as mcpCall } from "./mcp-client-BTZH22b5.mjs";
|
|
3
|
+
import { n as writeMcpDataResult } from "./mcp-result-De_0PPlD.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/commands/kb/doc/get.ts
|
|
6
6
|
/**
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
|
|
2
|
+
import { n as writeError, t as formatCliArg } from "./cli.mjs";
|
|
3
|
+
import { n as mcpCall } from "./mcp-client-BTZH22b5.mjs";
|
|
4
|
+
import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-DK3IGaO1.mjs";
|
|
5
|
+
import { n as writeMcpDataResult } from "./mcp-result-De_0PPlD.mjs";
|
|
6
|
+
import { defineCommand } from "citty";
|
|
7
|
+
//#region src/commands/golden-sentence/get.ts
|
|
8
|
+
function buildGoldenSentenceGetArgs(args, active) {
|
|
9
|
+
const goldenSentenceId = String(args["golden-sentence-id"] || "").trim();
|
|
10
|
+
if (!/^[1-9]\d*$/.test(goldenSentenceId)) throw new Error("--golden-sentence-id must be a positive quote ID");
|
|
11
|
+
return {
|
|
12
|
+
project_id: resolveProjectId(args["project-id"], active),
|
|
13
|
+
golden_sentence_id: goldenSentenceId
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var get_default = defineCommand({
|
|
17
|
+
meta: {
|
|
18
|
+
name: "get",
|
|
19
|
+
description: "按小美金句 ID 查询金句详情"
|
|
20
|
+
},
|
|
21
|
+
args: {
|
|
22
|
+
...projectIdCliArg,
|
|
23
|
+
"golden-sentence-id": {
|
|
24
|
+
type: "string",
|
|
25
|
+
required: true,
|
|
26
|
+
description: "小美金句广场返回的金句 ID"
|
|
27
|
+
},
|
|
28
|
+
format: formatCliArg
|
|
29
|
+
},
|
|
30
|
+
async run({ args }) {
|
|
31
|
+
try {
|
|
32
|
+
writeMcpDataResult(await mcpCall("golden-sentence-get", { arguments: buildGoldenSentenceGetArgs(args, await requireActiveProject()) }), args.format);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
writeError(err, args.format);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { get_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
//#region src/commands/golden-sentence/index.ts
|
|
3
|
+
var golden_sentence_default = defineCommand({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "golden-sentence",
|
|
6
|
+
description: "小美金句查询"
|
|
7
|
+
},
|
|
8
|
+
subCommands: { get: () => import("./get-ByAQXto5.mjs").then((m) => m.default) }
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { golden_sentence_default as default };
|
|
@@ -6,8 +6,8 @@ var kb_default = defineCommand({
|
|
|
6
6
|
description: "知识库检索与文档查询"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
search: () => import("./search-
|
|
10
|
-
doc: () => import("./doc-
|
|
9
|
+
search: () => import("./search-eIzMHyPL.mjs").then((m) => m.default),
|
|
10
|
+
doc: () => import("./doc-_TnZLbtD.mjs").then((m) => m.default)
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|