beautx-cli 1.1.2 → 1.1.3-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.
Files changed (63) hide show
  1. package/README.md +32 -0
  2. package/dist/{analyze-CtxR02Xr.mjs → analyze-PZSftVRy.mjs} +2 -2
  3. package/dist/{api-BdaZkABF.mjs → api-OsRaVcN_.mjs} +1 -1
  4. package/dist/{audio-DlgPatwd.mjs → audio-DPKPiEJG.mjs} +3 -3
  5. package/dist/{beauty-plan-BMR3QbZr.mjs → beauty-plan-BmUkArq4.mjs} +2 -2
  6. package/dist/{beauty-plan-reminder-B7g7RRTs.mjs → beauty-plan-reminder-kSWXwZl3.mjs} +1 -1
  7. package/dist/beauty-plan-update-BYgoZcvH.mjs +82 -0
  8. package/dist/{capability-profile-VWZEzTJY.mjs → capability-profile-DSLAL4KK.mjs} +4 -4
  9. package/dist/cli.mjs +21 -20
  10. package/dist/{config-BjsUQ9I-.mjs → config-qd1uakw6.mjs} +3 -3
  11. package/dist/{consultant-vVraua0_.mjs → consultant-DO0uhSKb.mjs} +1 -1
  12. package/dist/{content-xCdbfOej.mjs → content-Dk03AM4a.mjs} +2 -2
  13. package/dist/{customer-CnAv26d0.mjs → customer-B-r0bmYL.mjs} +1 -1
  14. package/dist/{deal-analysis-CX4IXbgk.mjs → deal-analysis-COsk1PZj.mjs} +2 -2
  15. package/dist/deal-capability-C6gTS7wK.mjs +55 -0
  16. package/dist/{doc-CpxcsKNE.mjs → doc-BLmIGlOL.mjs} +3 -3
  17. package/dist/{fields-DuAxLfSA.mjs → fields-bBcQS6XM.mjs} +1 -1
  18. package/dist/{focus-Dx1rT6QE.mjs → focus-G2DzsOLk.mjs} +1 -1
  19. package/dist/{get-6FB0egS_.mjs → get-Cd-ylX7S.mjs} +2 -2
  20. package/dist/{get-CCpn3m06.mjs → get-wmY4deIj.mjs} +2 -2
  21. package/dist/{golden-sentence-Ds-iQpH9.mjs → golden-sentence-pTlimrQk.mjs} +2 -2
  22. package/dist/{install-7SB-izr2.mjs → install-DiY2rfRy.mjs} +1 -1
  23. package/dist/{kb-rsFJm8cU.mjs → kb-BBOdcKV5.mjs} +2 -2
  24. package/dist/{list-Cc0bsWKY.mjs → list-BJdkwPws.mjs} +1 -1
  25. package/dist/{list-CK5ypPMU.mjs → list-Bmn23TpF.mjs} +1 -1
  26. package/dist/{list-7ynSCgKJ.mjs → list-C09FZsnT.mjs} +2 -2
  27. package/dist/{list-CuJXGJvc.mjs → list-CFvv5Huk.mjs} +1 -1
  28. package/dist/{list-CXbqmTos.mjs → list-CtGAMxsg.mjs} +1 -1
  29. package/dist/{list-CwpxejCd.mjs → list-DKQ8KM53.mjs} +1 -1
  30. package/dist/{list-b6sDVcYT.mjs → list-DV2w6kuv.mjs} +2 -2
  31. package/dist/{list-D9JQwZD52.mjs → list-kJm0HaGb2.mjs} +1 -1
  32. package/dist/{list-Bt87oTfo.mjs → list-or-rtfXt.mjs} +1 -1
  33. package/dist/{list-7k2QD_SC2.mjs → list-rYqpx_f4.mjs} +1 -1
  34. package/dist/{list-Dttn4hHn.mjs → list-rlQRoQPY.mjs} +1 -1
  35. package/dist/{mcp-client-huLKHRT3.mjs → mcp-client-84jEvBDL.mjs} +13 -5
  36. package/dist/{mcp-result-BzDGJUdM.mjs → mcp-result-DVhN16CS.mjs} +1 -1
  37. package/dist/{panke-CO--Bv4n.mjs → panke-Dot_z7hl.mjs} +2 -2
  38. package/dist/permission-scope-DH1wsKZY.mjs +38 -0
  39. package/dist/{portrait-tags-CCo6uav8.mjs → portrait-tags-WS5r5Nin.mjs} +2 -2
  40. package/dist/{project-access-ChmJv4Z4.mjs → project-access-BF7O8oHm.mjs} +1 -1
  41. package/dist/project-access-NrM7rF9v.mjs +2 -0
  42. package/dist/{project-CYVCYuHU.mjs → project-kDo_-dje.mjs} +3 -3
  43. package/dist/{qa-DtxO4tZJ.mjs → qa-CDn3w1en.mjs} +2 -2
  44. package/dist/quality-inspection-BAFsvMQT.mjs +64 -0
  45. package/dist/{quantum-FmPay9zw.mjs → quantum-DqRAOpIj.mjs} +2 -2
  46. package/dist/{resistance-BCHM2VZk.mjs → resistance-DFEnkGf5.mjs} +1 -1
  47. package/dist/{search-J4V_W4T1.mjs → search-Db6wYZ0d.mjs} +2 -2
  48. package/dist/{skill-BF9S48yu.mjs → skill-C55dYtbq.mjs} +3 -3
  49. package/dist/staff-CrIV1SHI.mjs +16 -0
  50. package/dist/{summary-D4vO6NHy.mjs → summary-DJJhrMZy.mjs} +1 -1
  51. package/dist/{task-DlTk04im.mjs → task-9zvvum_9.mjs} +2 -2
  52. package/dist/{text-CCxnry4V.mjs → text-BhpK1WXa.mjs} +2 -2
  53. package/dist/{upload-CZDRAlaG.mjs → upload-D7fQAD6I.mjs} +1 -1
  54. package/dist/{use-CZ8xIPrB.mjs → use-Dipd3KHS.mjs} +1 -1
  55. package/dist/{visit-BsY4-f1r.mjs → visit-BTwOOnN1.mjs} +2 -2
  56. package/package.json +1 -1
  57. package/dist/project-access-D4b4oc5E.mjs +0 -2
  58. package/dist/staff-IytS68QG.mjs +0 -11
  59. /package/dist/{current-s-QVNZmV.mjs → current-DdEW2EWK.mjs} +0 -0
  60. /package/dist/{doctor-BuiUn2Zy.mjs → doctor-CYU_bSCY.mjs} +0 -0
  61. /package/dist/{list-6eMMquS2.mjs → list-BW75XLnR.mjs} +0 -0
  62. /package/dist/{skill-client-BfpXlgLz.mjs → skill-client-C4SOjFsN.mjs} +0 -0
  63. /package/dist/{visit-query-args-BVeYwlRt.mjs → visit-query-args-GjbcZpKM.mjs} +0 -0
