beautx-cli 1.0.7 → 1.0.8-beta.1

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 (55) hide show
  1. package/README.md +26 -1
  2. package/dist/{analyze-Cq-Hmoqp.mjs → analyze-CtxR02Xr.mjs} +5 -5
  3. package/dist/{api-jIGM86TK.mjs → api-BdaZkABF.mjs} +1 -1
  4. package/dist/{audio-p2QCYFdq.mjs → audio-DlgPatwd.mjs} +3 -3
  5. package/dist/{beauty-plan-CgSmAhn8.mjs → beauty-plan-DNsCkUJY.mjs} +3 -3
  6. package/dist/cli.mjs +19 -17
  7. package/dist/{config-DAVi_CuD.mjs → config-DICowNg_.mjs} +3 -3
  8. package/dist/{consultant-CPecFRiS.mjs → consultant-Det5PdFh.mjs} +1 -1
  9. package/dist/{content-Bq_jEIl6.mjs → content-BOTX5RjP.mjs} +2 -2
  10. package/dist/{current-D4fh-53q.mjs → current-aBOk-h5x.mjs} +1 -1
  11. package/dist/{customer-DWG47eAT.mjs → customer-Dr_mISml.mjs} +1 -1
  12. package/dist/{deal-analysis-Cn2wCaoU.mjs → deal-analysis-K0jAibrc.mjs} +3 -3
  13. package/dist/{doc-DwxREqki.mjs → doc-BuvQ5-m4.mjs} +3 -3
  14. package/dist/env-vars-osVxvm7z.mjs +212 -0
  15. package/dist/{fields-BGogOrgD.mjs → fields-CiWGp1Uy.mjs} +3 -3
  16. package/dist/{focus-BE8BT835.mjs → focus-c7Sx7x3t.mjs} +1 -1
  17. package/dist/{get-BKCE22jj.mjs → get-ByeAOvme.mjs} +2 -2
  18. package/dist/install-DQmxrW3j.mjs +50 -0
  19. package/dist/{kb-BsiBl_ul.mjs → kb-DsyLK84W.mjs} +2 -2
  20. package/dist/{list-BUYSLNqZ.mjs → list-BPBUK6SR.mjs} +3 -1
  21. package/dist/{list-Cs1kF7EB.mjs → list-BTsFZamG.mjs} +4 -4
  22. package/dist/{list-Cnz5CuQB.mjs → list-Bt87oTfo.mjs} +4 -4
  23. package/dist/{list-BzmkW4Iq.mjs → list-CDhdZByU.mjs} +4 -4
  24. package/dist/{list-DJscF_8M.mjs → list-CGDMjHuN.mjs} +4 -4
  25. package/dist/{list-BYLk3sNv.mjs → list-Cq9rAt2i.mjs} +4 -4
  26. package/dist/{list-BmVWcUI7.mjs → list-D4gnORuG.mjs} +1 -1
  27. package/dist/{list-BcYy7Ejx.mjs → list-DD5SDjF3.mjs} +4 -4
  28. package/dist/list-SIx70dm2.mjs +77 -0
  29. package/dist/{list-DVy4Czfy.mjs → list-u0XN5Mv3.mjs} +4 -4
  30. package/dist/{mcp-args-DK3IGaO1.mjs → mcp-args-CG7OuBep.mjs} +1 -1
  31. package/dist/{mcp-client-BTZH22b5.mjs → mcp-client-huLKHRT3.mjs} +3 -3
  32. package/dist/{mcp-result-De_0PPlD.mjs → mcp-result-BzDGJUdM.mjs} +1 -1
  33. package/dist/{portrait-tags-I57TgDAx.mjs → portrait-tags-DDfhu52n.mjs} +3 -3
  34. package/dist/{project-K-HkeM57.mjs → project-CFjWR38i.mjs} +3 -3
  35. package/dist/{project-access-pTN7ry15.mjs → project-access-ChmJv4Z4.mjs} +3 -2
  36. package/dist/project-access-D4b4oc5E.mjs +2 -0
  37. package/dist/{project-store-Dl35JzZr.mjs → project-store-DUlIIW51.mjs} +2 -207
  38. package/dist/project-store-DlbRmRAS.mjs +2 -0
  39. package/dist/{qa-gAtF6cSk.mjs → qa-BvSY8aGf.mjs} +5 -5
  40. package/dist/{resistance-DGU99Bwi.mjs → resistance-BsDf3Ywa.mjs} +1 -1
  41. package/dist/{search-C16CzRep.mjs → search-Chnn4fM0.mjs} +5 -5
  42. package/dist/skill-7jpFz8M3.mjs +15 -0
  43. package/dist/skill-client-DEbjlHcX.mjs +146 -0
  44. package/dist/{summary-DgpSsQh9.mjs → summary-BBOsN5T9.mjs} +4 -4
  45. package/dist/{text-BIIl7PmC.mjs → text-CCxnry4V.mjs} +4 -4
  46. package/dist/upload-BSwTTmow.mjs +76 -0
  47. package/dist/{use-D_HBqdev.mjs → use-DAcv-VQ0.mjs} +2 -2
  48. package/dist/{visit-DnUPj-8i.mjs → visit-B70PkDSX.mjs} +2 -2
  49. package/dist/{visit-evaluate-DM7oCk6R.mjs → visit-evaluate-CaO2KvPG.mjs} +3 -3
  50. package/dist/{visit-query-args-BD3Dw-9F.mjs → visit-query-args-DW3qNnoL.mjs} +2 -2
  51. package/package.json +1 -1
  52. package/dist/project-access-Bf87OLJP.mjs +0 -2
  53. package/dist/project-store-DDVZ7T4t.mjs +0 -2
  54. /package/dist/{doctor-RwDPp4y3.mjs → doctor-DuGxP40X.mjs} +0 -0
  55. /package/dist/{util-Bko-nm_R.mjs → util-BtgWHKWv.mjs} +0 -0
