beautx-cli 1.0.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 (44) hide show
  1. package/README.md +282 -0
  2. package/dist/analyze-D4-U3EMZ.mjs +67 -0
  3. package/dist/api-CLlWvZ6D.mjs +56 -0
  4. package/dist/audio-BVEMBKjq.mjs +15 -0
  5. package/dist/cli.d.mts +1 -0
  6. package/dist/cli.mjs +34 -0
  7. package/dist/config-JuoIzFRK.mjs +14 -0
  8. package/dist/consultant-Cw1YwwtS.mjs +11 -0
  9. package/dist/content-Yo_WIT7q.mjs +46 -0
  10. package/dist/current-Bxh7Kreq.mjs +24 -0
  11. package/dist/customer-ClOadzRU.mjs +11 -0
  12. package/dist/doc-Ct90pWPu.mjs +15 -0
  13. package/dist/env-callback-B0J77QAo.mjs +349 -0
  14. package/dist/env-vars-CXEHR_mk.mjs +231 -0
  15. package/dist/fields-k9uXoI1-.mjs +70 -0
  16. package/dist/focus-DjNe5aAC.mjs +11 -0
  17. package/dist/format-CUmIaybA.mjs +7253 -0
  18. package/dist/get-Bvvpjak0.mjs +32 -0
  19. package/dist/kb-O5-Jsef7.mjs +14 -0
  20. package/dist/list-BfwcxhuB.mjs +51 -0
  21. package/dist/list-BtTJth6J.mjs +82 -0
  22. package/dist/list-CQ0BANsf.mjs +72 -0
  23. package/dist/list-CjvUJxab.mjs +40 -0
  24. package/dist/list-D5PQ9UFX.mjs +64 -0
  25. package/dist/list-DHuUNbzL.mjs +57 -0
  26. package/dist/list-Du1j8C6e.mjs +67 -0
  27. package/dist/list-Dyo2l4T0.mjs +82 -0
  28. package/dist/list-LLKHw4PC.mjs +82 -0
  29. package/dist/mcp-args-CYOCdClW.mjs +31 -0
  30. package/dist/mcp-client-CiA9h1aX.mjs +260 -0
  31. package/dist/mcp-result-BIkVZJmx.mjs +62 -0
  32. package/dist/project-access-DsvRpcxJ.mjs +274 -0
  33. package/dist/project-i7Ff3qdR.mjs +15 -0
  34. package/dist/project-store-DXTSwGKR.mjs +55 -0
  35. package/dist/qa-BYv1cNLv.mjs +48 -0
  36. package/dist/resistance-TNgE3tbY.mjs +11 -0
  37. package/dist/rolldown-runtime-YLnNgb9a.mjs +35 -0
  38. package/dist/search-Cq5goTou.mjs +67 -0
  39. package/dist/summary-DPEcAZs9.mjs +74 -0
  40. package/dist/text-BcZKHHRe.mjs +39 -0
  41. package/dist/use-BUuilhDM.mjs +39 -0
  42. package/dist/util-CztO5pc3.mjs +46 -0
  43. package/dist/visit-nsou1UG-.mjs +14 -0
  44. package/package.json +44 -0