package/README.md CHANGED
@@ -112,6 +112,29 @@ beautx-cli staff capability-profile [选项]
112
112
  --to <结束时间> # 可选,yyyy-MM-dd HH:mm:ss
113
113
  ```
114
114
 
115
+ `capability-profile` 的医美沟通质量包含个人平均总分、各维度平均分、团队平均分、有效样本数及配置可比状态。
116
+ 无数据不表示零分;配置或满分不可比时,不混算或排名。
117
+
118
+ ```bash
119
+ # 获取有权查看的员工,ID 保持字符串
120
+ beautx-cli staff permission-scope
121
+
122
+ # 接诊ID来自 visit list;历史接诊须指定覆盖接诊时间的范围
123
+ beautx-cli staff quality-inspection \
124
+ --staff-user-id <员工ID> --visit-id <接诊ID> \
125
+ --from "2026-10-01 00:00:00" --to "2026-11-01 00:00:00"
126
+ # 同一员工的多次接诊可用 --visit-ids <逗号分隔的接诊ID>,最多200个
127
+ # 返回 totalScore、maxScore、dimensions 和保存时的模型版本,不重新计算历史评分
128
+
129
+ # 周期成交能力:成交产出、单次成交效率、客户周期转化
130
+ beautx-cli staff deal-capability \
131
+ --staff-user-id <员工ID> \
132
+ --from "2026-10-01 00:00:00" --to "2026-10-31 23:59:59"
133
+ ```
134
+
135
+ 成交能力按自然日统计,包含结束日。返回周期总分、维度分和团队均分,周期得分不是接诊均分,
136
+ 团队均分也不是个人均分。未配置、无数据、部分可用等状态沿用服务端结果。
137
+
115
138
  ### 盘客详情
116
139
 
117
140
  ```bash
@@ -200,6 +223,15 @@ beautx-cli beauty-plan [选项]
200
223
  --followup-report-id <计划ID>
201
224
  --followup-report-ids <计划ID列表>
202
225
 
226
+ # 全量保存正文:先查询 followupReportId、revision,再提交完整有序章节
227
+ beautx-cli beauty-plan-update --plan-id 123 --expected-revision 3 --request-id save-001 \
228
+ --items '[{"report_tag":"护理建议","answer":"第一行正文。\n第二行正文。"}]'
229
+ # 长正文可用 --items @/path/chapters.json;章节名、数量、顺序均可修改,旧章节全部替换。
230
+ # 可选 --title 修改标题;不传保留标题。医生、复诊时间、展示样式及分享记录保持原值。
231
+ # 成功返回 planId、revision、updateTime;后续保存使用新 revision、新 request-id。
232
+ # 超时重试复用原 request-id 和完整参数;409 冲突须重新查询并合并内容。
233
+ # 仅接诊归属员工可保存,不会自动分享或完成发送待办。
234
+
203
235
  # 查询变美计划未及时发送提醒批次
204
236
  beautx-cli beauty-plan-reminder [选项]
205
237
  --project-id <项目ID>
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { t as csvToArray } from "./util-BtgWHKWv.mjs";
7
7
  import { defineCommand } from "citty";
8
8
  //#region src/commands/audio/analyze.ts
@@ -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-huLKHRT3.mjs";
2
+ import { n as mcpCall, t as MCP_SERVICE_CODE } from "./mcp-client-84jEvBDL.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-Bt87oTfo.mjs").then((m) => m.default),
10
- text: () => import("./text-CCxnry4V.mjs").then((m) => m.default),
11
- analyze: () => import("./analyze-CtxR02Xr.mjs").then((m) => m.default)
9
+ list: () => import("./list-or-rtfXt.mjs").then((m) => m.default),
10
+ text: () => import("./text-BhpK1WXa.mjs").then((m) => m.default),
11
+ analyze: () => import("./analyze-PZSftVRy.mjs").then((m) => m.default)
12
12
  }
13
13
  });