@@ -0,0 +1,76 @@
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-DEbjlHcX.mjs";
3
+ import { defineCommand } from "citty";
4
+ import { readFile } from "node:fs/promises";
5
+ //#region src/commands/skill/upload.ts
6
+ /**
7
+ * `beautx-cli skill upload <zip>` — initiate, upload to OSS, then confirm.
8
+ */
9
+ var upload_default = defineCommand({
10
+ meta: {
11
+ name: "upload",
12
+ description: "上传本地 Skill zip(initiate → PUT → confirm)"
13
+ },
14
+ args: {
15
+ path: {
16
+ type: "positional",
17
+ description: "本地 .zip 路径(压缩包内需包含 SKILL.md)",
18
+ required: true
19
+ },
20
+ type: {
21
+ type: "string",
22
+ description: "personal(默认)| tenant | project",
23
+ default: "personal"
24
+ },
25
+ "project-id": {
26
+ type: "string",
27
+ description: "项目 ID;type=project 时必填,type=tenant 时可选"
28
+ },
29
+ "skill-id": {
30
+ type: "string",
31
+ description: "已有 Skill ID;传入时替换现有包,省略时新建"
32
+ },
33
+ tags: {
34
+ type: "string",
35
+ description: "可选标签 JSON 数组,例如 '[\"a\",\"b\"]'"
36
+ },
37
+ format: formatCliArg
38
+ },
39
+ async run({ args }) {
40
+ try {
41
+ const type = args.type?.trim().toLowerCase() || "personal";
42
+ if (type !== "personal" && type !== "tenant" && type !== "project") throw new Error("type 仅支持 personal | tenant | project");
43
+ const projectId = args["project-id"]?.trim();
44
+ if (type === "project" && !projectId) throw new Error("type=project 需要 --project-id");
45
+ const zipBytes = await readFile(args.path.trim());
46
+ let skillId;
47
+ if (args["skill-id"]?.trim()) {
48
+ const rawId = args["skill-id"].trim();
49
+ if (!/^\d+$/.test(rawId)) throw new Error("skill-id 必须为数字");
50
+ skillId = rawId;
51
+ }
52
+ const token = await skillUploadInitiate({
53
+ skillId,
54
+ ownerType: type,
55
+ projectId
56
+ });
57
+ await putSkillZip(token.uploadUrl, zipBytes, token.uploadHeaders);
58
+ const skill = await skillUploadConfirm({
59
+ uploadToken: token.token,
60
+ tags: args.tags?.trim() || void 0
61
+ });
62
+ writeResult({
63
+ skillId: skill.id,
64
+ name: skill.name,
65
+ version: skill.version,
66
+ status: skill.status,
67
+ ownerType: skill.ownerType
68
+ }, args.format);
69
+ } catch (err) {
70
+ writeError(err, args.format);
71
+ process.exit(1);
72
+ }
73
+ }
74
+ });
75
+ //#endregion
76
+ export { upload_default as default };
@@ -1,5 +1,5 @@
1
- import { i as invalidateActiveProjectCache, l as switchActiveProjectViaCallback, r as assertProjectSwitchAllowed } from "./project-store-Dl35JzZr.mjs";
2
- import { a as resolveProjectForUse, i as invalidateProjectAccessCache } from "./project-access-pTN7ry15.mjs";
1
+ import { a as resolveProjectForUse, i as invalidateProjectAccessCache } from "./project-access-ChmJv4Z4.mjs";
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";
5
5
  //#region src/commands/project/use.ts