package/README.md ADDED
@@ -0,0 +1,282 @@
1
+ # beautx-cli
2
+
3
+ 医美行业 MCP 网关 CLI 工具。通过 MCP 协议调用 beautx-mcp-bff 提供的业务数据查询工具。
4
+
5
+ ## 快速开始
6
+
7
+ ### 安装
8
+
9
+ ```bash
10
+ # 使用 pnpm(推荐)
11
+ pnpm install
12
+
13
+ # 或使用 npm
14
+ npm install
15
+ ```
16
+
17
+ ### 构建
18
+
19
+ ```bash
20
+ pnpm build
21
+ ```
22
+
23
+ 构建输出在 `dist/` 目录,可执行文件为 `dist/cli.mjs`。
24
+
25
+ ### 开发模式
26
+
27
+ ```bash
28
+ # 直接运行源码
29
+ pnpm dev -- <command>
30
+
31
+ # 例如:查看帮助
32
+ pnpm dev -- --help
33
+
34
+ # 例如:列出项目
35
+ pnpm dev -- project list
36
+ ```
37
+
38
+ ## 命令列表
39
+
40
+ ### 配置管理
41
+
42
+ ```bash
43
+ # 查看当前环境变量配置
44
+ beautx-cli config list
45
+ ```
46
+
47
+ ### 项目管理
48
+
49
+ ```bash
50
+ # 列出所有项目
51
+ beautx-cli project list [--keyword <关键词>]
52
+
53
+ # 查看当前激活项目
54
+ beautx-cli project current
55
+
56
+ # 切换当前项目
57
+ beautx-cli project use --project-id <项目ID>
58
+ ```
59
+
60
+ ### 顾问管理
61
+
62
+ ```bash
63
+ # 列出顾问
64
+ beautx-cli consultant list [--page <页码>] [--size <每页条数>]
65
+ ```
66
+
67
+ ### 客户管理
68
+
69
+ ```bash
70
+ # 列出客户
71
+ beautx-cli customer list [选项]
72
+ --user-id <顾问ID> # 过滤特定顾问的客户
73
+ --user-name <顾问名> # 顾问姓名模糊搜索
74
+ --customer-name <客户名> # 客户姓名模糊搜索
75
+ --customer-phone <手机号> # 客户手机号模糊搜索
76
+ --portrait <画像关键词> # 画像关键词模糊搜索
77
+ --from <开始时间> # 最后来访时间下限(yyyy-MM-dd HH:mm:ss)
78
+ --to <结束时间> # 最后来访时间上限(yyyy-MM-dd HH:mm:ss)
79
+ --page <页码> # 页码,从 1 开始
80
+ --size <每页条数> # 每页条数
81
+ ```
82
+
83
+ ### 来访管理
84
+
85
+ ```bash
86
+ # 列出来访记录
87
+ beautx-cli visit list [选项]
88
+ --customer-id <客户ID> # wang_id
89
+ --customer-name <客户名> # 客户姓名模糊搜索
90
+ --from <开始时间> # 来访时间下限(yyyy-MM-dd HH:mm:ss)
91
+ --to <结束时间> # 来访时间上限(yyyy-MM-dd HH:mm:ss)
92
+ --page <页码>
93
+ --size <每页条数>
94
+
95
+ # 查询来访总结
96
+ beautx-cli visit summary [选项]
97
+ --wang-id <客户ID> # 客户 ID
98
+ --visit-id <来访ID> # 来访 ID(传了则 from/to 可省略)
99
+ --question <问题> # 模板问题精确匹配
100
+ --from <开始时间> # 起始来访时间(未传 visit_id 时必填)
101
+ --to <结束时间> # 结束来访时间(未传 visit_id 时必填)
102
+ --page <页码>
103
+ --size <每页条数>
104
+ ```
105
+
106
+ ### 客户标签
107
+
108
+ ```bash
109
+ # 列出客户关注点
110
+ beautx-cli focus list [选项]
111
+ --visit-ids <来访ID列表> # 多个 ID 用逗号分隔
112
+ --audio-ids <录音ID列表> # 多个 ID 用逗号分隔
113
+ --wang-id <客户ID> # 单值精确匹配
114
+ --from <开始时间> # 来访时间下限
115
+ --to <结束时间> # 来访时间上限
116
+ --page <页码>
117
+ --size <每页条数>
118
+
119
+ # 列出客户抗性点
120
+ beautx-cli resistance list [选项]
121
+ # 参数同 focus list
122
+ ```
123
+
124
+ **注意**:医美行业不支持 `category` 和 `classification` 过滤参数。
125
+
126
+ ### 录音管理
127
+
128
+ ```bash
129
+ # 列出录音
130
+ beautx-cli audio list [选项]
131
+ --user-id-list <顾问ID列表> # 多个 ID 用逗号分隔
132
+ --from <开始时间>
133
+ --to <结束时间>
134
+ --page <页码>
135
+ --size <每页条数>
136
+
137
+ # 查看录音转写文本
138
+ beautx-cli audio text --audio-id <录音ID>
139
+
140
+ # 录音分析
141
+ beautx-cli audio analyze --audio-id <录音ID>
142
+ ```
143
+
144
+ **注意**:医美业务暂未采集录音,这些命令可能返回空数据。
145
+
146
+ ### 自然语言查询
147
+
148
+ ```bash
149
+ # SQL Agent 自然语言查询(耗时较长)
150
+ beautx-cli qa <自然语言问题>
151
+ ```
152
+
153
+ ### 知识库
154
+
155
+ ```bash
156
+ # 搜索知识库
157
+ beautx-cli kb search <查询关键词> [选项]
158
+ --k <返回条数> # 默认 5,最大 20
159
+ --chunk-types <类型列表> # chunk 类型过滤
160
+ --doc-ids <文档ID列表> # 限定文档
161
+ --enable-rerank # 启用重排
162
+ --rerank-threshold <阈值> # 重排阈值
163
+
164
+ # 列出知识库文档
165
+ beautx-cli kb doc list [--title <标题关键字>]
166
+
167
+ # 获取文档元数据
168
+ beautx-cli kb doc get --doc-id <文档ID>
169
+
170
+ # 获取文档全文
171
+ beautx-cli kb doc content --doc-id <文档ID> [--offset <偏移>] [--limit <字符数>]
172
+ ```
173
+
174
+ ### 字段配置
175
+
176
+ ```bash
177
+ # 查询客户字段配置(解读 dynamic_tags 标签含义)
178
+ beautx-cli config fields [--page <页码>] [--size <每页条数>]
179
+ ```
180
+
181
+ ### 通用 API 调用
182
+
183
+ ```bash
184
+ # 直接调用 MCP 工具(高级用法)
185
+ beautx-cli api --tool-name <工具名> --arguments <JSON参数>
186
+ ```
187
+
188
+ ## 环境变量
189
+
190
+ CLI 通过环境变量获取身份和配置信息(由 Host 沙箱注入):
191
+
192
+ | 变量名 | 说明 | 示例 |
193
+ | --- | --- | --- |
194
+ | ENV | 环境标识 | test / prod |
195
+ | TENANT_ID | 租户 ID | 1 |
196
+ | TENANT_NAME | 租户名称 | 美丽诊所 |
197
+ | USER_ID | 用户 ID | 2 |
198
+ | USER_NAME | 用户名称 | 张医生 |
199
+ | ESTATE_ID | 项目 ID(当前激活) | 3 |
200
+ | ESTATE_NAME | 项目名称 | 北京分院 |
201
+ | MCP_TOKEN | MCP 访问令牌 | eyJ... |
202
+ | REFRESH_TOKEN | 刷新令牌 | eyJ... |
203
+ | EXPIRES_TIMES | 令牌过期时间(毫秒时间戳) | 1719223200000 |
204
+
205
+ 运行 `beautx-cli config list` 可查看当前环境变量配置。
206
+
207
+ ## 架构
208
+
209
+ ```
210
+ beautx-cli → MCP Gateway → beautx-mcp-bff → wangai-mcp-application (beautx 端点)
211
+ ```
212
+
213
+ - **beautx-cli**:TypeScript CLI 工具,发送 JSON-RPC 请求
214
+ - **MCP Gateway**:统一网关,负责鉴权和路由
215
+ - **beautx-mcp-bff**:医美 BFF 服务,参数转换和工具路由
216
+ - **wangai-mcp-application**:业务层,调用 Doris / 内部 RPC / LangGraph
217
+
218
+ ## 开发
219
+
220
+ ### 项目结构
221
+
222
+ ```
223
+ src/
224
+ ├── cli.ts # 主入口
225
+ ├── commands/ # 命令实现
226
+ │ ├── project/ # 项目管理
227
+ │ ├── consultant/ # 顾问管理
228
+ │ ├── customer/ # 客户管理
229
+ │ ├── visit/ # 来访管理
230
+ │ ├── focus/ # 关注点
231
+ │ ├── resistance/ # 抗性点
232
+ │ ├── audio/ # 录音管理
233
+ │ ├── kb/ # 知识库
234
+ │ ├── config/ # 配置查看
235
+ │ ├── qa.ts # SQL Agent
236
+ │ └── api.ts # 通用 API 调用
237
+ ├── core/ # 核心功能
238
+ │ ├── mcp-client.ts # MCP JSON-RPC 客户端
239
+ │ ├── endpoints.ts # 环境配置(test/prod URL)
240
+ │ ├── config.ts # 配置解析
241
+ │ ├── env-vars.ts # 环境变量读取
242
+ │ └── ...
243
+ └── output/ # 输出格式化
244
+ ```
245
+
246
+ ### 添加新命令
247
+
248
+ 1. 在 `src/commands/` 下创建命令文件
249
+ 2. 使用 `defineCommand` 定义命令和参数
250
+ 3. 调用 `mcpCall()` 发送 MCP 请求
251
+ 4. 在 `src/cli.ts` 的 `subCommands` 中注册
252
+
253
+ ### 测试
254
+
255
+ ```bash
256
+ # 运行测试
257
+ pnpm test
258
+
259
+ # 类型检查
260
+ pnpm typecheck
261
+ ```
262
+
263
+ ## 与 wangai-cli 的差异
264
+
265
+ | 维度 | wangai-cli | beautx-cli |
266
+ | --- | --- | --- |
267
+ | 服务代码 | wangai-cli | beautx-cli |
268
+ | 回调 URL | wangke.*.wangxiaobao.com | wangke.*.wangxiaobao.com(**相同**) |
269
+ | 支持字段 | category, classification | **不支持**(医美数据无此字段) |
270
+ | 行业 | 房地产 | 医美 |
271
+
272
+ **注意**:beautx-cli 与 wangai-cli 共用相同的回调域名(wangke),因为两者都依赖同一个 Host 系统提供环境变量和积分查询接口。
273
+
274
+ ## 相关文档
275
+
276
+ - [beautx-mcp-bff](../beautx-mcp-bff/) — 医美 BFF 服务
277
+ - [wangai-mcp-application](../../researcher/wangai-mcp-application/) — 业务应用层
278
+ - [MCP 协议规范](https://github.com/modelcontextprotocol/specification)
279
+
280
+ ## 许可证
281
+
282
+ 内部项目,仅供旺小宝内部使用。
@@ -0,0 +1,67 @@
1
+ import { n as mcpCall } from "./mcp-client-CiA9h1aX.mjs";
2
+ import { n as writeError, t as formatCliArg } from "./format-CUmIaybA.mjs";
3
+ import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CYOCdClW.mjs";
4
+ import { n as writeMcpDataResult } from "./mcp-result-BIkVZJmx.mjs";
5
+ import { i as requireActiveProject } from "./project-store-DXTSwGKR.mjs";
6
+ import { t as csvToArray } from "./util-CztO5pc3.mjs";
7
+ import { defineCommand } from "citty";
8
+ //#region src/commands/audio/analyze.ts
9
+ /**
10
+ * `wangai-cli audio analyze [query]` — batch audio analysis via MCP gateway.
11
+ */
12
+ var analyze_default = defineCommand({
13
+ meta: {
14
+ name: "analyze",
15
+ description: "录音全文批量分析(按客户/顾问维度,输出时间线或通用分析结果)"
16
+ },
17
+ args: {
18
+ ...projectIdCliArg,
19
+ query: {
20
+ type: "positional",
21
+ required: false,
22
+ description: "分析任务描述(MCP query)"
23
+ },
24
+ "customer-id": {
25
+ type: "string",
26
+ description: "单客户旺 ID(MCP customer_id)"
27
+ },
28
+ "customer-ids": {
29
+ type: "string",
30
+ description: "CSV → MCP customer_ids"
31
+ },
32
+ "advisor-ids": {
33
+ type: "string",
34
+ description: "CSV → MCP advisor_ids"
35
+ },
36
+ "analysis-type": {
37
+ type: "string",
38
+ default: "general_analysis",
39
+ description: "MCP analysis_type: general_analysis | timeline_analysis"
40
+ },
41
+ format: formatCliArg
42
+ },
43
+ async run({ args }) {
44
+ try {
45
+ const active = await requireActiveProject();
46
+ const toolArgs = {
47
+ project_id: resolveProjectId(args["project-id"], active),
48
+ analysis_type: String(args["analysis-type"])
49
+ };
50
+ if (args.query) toolArgs.query = String(args.query);
51
+ if (args["customer-id"]) toolArgs.customer_id = String(args["customer-id"]);
52
+ const customerIds = csvToArray(args["customer-ids"]);
53
+ if (customerIds) toolArgs.customer_ids = customerIds;
54
+ const advisorIds = csvToArray(args["advisor-ids"]);
55
+ if (advisorIds) toolArgs.advisor_ids = advisorIds;
56
+ writeMcpDataResult(await mcpCall("audio-analyze", {
57
+ arguments: toolArgs,
58
+ timeoutMs: 6e5
59
+ }), args.format);
60
+ } catch (err) {
61
+ writeError(err, args.format);
62
+ process.exit(1);
63
+ }
64
+ }
65
+ });
66
+ //#endregion
67
+ export { analyze_default as default };
@@ -0,0 +1,56 @@
1
+ import { n as mcpCall, t as MCP_SERVICE_CODE } from "./mcp-client-CiA9h1aX.mjs";
2
+ import { n as writeError, r as writeResult, t as formatCliArg } from "./format-CUmIaybA.mjs";
3
+ import { defineCommand } from "citty";
4
+ //#region src/commands/api.ts
5
+ /**
6
+ * `wangai-cli api --tool-name <tool>` — generic MCP tool call escape hatch.
7
+ *
8
+ * Sends a raw MCP JSON-RPC tools/call request for any tool registered under
9
+ * the MCP serviceCode (default `wangai-cli`). For capabilities not yet wrapped
10
+ * as a dedicated command, or for one-off exploration.
11
+ */
12
+ var api_default = defineCommand({
13
+ meta: {
14
+ name: "api",
15
+ description: "通用 MCP 工具调用 — 指定 tool-name 直接发送 JSON-RPC tools/call(探索/调试用)"
16
+ },
17
+ args: {
18
+ "tool-name": {
19
+ type: "string",
20
+ required: true,
21
+ description: "MCP 工具名(params.name),如 audio-list"
22
+ },
23
+ "service-code": {
24
+ type: "string",
25
+ description: `覆盖 serviceCode(URL 路径),默认 ${MCP_SERVICE_CODE}`
26
+ },
27
+ "tool-args": {
28
+ type: "string",
29
+ description: "JSON 字符串,工具参数(默认 {})"
30
+ },
31
+ format: formatCliArg
32
+ },
33
+ async run({ args }) {
34
+ try {
35
+ let toolArgs = {};
36
+ if (args["tool-args"]) try {
37
+ toolArgs = JSON.parse(args["tool-args"]);
38
+ } catch {
39
+ writeError({
40
+ code: "BAD_JSON",
41
+ message: "--tool-args 不是合法 JSON"
42
+ }, args.format);
43
+ process.exit(2);
44
+ }
45
+ writeResult(await mcpCall(String(args["tool-name"]), {
46
+ serviceCode: args["service-code"] ? String(args["service-code"]) : void 0,
47
+ arguments: toolArgs
48
+ }), args.format);
49
+ } catch (err) {
50
+ writeError(err, args.format);
51
+ process.exit(1);
52
+ }
53
+ }
54
+ });
55
+ //#endregion
56
+ export { api_default as default };
@@ -0,0 +1,15 @@
1
+ import { defineCommand } from "citty";
2
+ //#region src/commands/audio/index.ts
3
+ var audio_default = defineCommand({
4
+ meta: {
5
+ name: "audio",
6
+ description: "录音元数据分页 / 单条文本查询 / 全文批量分析"
7
+ },
8
+ subCommands: {
9
+ list: () => import("./list-CQ0BANsf.mjs").then((m) => m.default),
10
+ text: () => import("./text-BcZKHHRe.mjs").then((m) => m.default),
11
+ analyze: () => import("./analyze-D4-U3EMZ.mjs").then((m) => m.default)
12
+ }
13
+ });
14
+ //#endregion
15
+ export { audio_default as default };
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { defineCommand, runMain } from "citty";
6
+ //#region src/cli.ts
7
+ /**
8
+ * beautx-cli entrypoint.
9
+ *
10
+ * MCP gateway CLI for medical beauty industry business data.
11
+ * See README for full command map.
12
+ */
13
+ const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
14
+ runMain(defineCommand({
15
+ meta: {
16
+ name: "beautx-cli",
17
+ version: JSON.parse(readFileSync(pkgPath, "utf8")).version,
18
+ description: "Beautx CLI (beautx-cli) — MCP gateway CLI for medical beauty industry"
19
+ },
20
+ subCommands: {
21
+ config: () => import("./config-JuoIzFRK.mjs").then((m) => m.default),
22
+ project: () => import("./project-i7Ff3qdR.mjs").then((m) => m.default),
23
+ consultant: () => import("./consultant-Cw1YwwtS.mjs").then((m) => m.default),
24
+ audio: () => import("./audio-BVEMBKjq.mjs").then((m) => m.default),
25
+ customer: () => import("./customer-ClOadzRU.mjs").then((m) => m.default),
26
+ visit: () => import("./visit-nsou1UG-.mjs").then((m) => m.default),
27
+ focus: () => import("./focus-DjNe5aAC.mjs").then((m) => m.default),
28
+ resistance: () => import("./resistance-TNgE3tbY.mjs").then((m) => m.default),
29
+ qa: () => import("./qa-BYv1cNLv.mjs").then((m) => m.default),
30
+ kb: () => import("./kb-O5-Jsef7.mjs").then((m) => m.default)
31
+ }
32
+ }));
33
+ //#endregion
34
+ export {};
@@ -0,0 +1,14 @@
1
+ import { defineCommand } from "citty";
2
+ //#region src/commands/config/index.ts
3
+ var config_default = defineCommand({
4
+ meta: {
5
+ name: "config",
6
+ description: "沙箱配置:list 只读诊断;fields 客户字段字典"
7
+ },
8
+ subCommands: {
9
+ list: () => import("./list-D5PQ9UFX.mjs").then((m) => m.default),
10
+ fields: () => import("./fields-k9uXoI1-.mjs").then((m) => m.default)
11
+ }
12
+ });
13
+ //#endregion
14
+ export { config_default as default };
@@ -0,0 +1,11 @@
1
+ import { defineCommand } from "citty";
2
+ //#region src/commands/consultant/index.ts
3
+ var consultant_default = defineCommand({
4
+ meta: {
5
+ name: "consultant",
6
+ description: "查询有权限的置业顾问列表"
7
+ },
8
+ subCommands: { list: () => import("./list-BfwcxhuB.mjs").then((m) => m.default) }
9
+ });
10
+ //#endregion
11
+ export { consultant_default as default };
@@ -0,0 +1,46 @@
1
+ import { n as mcpCall } from "./mcp-client-CiA9h1aX.mjs";
2
+ import { n as writeError, t as formatCliArg } from "./format-CUmIaybA.mjs";
3
+ import { n as writeMcpDataResult } from "./mcp-result-BIkVZJmx.mjs";
4
+ import { defineCommand } from "citty";
5
+ //#region src/commands/kb/doc/content.ts
6
+ /**
7
+ * `wangai-cli kb doc content <doc-id>` — paginated full-text markdown via MCP.
8
+ */
9
+ var content_default = defineCommand({
10
+ meta: {
11
+ name: "content",
12
+ description: "知识库文档全文(字符分页)"
13
+ },
14
+ args: {
15
+ docId: {
16
+ type: "positional",
17
+ required: true,
18
+ description: "文档 ID(MCP doc_id)"
19
+ },
20
+ offset: {
21
+ type: "string",
22
+ default: "0",
23
+ description: "字符偏移"
24
+ },
25
+ limit: {
26
+ type: "string",
27
+ default: "1000",
28
+ description: "字符数,默认 1000,最大 2000"
29
+ },
30
+ format: formatCliArg
31
+ },
32
+ async run({ args }) {
33
+ try {
34
+ writeMcpDataResult(await mcpCall("kb-doc-content", { arguments: {
35
+ doc_id: String(args.docId),
36
+ offset: Number(args.offset),
37
+ limit: Number(args.limit)
38
+ } }), args.format);
39
+ } catch (err) {
40
+ writeError(err, args.format);
41
+ process.exit(1);
42
+ }
43
+ }
44
+ });
45
+ //#endregion
46
+ export { content_default as default };
@@ -0,0 +1,24 @@
1
+ import { n as writeError, r as writeResult, t as formatCliArg } from "./format-CUmIaybA.mjs";
2
+ import { i as requireActiveProject } from "./project-store-DXTSwGKR.mjs";
3
+ import { defineCommand } from "citty";
4
+ //#region src/commands/project/current.ts
5
+ /**
6
+ * `wangai-cli project current` — show the currently active project from env.
7
+ */
8
+ var current_default = defineCommand({
9
+ meta: {
10
+ name: "current",
11
+ description: "显示当前激活的租户/项目"
12
+ },
13
+ args: { format: formatCliArg },
14
+ async run({ args }) {
15
+ try {
16
+ writeResult(await requireActiveProject(), args.format);
17
+ } catch (err) {
18
+ writeError(err, args.format);
19
+ process.exit(1);
20
+ }
21
+ }
22
+ });
23
+ //#endregion
24
+ export { current_default as default };
@@ -0,0 +1,11 @@
1
+ import { defineCommand } from "citty";
2
+ //#region src/commands/customer/index.ts
3
+ var customer_default = defineCommand({
4
+ meta: {
5
+ name: "customer",
6
+ description: "客户画像分页查询"
7
+ },
8
+ subCommands: { list: () => import("./list-LLKHw4PC.mjs").then((m) => m.default) }
9
+ });
10
+ //#endregion
11
+ export { customer_default as default };
@@ -0,0 +1,15 @@
1
+ import { defineCommand } from "citty";
2
+ //#region src/commands/kb/doc/index.ts
3
+ var doc_default = defineCommand({
4
+ meta: {
5
+ name: "doc",
6
+ description: "知识库文档列表 / 元数据 / 全文"
7
+ },
8
+ subCommands: {
9
+ list: () => import("./list-CjvUJxab.mjs").then((m) => m.default),
10
+ get: () => import("./get-Bvvpjak0.mjs").then((m) => m.default),
11
+ content: () => import("./content-Yo_WIT7q.mjs").then((m) => m.default)
12
+ }
13
+ });
14
+ //#endregion
15
+ export { doc_default as default };