14
14
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError } from "./cli.mjs";
3
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
3
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
4
4
  import { n as mergeIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
5
- import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-BVeYwlRt.mjs";
5
+ import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-GjbcZpKM.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/beauty-plan/index.ts
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError } from "./cli.mjs";
3
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
3
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/commands/beauty-plan-reminder/index.ts
6
6
  /**
@@ -0,0 +1,82 @@
1
+ import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
+ import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
+ import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
+ import { defineCommand } from "citty";
7
+ import { readFile } from "node:fs/promises";
8
+ //#region src/commands/beauty-plan-update/index.ts
9
+ async function buildBeautyPlanUpdateArgs(args, active) {
10
+ const planId = args["plan-id"];
11
+ const rawRevision = args["expected-revision"];
12
+ const requestId = args["request-id"];
13
+ if (typeof planId !== "string" || !/^[1-9][0-9]*$/.test(planId) || BigInt(planId) > 9223372036854775807n) throw new Error("--plan-id 必须是有效的正整数 ID");
14
+ if (typeof rawRevision !== "string" || !/^[0-9]+$/.test(rawRevision) || !Number.isSafeInteger(Number(rawRevision))) throw new Error("--expected-revision 必须是查询返回的非负整数 revision");
15
+ if (typeof requestId !== "string" || !/^[A-Za-z0-9_-]{1,64}$/.test(requestId)) throw new Error("--request-id 必须为 1-64 位字母、数字、_ 或 -;重试时复用");
16
+ if (typeof args.items !== "string") throw new Error("--items 必填,支持 JSON 或 @文件");
17
+ const text = args.items.startsWith("@") ? await readFile(args.items.slice(1), "utf8") : args.items;
18
+ const items = JSON.parse(text);
19
+ if (!Array.isArray(items) || items.length === 0 || items.length > 100) throw new Error("--items 必须是完整章节数组,保留 1-100 个章节");
20
+ const chapters = items.map((item) => {
21
+ if (!item || typeof item !== "object") throw new Error("章节必须是对象");
22
+ const chapter = item;
23
+ if (typeof chapter.report_tag !== "string" || !chapter.report_tag.trim() || chapter.report_tag.length > 128 || typeof chapter.answer !== "string" || !chapter.answer.trim() || chapter.answer.length > 15e3) throw new Error("章节需要 report_tag(1-128 字符)和 answer(1-15000 字符)");
24
+ return {
25
+ report_tag: chapter.report_tag,
26
+ answer: chapter.answer
27
+ };
28
+ });
29
+ if (args.title !== void 0 && (typeof args.title !== "string" || !args.title.trim() || args.title.length > 128)) throw new Error("--title 必须为 1-128 个字符");
30
+ return {
31
+ project_id: resolveProjectId(args["project-id"], active),
32
+ plan_id: planId,
33
+ expected_revision: Number(rawRevision),
34
+ request_id: requestId,
35
+ ...args.title === void 0 ? {} : { title: args.title },
36
+ items: chapters
37
+ };
38
+ }
39
+ var beauty_plan_update_default = defineCommand({
40
+ meta: {
41
+ name: "beauty-plan-update",
42
+ description: "全量替换变美计划正文,保存不自动分享"
43
+ },
44
+ args: {
45
+ ...projectIdCliArg,
46
+ "plan-id": {
47
+ type: "string",
48
+ required: true,
49
+ description: "查询返回的 followupReportId"
50
+ },
51
+ "expected-revision": {
52
+ type: "string",
53
+ required: true,
54
+ description: "查询返回的 revision"
55
+ },
56
+ "request-id": {
57
+ type: "string",
58
+ required: true,
59
+ description: "保存请求标识,超时重试必须复用"
60
+ },
61
+ items: {
62
+ type: "string",
63
+ required: true,
64
+ description: "完整章节数组 JSON 或 @文件,旧章节全部替换"
65
+ },
66
+ title: {
67
+ type: "string",
68
+ description: "计划标题;不传保留原标题"
69
+ },
70
+ format: formatCliArg
71
+ },
72
+ async run({ args }) {
73
+ try {
74
+ writeMcpDataResult(await mcpCall("beauty-plan-update", { arguments: await buildBeautyPlanUpdateArgs(args, await requireActiveProject()) }), args.format);
75
+ } catch (err) {
76
+ writeError(err, args.format);
77
+ process.exit(1);
78
+ }
79
+ }
80
+ });
81
+ //#endregion
82
+ export { beauty_plan_update_default as default };
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { i as toLocalDateTime } from "./util-BtgWHKWv.mjs";
7
7
  import { defineCommand } from "citty";
8
8
  //#region src/commands/staff/capability-profile.ts
@@ -27,7 +27,7 @@ function buildStaffCapabilityProfileArgs(args, active) {
27
27
  var capability_profile_default = defineCommand({
28
28
  meta: {
29
29
  name: "capability-profile",
30
- description: "查询指定员工的基础信息、能力指标与团队参考"
30
+ description: "查询指定员工的基础信息、沟通质量平均分、维度平均分与团队参考"
31
31
  },
32
32
  args: {
33
33
  ...projectIdCliArg,
@@ -58,4 +58,4 @@ var capability_profile_default = defineCommand({
58
58
  }
59
59
  });
60
60
  //#endregion
61
- export { capability_profile_default as default };
61
+ export { buildStaffCapabilityProfileArgs, capability_profile_default as default };
package/dist/cli.mjs CHANGED
@@ -1,7 +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
3
  import { a as isTokenExpired, c as readEnv, d as syncProcessEnv, f as AccessTokenExpiredError, h as MissingAccessTokenError, l as requireUserId, o as needsRefresh, p as ConfigInvalidError, s as readCredentials, t as ENV_KEYS, u as resolveEndpoints } from "./env-vars-osVxvm7z.mjs";
4
- import { i as invalidateProjectAccessCache } from "./project-access-ChmJv4Z4.mjs";
4
+ import { i as invalidateProjectAccessCache } from "./project-access-BF7O8oHm.mjs";
5
5
  import { o as loadActiveProject } from "./project-store-DUlIIW51.mjs";
6
6
  import { appendFileSync, mkdirSync, readFileSync } from "node:fs";
7
7
  import { dirname, join } from "node:path";
@@ -7636,25 +7636,26 @@ runMain(defineCommand({
7636
7636
  }
7637
7637
  },
7638
7638
  subCommands: {
7639
- config: () => import("./config-BjsUQ9I-.mjs").then((m) => m.default),
7640
- project: () => import("./project-CYVCYuHU.mjs").then((m) => m.default),
7641
- skill: () => import("./skill-BF9S48yu.mjs").then((m) => m.default),
7642
- consultant: () => import("./consultant-vVraua0_.mjs").then((m) => m.default),
7643
- staff: () => import("./staff-IytS68QG.mjs").then((m) => m.default),
7644
- "golden-sentence": () => import("./golden-sentence-Ds-iQpH9.mjs").then((m) => m.default),
7645
- panke: () => import("./panke-CO--Bv4n.mjs").then((m) => m.default),
7646
- audio: () => import("./audio-DlgPatwd.mjs").then((m) => m.default),
7647
- customer: () => import("./customer-CnAv26d0.mjs").then((m) => m.default),
7648
- visit: () => import("./visit-BsY4-f1r.mjs").then((m) => m.default),
7649
- "beauty-plan": () => import("./beauty-plan-BMR3QbZr.mjs").then((m) => m.default),
7650
- "beauty-plan-reminder": () => import("./beauty-plan-reminder-B7g7RRTs.mjs").then((m) => m.default),
7651
- "deal-analysis": () => import("./deal-analysis-CX4IXbgk.mjs").then((m) => m.default),
7652
- "portrait-tags": () => import("./portrait-tags-CCo6uav8.mjs").then((m) => m.default),
7653
- quantum: () => import("./quantum-FmPay9zw.mjs").then((m) => m.default),
7654
- focus: () => import("./focus-Dx1rT6QE.mjs").then((m) => m.default),
7655
- resistance: () => import("./resistance-BCHM2VZk.mjs").then((m) => m.default),
7656
- qa: () => import("./qa-DtxO4tZJ.mjs").then((m) => m.default),
7657
- kb: () => import("./kb-rsFJm8cU.mjs").then((m) => m.default)
7639
+ config: () => import("./config-qd1uakw6.mjs").then((m) => m.default),
7640
+ project: () => import("./project-kDo_-dje.mjs").then((m) => m.default),
7641
+ skill: () => import("./skill-C55dYtbq.mjs").then((m) => m.default),
7642
+ consultant: () => import("./consultant-DO0uhSKb.mjs").then((m) => m.default),
7643
+ staff: () => import("./staff-CrIV1SHI.mjs").then((m) => m.default),
7644
+ "golden-sentence": () => import("./golden-sentence-pTlimrQk.mjs").then((m) => m.default),
7645
+ panke: () => import("./panke-Dot_z7hl.mjs").then((m) => m.default),
7646
+ audio: () => import("./audio-DPKPiEJG.mjs").then((m) => m.default),
7647
+ customer: () => import("./customer-B-r0bmYL.mjs").then((m) => m.default),
7648
+ visit: () => import("./visit-BTwOOnN1.mjs").then((m) => m.default),
7649
+ "beauty-plan": () => import("./beauty-plan-BmUkArq4.mjs").then((m) => m.default),
7650
+ "beauty-plan-update": () => import("./beauty-plan-update-BYgoZcvH.mjs").then((m) => m.default),
7651
+ "beauty-plan-reminder": () => import("./beauty-plan-reminder-kSWXwZl3.mjs").then((m) => m.default),
7652
+ "deal-analysis": () => import("./deal-analysis-COsk1PZj.mjs").then((m) => m.default),
7653
+ "portrait-tags": () => import("./portrait-tags-WS5r5Nin.mjs").then((m) => m.default),
7654
+ quantum: () => import("./quantum-DqRAOpIj.mjs").then((m) => m.default),
7655
+ focus: () => import("./focus-G2DzsOLk.mjs").then((m) => m.default),
7656
+ resistance: () => import("./resistance-DFEnkGf5.mjs").then((m) => m.default),
7657
+ qa: () => import("./qa-CDn3w1en.mjs").then((m) => m.default),
7658
+ kb: () => import("./kb-BBOdcKV5.mjs").then((m) => m.default)
7658
7659
  }
7659
7660
  }));
7660
7661
  //#endregion
@@ -6,9 +6,9 @@ var config_default = defineCommand({
6
6
  description: "沙箱配置:list 只读诊断;doctor 自检;fields 客户字段字典"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-6eMMquS2.mjs").then((m) => m.default),
10
- doctor: () => import("./doctor-BuiUn2Zy.mjs").then((m) => m.default),
11
- fields: () => import("./fields-DuAxLfSA.mjs").then((m) => m.default)
9
+ list: () => import("./list-BW75XLnR.mjs").then((m) => m.default),
10
+ doctor: () => import("./doctor-CYU_bSCY.mjs").then((m) => m.default),
11
+ fields: () => import("./fields-bBcQS6XM.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-7ynSCgKJ.mjs").then((m) => m.default) }
8
+ subCommands: { list: () => import("./list-C09FZsnT.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-huLKHRT3.mjs";
3
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
2
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
3
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/commands/kb/doc/content.ts
6
6
  /**
@@ -5,7 +5,7 @@ var customer_default = defineCommand({
5
5
  name: "customer",
6
6
  description: "客户画像分页查询"
7
7
  },
8
- subCommands: { list: () => import("./list-Dttn4hHn.mjs").then((m) => m.default) }
8
+ subCommands: { list: () => import("./list-rlQRoQPY.mjs").then((m) => m.default) }
9
9
  });
10
10
  //#endregion
11
11
  export { customer_default as default };
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError } from "./cli.mjs";
3
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
- import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-BVeYwlRt.mjs";
3
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
4
+ import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-GjbcZpKM.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/commands/deal-analysis/index.ts
7
7
  /**
@@ -0,0 +1,55 @@
1
+ import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
+ import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
+ import { t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
+ import { buildStaffCapabilityProfileArgs } from "./capability-profile-DSLAL4KK.mjs";
7
+ import { defineCommand } from "citty";
8
+ //#region src/commands/staff/deal-capability.ts
9
+ function buildStaffDealCapabilityArgs(args, active) {
10
+ const base = buildStaffCapabilityProfileArgs(args, active);
11
+ const variables = base.variables;
12
+ return {
13
+ ...base,
14
+ variables: {
15
+ staff_user_id: variables.staff_user_id,
16
+ ...variables.staff_metric_start_time ? { staff_deal_capability_start_date: variables.staff_metric_start_time } : {},
17
+ ...variables.staff_metric_end_time ? { staff_deal_capability_end_date: variables.staff_metric_end_time } : {}
18
+ }
19
+ };
20
+ }
21
+ var deal_capability_default = defineCommand({
22
+ meta: {
23
+ name: "deal-capability",
24
+ description: "查询员工周期成交能力总分、三个维度分与团队均分"
25
+ },
26
+ args: {
27
+ ...projectIdCliArg,
28
+ "staff-user-id": {
29
+ type: "string",
30
+ description: "员工ID,须在授权员工范围内"
31
+ },
32
+ from: {
33
+ type: "string",
34
+ description: "周期开始时间 yyyy-MM-dd HH:mm:ss,按自然日统计"
35
+ },
36
+ to: {
37
+ type: "string",
38
+ description: "周期结束时间 yyyy-MM-dd HH:mm:ss,包含结束日"
39
+ },
40
+ format: formatCliArg
41
+ },
42
+ async run({ args }) {
43
+ try {
44
+ writeMcpDataResult(await mcpCall("staff-deal-capability", {
45
+ arguments: buildStaffDealCapabilityArgs(args, await requireActiveProject()),
46
+ timeoutMs: 9e4
47
+ }), args.format);
48
+ } catch (err) {
49
+ writeError(err, args.format);
50
+ process.exit(1);
51
+ }
52
+ }
53
+ });
54
+ //#endregion
55
+ export { deal_capability_default as default };
@@ -6,9 +6,9 @@ var doc_default = defineCommand({
6
6
  description: "知识库文档列表 / 元数据 / 全文"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-b6sDVcYT.mjs").then((m) => m.default),
10
- get: () => import("./get-6FB0egS_.mjs").then((m) => m.default),
11
- content: () => import("./content-xCdbfOej.mjs").then((m) => m.default)
9
+ list: () => import("./list-DV2w6kuv.mjs").then((m) => m.default),
10
+ get: () => import("./get-Cd-ylX7S.mjs").then((m) => m.default),
11
+ content: () => import("./content-Dk03AM4a.mjs").then((m) => m.default)
12
12
  }
13
13
  });
14
14
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.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-Cc0bsWKY.mjs").then((m) => m.default) }
8
+ subCommands: { list: () => import("./list-BJdkwPws.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-huLKHRT3.mjs";
3
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
2
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
3
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
4
4
  import { defineCommand } from "citty";
5
5
  //#region src/commands/kb/doc/get.ts
6
6
  /**
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/golden-sentence/get.ts
8
8
  function buildGoldenSentenceGetArgs(args, active) {
@@ -6,8 +6,8 @@ var golden_sentence_default = defineCommand({
6
6
  description: "小美金句查询"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-CK5ypPMU.mjs").then((m) => m.default),
10
- get: () => import("./get-CCpn3m06.mjs").then((m) => m.default)
9
+ list: () => import("./list-Bmn23TpF.mjs").then((m) => m.default),
10
+ get: () => import("./get-wmY4deIj.mjs").then((m) => m.default)
11
11
  }
12
12
  });
13
13
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, r as writeResult, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { i as skillInstallGrant, r as resolveSkillInstallDir, t as downloadSkillPackage } from "./skill-client-BfpXlgLz.mjs";
4
+ import { i as skillInstallGrant, r as resolveSkillInstallDir, t as downloadSkillPackage } from "./skill-client-C4SOjFsN.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/commands/skill/install.ts
7
7
  /**
@@ -6,8 +6,8 @@ var kb_default = defineCommand({
6
6
  description: "知识库检索与文档查询"
7
7
  },
8
8
  subCommands: {
9
- search: () => import("./search-J4V_W4T1.mjs").then((m) => m.default),
10
- doc: () => import("./doc-CpxcsKNE.mjs").then((m) => m.default)
9
+ search: () => import("./search-Db6wYZ0d.mjs").then((m) => m.default),
10
+ doc: () => import("./doc-BLmIGlOL.mjs").then((m) => m.default)
11
11
  }
12
12
  });
13
13
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/focus/list.ts
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, n as mergeIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/golden-sentence/list.ts
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/consultant/list.ts
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, n as mergeIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/visit/list.ts
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, r as writeResult, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { a as skillList } from "./skill-client-BfpXlgLz.mjs";
4
+ import { a as skillList } from "./skill-client-C4SOjFsN.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/commands/skill/list.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
2
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
2
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  //#region src/commands/project/list.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { i as tenantIdCliArg, n as resolveProjectId, r as resolveTenantId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/kb/doc/list.ts
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/resistance/list.ts
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, r as mergeUserIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/audio/list.ts
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, n as mergeIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/panke/list.ts
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime, t as csvToArray } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/customer/list.ts
@@ -124,7 +124,7 @@ var McpGatewayError = class extends Error {
124
124
  * is attached as {@code X-MCP-Session-Id} so the MCP gateway can correlate the
125
125
  * originating session. Absent {@code SESSION_ID} → header omitted.
126
126
  */