@@ -6,8 +6,8 @@ var visit_default = defineCommand({
6
6
  description: "客户来访查询"
7
7
  },
8
8
  subCommands: {
9
- list: () => import("./list-BcYy7Ejx.mjs").then((m) => m.default),
10
- summary: () => import("./summary-DgpSsQh9.mjs").then((m) => m.default)
9
+ list: () => import("./list-DD5SDjF3.mjs").then((m) => m.default),
10
+ summary: () => import("./summary-BBOsN5T9.mjs").then((m) => m.default)
11
11
  }
12
12
  });
13
13
  //#endregion
@@ -1,7 +1,7 @@
1
- import { c as requireActiveProject } from "./project-store-Dl35JzZr.mjs";
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-De_0PPlD.mjs";
4
- import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-BD3Dw-9F.mjs";
3
+ import { t as mcpCallPage } from "./mcp-result-BzDGJUdM.mjs";
4
+ import { n as visitBatchQueryCliArgs, t as buildVisitBatchQueryArgs } from "./visit-query-args-DW3qNnoL.mjs";
5
5
  import { defineCommand } from "citty";
6
6
  //#region src/commands/visit-evaluate/index.ts
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import { t as formatCliArg } from "./cli.mjs";
2
- import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-DK3IGaO1.mjs";
3
- import { i as toLocalDateTime, n as mergeIds, t as csvToArray } from "./util-Bko-nm_R.mjs";
2
+ import { n as resolveProjectId, t as projectIdCliArg } from "./mcp-args-CG7OuBep.mjs";
3
+ import { i as toLocalDateTime, n as mergeIds, t as csvToArray } from "./util-BtgWHKWv.mjs";
4
4
  //#region src/commands/common/visit-query-args.ts
5
5
  const visitBatchQueryCliArgs = {
6
6
  ...projectIdCliArg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beautx-cli",
3
- "version": "1.0.7",
3
+ "version": "1.0.8-beta.1",
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-pTN7ry15.mjs";
2
- export { assertProjectAllowed };
@@ -1,2 +0,0 @@
1
- import { o as loadActiveProject } from "./project-store-Dl35JzZr.mjs";
2
- export { loadActiveProject };
File without changes