127
- function buildMcpHttpHeaders(token) {
127
+ function buildMcpHttpHeaders(token, extra) {
128
128
  const headers = {
129
129
  Accept: "application/json, text/event-stream",
130
130
  "Content-Type": "application/json",
@@ -132,16 +132,24 @@ function buildMcpHttpHeaders(token) {
132
132
  };
133
133
  const sessionId = readEnv(ENV_KEYS.SESSION_ID)?.trim();
134
134
  if (sessionId) headers["X-MCP-Session-Id"] = sessionId;
135
+ if (extra) {
136
+ const existing = new Headers(headers);
137
+ for (const [name, value] of Object.entries(extra)) {
138
+ if (!value?.trim() || existing.has(name)) continue;
139
+ headers[name] = value;
140
+ existing.set(name, value);
141
+ }
142
+ }
135
143
  return headers;
136
144
  }
137
145
  async function mcpCall(toolName, opts) {
138
146
  const { loadActiveProject } = await import("./project-store-DlbRmRAS.mjs");
139
147
  const active = await loadActiveProject();
140
- const wireArguments = augmentMcpWireArguments(toolName, opts.arguments ?? {}, active?.projectId);
148
+ const wireArguments = opts.skipDefaultProjectId ? opts.arguments ?? {} : augmentMcpWireArguments(toolName, opts.arguments ?? {}, active?.projectId);
141
149
  if (toolName !== "project-list") {
142
150
  const rawProjectId = wireArguments.project_id;
143
151
  if (rawProjectId != null && String(rawProjectId).trim()) {
144
- const { assertProjectAllowed } = await import("./project-access-D4b4oc5E.mjs");
152
+ const { assertProjectAllowed } = await import("./project-access-NrM7rF9v.mjs");
145
153
  await assertProjectAllowed(String(rawProjectId).trim());
146
154
  }
147
155
  }
@@ -154,7 +162,7 @@ async function mcpCallOnce(toolName, opts, retriedAfterRefresh) {
154
162
  const config = await resolveMcpConfig();
155
163
  const serviceCode = opts.serviceCode ?? "beautx-cli";
156
164
  const url = `${config.gatewayUrl}/mcp/${serviceCode}`;
157
- const argumentsWithCallSource = {
165
+ const argumentsWithCallSource = opts.omitCallSource ? opts.arguments : {
158
166
  call_source: MCP_CALL_SOURCE,
159
167
  ...opts.arguments
160
168
  };
@@ -169,7 +177,7 @@ async function mcpCallOnce(toolName, opts, retriedAfterRefresh) {
169
177
  });
170
178
  const resp = await fetch(url, {
171
179
  method: "POST",
172
- headers: buildMcpHttpHeaders(config.token),
180
+ headers: buildMcpHttpHeaders(config.token, opts.headers),
173
181
  body,
174
182
  signal: AbortSignal.timeout(opts.timeoutMs ?? 3e4)
175
183
  });
@@ -1,5 +1,5 @@
1
1
  import { n as writeError, r as writeResult } from "./cli.mjs";
2
- import { i as unwrapMcpToolEnvelope, n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
2
+ import { i as unwrapMcpToolEnvelope, n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
3
3
  //#region src/core/mcp-result.ts
4
4
  /**
5
5
  * Normalize MCP tool responses for agent-friendly stdout (TOON tabular arrays).
@@ -6,8 +6,8 @@ var panke_default = defineCommand({
6
6
  description: "盘客只读查询"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-7k2QD_SC2.mjs").then((m) => m.default),
10
- task: () => import("./task-DlTk04im.mjs").then((m) => m.default)
9
+ list: () => import("./list-rYqpx_f4.mjs").then((m) => m.default),
10
+ task: () => import("./task-9zvvum_9.mjs").then((m) => m.default)
11
11
  }
12
12
  });
13
13
  //#endregion
@@ -0,0 +1,38 @@
1
+ import { r as assertProjectAllowed } from "./project-access-BF7O8oHm.mjs";
2
+ import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
3
+ import { n as writeError, t as formatCliArg } from "./cli.mjs";
4
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
5
+ import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
6
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
7
+ import { defineCommand } from "citty";
8
+ //#region src/commands/staff/permission-scope.ts
9
+ async function queryStaffPermissionScope(projectId) {
10
+ const resolvedProjectId = resolveProjectId(projectId, await requireActiveProject());
11
+ await assertProjectAllowed(resolvedProjectId);
12
+ return mcpCall("staff-permission-scope", {
13
+ arguments: { variables: {} },
14
+ headers: { "X-MCP-Project-Id": resolvedProjectId },
15
+ skipDefaultProjectId: true,
16
+ omitCallSource: true
17
+ });
18
+ }
19
+ var permission_scope_default = defineCommand({
20
+ meta: {
21
+ name: "permission-scope",
22
+ description: "查询当前项目有权查看的员工"
23
+ },
24
+ args: {
25
+ ...projectIdCliArg,
26
+ format: formatCliArg
27
+ },
28
+ async run({ args }) {
29
+ try {
30
+ writeMcpDataResult(await queryStaffPermissionScope(args["project-id"]), args.format);
31
+ } catch (err) {
32
+ writeError(err, args.format);
33
+ process.exit(1);
34
+ }
35
+ }
36
+ });
37
+ //#endregion
38
+ export { permission_scope_default as default };
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError } from "./cli.mjs";
3
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
- import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-BVeYwlRt.mjs";
3
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
4
+ import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-GjbcZpKM.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/commands/portrait-tags/index.ts
7
7
  /**
@@ -228,7 +228,7 @@ function normalizeProjectListPage(page) {
228
228
  };
229
229
  }
230
230
  async function fetchProjectListPage(page, size) {
231
- const { mcpCall, unwrapMcpToolEnvelope } = await import("./mcp-client-huLKHRT3.mjs").then((n) => n.r);
231
+ const { mcpCall, unwrapMcpToolEnvelope } = await import("./mcp-client-84jEvBDL.mjs").then((n) => n.r);
232
232
  const result = await mcpCall("project-list", { arguments: {
233
233
  page,
234
234
  size
@@ -0,0 +1,2 @@
1
+ import { r as assertProjectAllowed } from "./project-access-BF7O8oHm.mjs";
2
+ export { assertProjectAllowed };
@@ -6,9 +6,9 @@ var project_default = defineCommand({
6
6
  description: "查询 / 切换激活项目"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-CwpxejCd.mjs").then((m) => m.default),
10
- use: () => import("./use-CZ8xIPrB.mjs").then((m) => m.default),
11
- current: () => import("./current-s-QVNZmV.mjs").then((m) => m.default)
9
+ list: () => import("./list-DKQ8KM53.mjs").then((m) => m.default),
10
+ use: () => import("./use-Dipd3KHS.mjs").then((m) => m.default),
11
+ current: () => import("./current-DdEW2EWK.mjs").then((m) => m.default)
12
12
  }
13
13
  });
14
14
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { t as csvToArray } from "./util-BtgWHKWv.mjs";
7
7
  import { defineCommand } from "citty";
8
8
  //#region src/commands/qa.ts
@@ -0,0 +1,64 @@
1
+ import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
+ import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
+ import { t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
+ import { n as mergeIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
7
+ import { buildStaffCapabilityProfileArgs } from "./capability-profile-DSLAL4KK.mjs";
8
+ import { defineCommand } from "citty";
9
+ //#region src/commands/staff/quality-inspection.ts
10
+ function buildStaffQualityInspectionArgs(args, active) {
11
+ const base = buildStaffCapabilityProfileArgs(args, active);
12
+ const visitIds = mergeIds(args["visit-id"]?.trim(), csvToArray(args["visit-ids"]));
13
+ if (!visitIds?.length || visitIds.length > 200 || visitIds.some((id) => !/^[1-9]\d*$/.test(id))) throw new Error("--visit-id or --visit-ids must contain 1 to 200 positive visit IDs");
14
+ return {
15
+ ...base,
16
+ variables: {
17
+ ...base.variables,
18
+ staff_quality_visit_ids: visitIds
19
+ }
20
+ };
21
+ }
22
+ var quality_inspection_default = defineCommand({
23
+ meta: {
24
+ name: "quality-inspection",
25
+ description: "查询指定接诊的沟通质量总分与各维度分"
26
+ },
27
+ args: {
28
+ ...projectIdCliArg,
29
+ "staff-user-id": {
30
+ type: "string",
31
+ description: "接诊员工ID,须在授权员工范围内"
32
+ },
33
+ "visit-id": {
34
+ type: "string",
35
+ description: "visit list 返回的接诊ID"
36
+ },
37
+ "visit-ids": {
38
+ type: "string",
39
+ description: "接诊ID,逗号分隔,最多200个"
40
+ },
41
+ from: {
42
+ type: "string",
43
+ description: "统计开始时间 yyyy-MM-dd HH:mm:ss,须覆盖接诊时间"
44
+ },
45
+ to: {
46
+ type: "string",
47
+ description: "统计结束时间 yyyy-MM-dd HH:mm:ss"
48
+ },
49
+ format: formatCliArg
50
+ },
51
+ async run({ args }) {
52
+ try {
53
+ writeMcpDataResult(await mcpCall("staff-recent-quality-inspection", {
54
+ arguments: buildStaffQualityInspectionArgs(args, await requireActiveProject()),
55
+ timeoutMs: 9e4
56
+ }), args.format);
57
+ } catch (err) {
58
+ writeError(err, args.format);
59
+ process.exit(1);
60
+ }
61
+ }
62
+ });
63
+ //#endregion
64
+ export { quality_inspection_default as default };
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { i as toLocalDateTime, t as csvToArray } from "./util-BtgWHKWv.mjs";
7
7
  import { defineCommand } from "citty";
8
8
  //#region src/commands/quantum/query.ts
@@ -5,7 +5,7 @@ var resistance_default = defineCommand({
5
5
  name: "resistance",
6
6
  description: "客户抗性点标签分页查询"
7
7
  },
8
- subCommands: { list: () => import("./list-D9JQwZD52.mjs").then((m) => m.default) }
8
+ subCommands: { list: () => import("./list-kJm0HaGb2.mjs").then((m) => m.default) }
9
9
  });
10
10
  //#endregion
11
11
  export { resistance_default as default };
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { i as tenantIdCliArg, n as resolveProjectId, r as resolveTenantId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { t as csvToArray } from "./util-BtgWHKWv.mjs";
7
7
  import { defineCommand } from "citty";
8
8
  //#region src/commands/kb/search.ts
@@ -6,9 +6,9 @@ var skill_default = defineCommand({
6
6
  description: "Skill 中心:列表 / 安装 / 上传(REST,沙箱双凭证)"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-CXbqmTos.mjs").then((m) => m.default),
10
- install: () => import("./install-7SB-izr2.mjs").then((m) => m.default),
11
- upload: () => import("./upload-CZDRAlaG.mjs").then((m) => m.default)
9
+ list: () => import("./list-CtGAMxsg.mjs").then((m) => m.default),
10
+ install: () => import("./install-DiY2rfRy.mjs").then((m) => m.default),
11
+ upload: () => import("./upload-D7fQAD6I.mjs").then((m) => m.default)
12
12
  }
13
13
  });
14
14
  //#endregion
@@ -0,0 +1,16 @@
1
+ import { defineCommand } from "citty";
2
+ //#region src/commands/staff/index.ts
3
+ var staff_default = defineCommand({
4
+ meta: {
5
+ name: "staff",
6
+ description: "员工能力查询"
7
+ },
8
+ subCommands: {
9
+ "capability-profile": () => import("./capability-profile-DSLAL4KK.mjs").then((m) => m.default),
10
+ "quality-inspection": () => import("./quality-inspection-BAFsvMQT.mjs").then((m) => m.default),
11
+ "deal-capability": () => import("./deal-capability-C6gTS7wK.mjs").then((m) => m.default),
12
+ "permission-scope": () => import("./permission-scope-DH1wsKZY.mjs").then((m) => m.default)
13
+ }
14
+ });
15
+ //#endregion
16
+ export { staff_default as default };
@@ -1,7 +1,7 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
3
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
4
- import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { t as mcpCallPage } from "./mcp-result-DVhN16CS.mjs";
5
5
  import { i as toLocalDateTime } from "./util-BtgWHKWv.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/visit/summary.ts
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/panke/task.ts
8
8
  function buildPankeTaskArgs(args, active) {
@@ -1,8 +1,8 @@
1
1
  import { c as requireActiveProject } from "./project-store-DUlIIW51.mjs";
2
2
  import { n as writeError, t as formatCliArg } from "./cli.mjs";
3
- import { n as mcpCall } from "./mcp-client-huLKHRT3.mjs";
3
+ import { n as mcpCall } from "./mcp-client-84jEvBDL.mjs";
4
4
  import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
5
- import { n as writeMcpDataResult } from "./mcp-result-BzDGJUdM.mjs";
5
+ import { n as writeMcpDataResult } from "./mcp-result-DVhN16CS.mjs";
6
6
  import { defineCommand } from "citty";
7
7
  //#region src/commands/audio/text.ts
8
8
  /**
@@ -1,5 +1,5 @@
1
1
  import { n as writeError, r as writeResult, t as formatCliArg } from "./cli.mjs";
2
- import { n as putSkillZip, o as skillUploadConfirm, s as skillUploadInitiate } from "./skill-client-BfpXlgLz.mjs";
2
+ import { n as putSkillZip, o as skillUploadConfirm, s as skillUploadInitiate } from "./skill-client-C4SOjFsN.mjs";
3
3
  import { defineCommand } from "citty";
4
4
  import { readFile } from "node:fs/promises";
5
5
  //#region src/commands/skill/upload.ts
@@ -1,4 +1,4 @@
1
- import { a as resolveProjectForUse, i as invalidateProjectAccessCache } from "./project-access-ChmJv4Z4.mjs";
1
+ import { a as resolveProjectForUse, i as invalidateProjectAccessCache } from "./project-access-BF7O8oHm.mjs";
2
2
  import { i as invalidateActiveProjectCache, l as switchActiveProjectViaCallback, r as assertProjectSwitchAllowed } from "./project-store-DUlIIW51.mjs";
3
3
  import { n as writeError, r as writeResult, t as formatCliArg } from "./cli.mjs";
4
4
  import { defineCommand } from "citty";
@@ -6,8 +6,8 @@ var visit_default = defineCommand({
6
6
  description: "客户来访查询"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-CuJXGJvc.mjs").then((m) => m.default),
10
- summary: () => import("./summary-D4vO6NHy.mjs").then((m) => m.default)
9
+ list: () => import("./list-CFvv5Huk.mjs").then((m) => m.default),
10
+ summary: () => import("./summary-DJJhrMZy.mjs").then((m) => m.default)
11
11
  }
12
12
  });
13
13
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beautx-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.3-beta.2",
4
4
  "description": "Beautx CLI (beautx-cli) — MCP gateway CLI for medical beauty industry",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,2 +0,0 @@
1
- import { r as assertProjectAllowed } from "./project-access-ChmJv4Z4.mjs";
2
- export { assertProjectAllowed };
@@ -1,11 +0,0 @@
1
- import { defineCommand } from "citty";
2
- //#region src/commands/staff/index.ts
3
- var staff_default = defineCommand({
4
- meta: {
5
- name: "staff",
6
- description: "员工能力查询"
7
- },
8
- subCommands: { "capability-profile": () => import("./capability-profile-VWZEzTJY.mjs").then((m) => m.default) }
9
- });
10
- //#endregion
11
- export { staff_default as default };
File without changes