cloudcc-cli 2.3.5 → 2.3.7

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 (212) hide show
  1. package/.cursor/skills/cloudcc-cli-dev/SKILL.md +29 -23
  2. package/.cursor/skills/cloudcc-dev-skill/SKILL.md +26 -26
  3. package/README.md +68 -13
  4. package/bin/cc.js +6 -6
  5. package/mcp/cliRunner.js +2 -2
  6. package/mcp/tools/Application Creator/handler.js +1 -1
  7. package/mcp/tools/Approval/handler.js +3 -3
  8. package/mcp/tools/Class Creator/handler.js +2 -2
  9. package/mcp/tools/Class Detail Retriever/handler.js +1 -1
  10. package/mcp/tools/Class Editor Guide/handler.js +1 -1
  11. package/mcp/tools/Class List Retriever/handler.js +1 -1
  12. package/mcp/tools/Class Publisher/handler.js +1 -1
  13. package/mcp/tools/Class Puller/handler.js +1 -1
  14. package/mcp/tools/Client Script Detail Retriever/handler.js +1 -1
  15. package/mcp/tools/Client Script Editor Guide/handler.js +1 -1
  16. package/mcp/tools/Client Script List Retriever/handler.js +1 -1
  17. package/mcp/tools/Client Script Publisher/handler.js +1 -1
  18. package/mcp/tools/Client Script Puller/handler.js +2 -2
  19. package/mcp/tools/CloudCC Development Overview/handler.js +1 -1
  20. package/mcp/tools/Component Creator/handler.js +1 -1
  21. package/mcp/tools/Component Detail Retriever/handler.js +1 -1
  22. package/mcp/tools/Component Editor Guide/handler.js +1 -1
  23. package/mcp/tools/Component List Retriever/handler.js +1 -1
  24. package/mcp/tools/Component Publisher/handler.js +2 -2
  25. package/mcp/tools/Component Puller/handler.js +1 -1
  26. package/mcp/tools/Dev Environment Creator/handler.js +1 -1
  27. package/mcp/tools/Dev Environment Validator/handler.js +1 -1
  28. package/mcp/tools/Developer Key Setup Guide/handler.js +1 -1
  29. package/mcp/tools/Menu Creator/handler.js +1 -1
  30. package/mcp/tools/Object Creator/handler.js +2 -2
  31. package/mcp/tools/Object Fields Creator/handler.js +1 -1
  32. package/mcp/tools/Object Fields Retriever/handler.js +1 -1
  33. package/mcp/tools/Object List Retriever/handler.js +1 -1
  34. package/mcp/tools/Scheduled Class Creator/handler.js +1 -1
  35. package/mcp/tools/Scheduled Class Detail Retriever/handler.js +1 -1
  36. package/mcp/tools/Scheduled Class List Retriever/handler.js +1 -1
  37. package/mcp/tools/Scheduled Class Publisher/handler.js +1 -1
  38. package/mcp/tools/Scheduled Class Puller/handler.js +1 -1
  39. package/mcp/tools/Trigger Creator/handler.js +1 -1
  40. package/mcp/tools/Trigger Detail Retriever/handler.js +1 -1
  41. package/mcp/tools/Trigger Editor Guide/handler.js +1 -1
  42. package/mcp/tools/Trigger List Retriever/handler.js +1 -1
  43. package/mcp/tools/Trigger Publisher/handler.js +1 -1
  44. package/mcp/tools/Trigger Puller/handler.js +1 -1
  45. package/package.json +4 -2
  46. package/src/application/create.js +2 -2
  47. package/src/application/delete.js +2 -2
  48. package/src/application/doc.js +2 -2
  49. package/src/application/docs/devguide.md +25 -25
  50. package/src/application/docs/introduction.md +2 -2
  51. package/src/button/create.js +1 -1
  52. package/src/button/delete.js +1 -1
  53. package/src/button/doc.js +2 -2
  54. package/src/button/docs/devguide.md +11 -11
  55. package/src/button/get.js +1 -1
  56. package/src/button/index.js +1 -1
  57. package/src/classes/create.js +1 -1
  58. package/src/classes/delete.js +1 -1
  59. package/src/classes/detail.js +1 -1
  60. package/src/classes/doc.js +2 -2
  61. package/src/classes/docs/devguide.md +21 -21
  62. package/src/classes/get.js +1 -1
  63. package/src/classes/publish.js +1 -1
  64. package/src/classes/pull.js +1 -1
  65. package/src/classes/pullList.js +1 -1
  66. package/src/config/doc.js +2 -2
  67. package/src/config/docs/devguide.md +15 -15
  68. package/src/customPage/create.js +2 -2
  69. package/src/customPage/delete.js +2 -2
  70. package/src/customPage/doc.js +2 -2
  71. package/src/customPage/docs/devguide.md +27 -27
  72. package/src/customPage/get.js +1 -1
  73. package/src/customSetting/create.js +1 -1
  74. package/src/customSetting/delete.js +1 -1
  75. package/src/customSetting/deleteCustomSettingField.js +1 -1
  76. package/src/customSetting/detail.js +1 -1
  77. package/src/customSetting/docs/devguide.md +9 -9
  78. package/src/customSetting/editCustomSettingField.js +1 -1
  79. package/src/customSetting/get.js +1 -1
  80. package/src/customSetting/modify.js +1 -1
  81. package/src/customSetting/saveCustomSettingField.js +1 -1
  82. package/src/fields/delete.js +2 -2
  83. package/src/fields/docs/devguide.md +14 -14
  84. package/src/fields/docs/introduction.md +3 -3
  85. package/src/globalSelectList/create.js +1 -1
  86. package/src/globalSelectList/delete.js +1 -1
  87. package/src/globalSelectList/detail.js +1 -1
  88. package/src/globalSelectList/doc.js +2 -2
  89. package/src/globalSelectList/docs/devguide.md +7 -7
  90. package/src/globalSelectList/get.js +1 -1
  91. package/src/identityProvider/create.js +3 -3
  92. package/src/identityProvider/delete.js +3 -3
  93. package/src/identityProvider/doc.js +2 -2
  94. package/src/identityProvider/docs/devguide.md +10 -10
  95. package/src/identityProvider/download.js +1 -1
  96. package/src/identityProvider/get.js +1 -1
  97. package/src/menu/create-object.js +2 -2
  98. package/src/menu/create-page.js +2 -2
  99. package/src/menu/create-script.js +2 -2
  100. package/src/menu/create-site.js +2 -2
  101. package/src/menu/create.js +11 -11
  102. package/src/menu/delete.js +2 -2
  103. package/src/menu/doc.js +2 -2
  104. package/src/menu/docs/devguide.md +13 -13
  105. package/src/menu/docs/introduction.md +3 -3
  106. package/src/menu/get.js +1 -1
  107. package/src/object/create.js +2 -2
  108. package/src/object/delete.js +2 -2
  109. package/src/object/docs/devguide.md +11 -11
  110. package/src/pagelayout/create.js +6 -6
  111. package/src/pagelayout/delete.js +4 -4
  112. package/src/pagelayout/doc.js +2 -2
  113. package/src/pagelayout/docs/devguide.md +9 -9
  114. package/src/pagelayout/docs/introduction.md +1 -1
  115. package/src/pagelayout/get.js +4 -4
  116. package/src/permission/add.js +4 -4
  117. package/src/permission/assign.js +3 -3
  118. package/src/permission/docs/devguide.md +20 -20
  119. package/src/permission/docs/introduction.md +18 -18
  120. package/src/permission/get.js +1 -1
  121. package/src/permission/remove.js +4 -4
  122. package/src/plugin/delete.js +2 -2
  123. package/src/plugin/doc.js +2 -2
  124. package/src/plugin/docs/devguide.md +29 -29
  125. package/src/profile/create.js +5 -5
  126. package/src/profile/delete.js +2 -2
  127. package/src/profile/doc.js +2 -2
  128. package/src/profile/docs/devguide.md +8 -8
  129. package/src/profile/docs/introduction.md +12 -12
  130. package/src/profile/get.js +1 -1
  131. package/src/project/docs/devguide.md +19 -6
  132. package/src/recordType/create.js +1 -1
  133. package/src/recordType/delete.js +1 -1
  134. package/src/recordType/doc.js +2 -2
  135. package/src/recordType/docs/devguide.md +10 -10
  136. package/src/recordType/editInfo.js +1 -1
  137. package/src/recordType/editSave.js +1 -1
  138. package/src/recordType/getList.js +1 -1
  139. package/src/recordType/newInfo.js +1 -1
  140. package/src/recordType/validDelete.js +1 -1
  141. package/src/res.md +1 -1
  142. package/src/role/create.js +6 -6
  143. package/src/role/delete.js +2 -2
  144. package/src/role/doc.js +2 -2
  145. package/src/role/docs/devguide.md +9 -9
  146. package/src/role/docs/introduction.md +13 -13
  147. package/src/role/get.js +1 -1
  148. package/src/scheduleJob/doc.js +1 -1
  149. package/src/scheduleJob/docs/devguide.md +6 -6
  150. package/src/scheduleJob/docs/introduction.md +6 -6
  151. package/src/script/docs/devguide.md +18 -18
  152. package/src/singleSignOn/delete.js +3 -3
  153. package/src/singleSignOn/doc.js +2 -2
  154. package/src/singleSignOn/docs/devguide.md +5 -5
  155. package/src/singleSignOn/get.js +1 -1
  156. package/src/staticResource/count.js +1 -1
  157. package/src/staticResource/create.js +1 -1
  158. package/src/staticResource/delete.js +1 -1
  159. package/src/staticResource/detail.js +1 -1
  160. package/src/staticResource/docs/devguide.md +11 -11
  161. package/src/staticResource/get.js +1 -1
  162. package/src/timer/create.js +1 -1
  163. package/src/timer/delete.js +1 -1
  164. package/src/timer/detail.js +1 -1
  165. package/src/timer/doc.js +2 -2
  166. package/src/timer/docs/devguide.md +19 -19
  167. package/src/timer/get.js +1 -1
  168. package/src/timer/publish.js +1 -1
  169. package/src/timer/pull.js +1 -1
  170. package/src/timer/pullList.js +1 -1
  171. package/src/triggers/detail.js +1 -1
  172. package/src/triggers/doc.js +2 -2
  173. package/src/triggers/docs/devguide.md +23 -23
  174. package/src/triggers/get.js +1 -1
  175. package/src/triggers/pullList.js +1 -1
  176. package/src/user/create.js +2 -2
  177. package/src/user/delete.js +2 -2
  178. package/src/user/doc.js +2 -2
  179. package/src/user/docs/devguide.md +13 -13
  180. package/src/user/docs/introduction.md +12 -12
  181. package/src/user/get.js +1 -1
  182. package/src/user/update.js +3 -3
  183. package/src/user/view.js +2 -2
  184. package/src/validationRule/create.js +5 -5
  185. package/src/validationRule/delete.js +2 -2
  186. package/src/validationRule/doc.js +2 -2
  187. package/src/validationRule/docs/devguide.md +7 -7
  188. package/src/validationRule/docs/introduction.md +11 -11
  189. package/src/validationRule/get.js +1 -1
  190. package/src/version/actionHelp.js +3 -3
  191. package/src/version/doctor.js +1 -1
  192. package/src/version/get.js +0 -6
  193. package/src/version/help.js +15 -14
  194. package/src/version/initHelp.js +2 -2
  195. package/src/version/listModuleCommands.js +2 -2
  196. package/src/version/stats.js +1 -1
  197. package/test/application.cli.test.js +1 -1
  198. package/test/classes.cli.test.js +1 -1
  199. package/test/customSetting.cli.test.js +1 -1
  200. package/test/fields.cli.test.js +2 -2
  201. package/test/globalSelectList.cli.test.js +1 -1
  202. package/test/menu-script.cli.test.js +1 -1
  203. package/test/menu.cli.test.js +1 -1
  204. package/test/object.cli.test.js +1 -1
  205. package/test/plugin.cli.test.js +1 -1
  206. package/test/scheduleJob.cli.test.js +1 -1
  207. package/test/script.cli.test.js +1 -1
  208. package/test/staticResource.cli.test.js +1 -1
  209. package/test/timer.cli.test.js +1 -1
  210. package/test/trigger.cli.test.js +1 -1
  211. package/utils/checkVersion.js +9 -13
  212. package/utils/commandStats.js +7 -7
@@ -4,7 +4,7 @@ description: >-
4
4
  Defines how cloudcc-cli extends the `cc` command: argv shape, `bin/cc.js` entry
5
5
  (global flags, doctor/docs/init, action-level `-h`), `bin/index.js` Proxy routing,
6
6
  `src/version/listModuleCommands.js` for `--help`, per-resource `src/<resource>/index.js`
7
- dispatch, and MCP via `node` + `bin/mcp.js` (no `cc-mcp` bin). Release / changelog:
7
+ dispatch, and MCP via `cc-mcp` (→ `bin/mcp.js`) or `node` + absolute path to `bin/mcp.js`. Release / changelog in `README.md` must be **English only** (`# ReleaseV…` sections);
8
8
  ask whether to bump version; if not, only edit the existing `# ReleaseV…` for the
9
9
  current version in `README.md`. Use when adding or modifying CLI commands,
10
10
  subcommands, or modules in this repo, or when the user mentions cloudcc-cli
@@ -18,7 +18,7 @@ description: >-
18
18
  全局约定:
19
19
 
20
20
  ```text
21
- cc <动作 action> <资源 resource> <其余参数 ...>
21
+ cloudcc <动作 action> <资源 resource> <其余参数 ...>
22
22
  ```
23
23
 
24
24
  - `argvs[0]` = 动作(如 `get`、`create`、`doc`、`assign` 等,随业务扩展)
@@ -27,11 +27,11 @@ cc <动作 action> <资源 resource> <其余参数 ...>
27
27
 
28
28
  示例:
29
29
 
30
- - `cc get object …` → `modules.object('get', argvs)`
31
- - `cc assign permission …` → `modules.permission('assign', argvs)`
32
- - `cc doc menu …` → `modules.menu('doc', argvs)`
30
+ - `cloudcc get object …` → `modules.object('get', argvs)`
31
+ - `cloudcc assign permission …` → `modules.permission('assign', argvs)`
32
+ - `cloudcc doc menu …` → `modules.menu('doc', argvs)`
33
33
 
34
- 权限模块曾使用旧写法 `cc permission assign …`(资源不在第二位),已废弃,见下文「历史调整摘要」。
34
+ 权限模块曾使用旧写法 `cloudcc permission assign …`(资源不在第二位),已废弃,见下文「历史调整摘要」。
35
35
 
36
36
  ---
37
37
 
@@ -60,32 +60,32 @@ cc <动作 action> <资源 resource> <其余参数 ...>
60
60
  | `uninstall`(且无第二参数) | `src/version/uninstall.js` 全局卸载 |
61
61
  | `doctor`(且无第二参数) | `src/version/doctor.js` 环境自检(Node、配置、版本) |
62
62
  | `docs`(且无第二参数) | `src/version/docs.js` 打开帮助中心浏览器页 |
63
- | `init …` | **等价** `cc create project …`(重写 `argvs` 后走主流程) |
63
+ | `init …` | **等价** `cloudcc create project …`(重写 `argvs` 后走主流程) |
64
64
  | `init` + `-h` / `--help` | `src/version/initHelp.js` 简短说明 |
65
65
  | 任意 `action` + 第二参数为 `-h` / `--help` | `src/version/actionHelp.js`:列出支持该 **action** 的 **resource**(数据来自 `listModuleCommands`) |
66
66
 
67
- **无参 / 缺 resource**:仅输入 `cc` 时提示用法并指向 `cc --help`;仅输入 `cc <action>`(缺 `argvs[1]`)时提示补全 `resource`,并提示可用 `cc <action> -h`。
67
+ **无参 / 缺 resource**:仅输入 `cc` 时提示用法并指向 `cloudcc --help`;仅输入 `cloudcc <action>`(缺 `argvs[1]`)时提示补全 `resource`,并提示可用 `cloudcc <action> -h`。
68
68
 
69
- **注意**:`doctor`、`docs`、`actionHelp`、`initHelp` **不要**挂到 `src/version/index.js` 的 `cc.*` 上,否则 `cc --help` 里通过解析 `index.js` 会误出现 `cc doctor version` 等行。它们由 `cc.js` **直接 `require`** 对应文件执行。
69
+ **注意**:`doctor`、`docs`、`actionHelp`、`initHelp` **不要**挂到 `src/version/index.js` 的 `cc.*` 上,否则 `cloudcc --help` 里通过解析 `index.js` 会误出现 `cloudcc doctor version` 等行。它们由 `cc.js` **直接 `require`** 对应文件执行。
70
70
 
71
71
  ---
72
72
 
73
73
  ## `--help` 与模块清单(`src/version/`)
74
74
 
75
- - **`help.js`**:打印 Usage、Global 区、**按模块罗列** `cc <action> <resource>`;模块与顺序与 `bin/index.js` 的 `modules` 一致(见 `listModuleCommands.js`)。
75
+ - **`help.js`**:打印 Usage、Global 区、**按模块罗列** `cloudcc <action> <resource>`;模块与顺序与 `bin/index.js` 的 `modules` 一致(见 `listModuleCommands.js`)。
76
76
  - **`listModuleCommands.js`**:
77
77
  - 从各资源目录 `index.js` **正则解析** `cc.<action> =` 得到 action 列表(与实现同步)。
78
78
  - **`MODULE_HINT`**:模块一句话说明;`schedule` / `timer` 合并为一组展示。
79
79
  - **`describeActionLine(resource, action)`**:行尾中文说明(替代省略号)。
80
- - **`getResourcesForAction(action)`**:供 `cc <action> -h` 列出 resource。
80
+ - **`getResourcesForAction(action)`**:供 `cloudcc <action> -h` 列出 resource。
81
81
  - 新增 **resource** 时:除改 `bin/index.js` 外,须在 `listModuleCommands.js` 中维护 **`MODULE_KEYS_ORDER`** 与 **`MODULE_FOLDER`**(及必要时 **`MODULE_HINT`**、**`RESOURCE_CN`**)。
82
82
 
83
83
  ---
84
84
 
85
85
  ## MCP 与 `package.json` bin
86
86
 
87
- - **`package.json` 的 `bin`** 仅注册 `cc`(及 `cloudccCreate`、`cloudccBuild` 等),**不**注册 `cc-mcp`。
88
- - MCP 启动使用 **`node`** + **`cloudcc-cli` 包内 `bin/mcp.js` 的绝对路径**(全局安装路径可用 `$(npm root -g)/cloudcc-cli/bin/mcp.js` 拼接)。详见仓库 `README.md` / `src/project/docs/devguide.md`。
87
+ - **`package.json` 的 `bin`** 注册 **`cc`** 与 **`cloudcc`**(同一 `bin/cc.js`)、**`cc-mcp`**(→ `bin/mcp.js`)、`cloudccCreate`、`cloudccBuild` 等。
88
+ - MCP:**推荐**全局安装后 **`PATH` 上直接使用 `cc-mcp`**(与常见 `mcp.json` 里 `"command": "cc-mcp"` 一致);**亦可**用 **`node`** + **`bin/mcp.js` 绝对路径**(`$(npm root -g)/cloudcc-cli/bin/mcp.js`)。详见 `README.md` / `src/project/docs/devguide.md`。
89
89
 
90
90
  ---
91
91
 
@@ -113,7 +113,7 @@ cc <动作 action> <资源 resource> <其余参数 ...>
113
113
 
114
114
  子文件(`get.js`、`create.js` …)从 **`argvs`** 解析路径与业务参数(通常从 `argvs[2]` 开始,依各命令文档)。
115
115
 
116
- 新增动作时:增加 `cc.<新动作> = require("./新文件")`,并保证与全局 `cc <动作> <资源>` 一致。
116
+ 新增动作时:增加 `cc.<新动作> = require("./新文件")`,并保证与全局 `cloudcc <动作> <资源>` 一致。
117
117
 
118
118
  ---
119
119
 
@@ -121,9 +121,9 @@ cc <动作 action> <资源 resource> <其余参数 ...>
121
121
 
122
122
  1. 在 `bin/index.js` 的 **`modules`** 中注册资源(key = CLI 第二段单词)。
123
123
  2. 新建或扩展 `src/<resource>/`,实现 `index.js` 及所需 `get`/`create`/… 子文件。
124
- 3. 若有 `doc`,在 `src/<resource>/doc.js` 与 `docs/` 中维护说明;通过 `cc doc <resource>` 可读。
125
- 4. 更新 `src/version/listModuleCommands.js`:**`MODULE_KEYS_ORDER`**、**`MODULE_FOLDER`**,必要时 **`MODULE_HINT`**、**`RESOURCE_CN`**、**`describeActionLine`** 中的映射,保证 `cc --help` 与 `cc <action> -h` 正确。
126
- 5. 自测:`node bin/cc.js <动作> <resource> …`、`cc --help`、`cc <action> -h`;若 MCP 通过 `cliRunner` 调 `cc`,确认参数顺序与文档一致。
124
+ 3. 若有 `doc`,在 `src/<resource>/doc.js` 与 `docs/` 中维护说明;通过 `cloudcc doc <resource>` 可读。
125
+ 4. 更新 `src/version/listModuleCommands.js`:**`MODULE_KEYS_ORDER`**、**`MODULE_FOLDER`**,必要时 **`MODULE_HINT`**、**`RESOURCE_CN`**、**`describeActionLine`** 中的映射,保证 `cloudcc --help` 与 `cloudcc <action> -h` 正确。
126
+ 5. 自测:`node bin/cc.js <动作> <resource> …`、`cloudcc --help` / `cc --help`、`cloudcc <action> -h`;若 MCP 通过 `cliRunner` 调 **`cloudcc`**,确认参数顺序与文档一致。
127
127
 
128
128
  ---
129
129
 
@@ -131,21 +131,27 @@ cc <动作 action> <资源 resource> <其余参数 ...>
131
131
 
132
132
  在**写入或更新开发日志**(`README.md` 中的 `# ReleaseV…`)时,**以后均照此执行**:
133
133
 
134
+ ### Release log language(变更日志语言 — 强制)
135
+
136
+ - **整节 `# ReleaseV…` 必须使用英文**:`#### Release Date`、`#### Release Scope`、`#### Release Content` 下的**所有列表与说明**均为英文;**不要**中英混写或整段中文。
137
+ - **原因**:`cc --version` 与注册表版本检查会从 README 解析这些块并在终端输出(`utils/readmeReleases.js` / `formatReleaseNotes.js`),英文便于统一展示与检索。
138
+ - **维护**:若某历史节仍为中文,在**编辑该节时**改为英文;不要求一次性翻完全部旧节,但**新增或修改的 Release 内容**一律英文。
139
+
134
140
  ### 必须先确认:是否升级版本号
135
141
 
136
142
  - **向用户询问**:本次是否需要**升级 `package.json` / `package-lock.json` 的版本号**(新一次发版)?
137
- - **若不需要升版**:**不要**修改 `package.json` 与 `package-lock.json` 的 `version`;只在 **`README.md` 里与当前 `package.json.version` 一致**的那一节 `# ReleaseV…`(例如已是 `# ReleaseV2.3.5`)中**增补或修订** `#### Release Content`(及必要时同一节内的日期说明),把新变更写进**现有版本**的日志里。
143
+ - **若不需要升版**:**不要**修改 `package.json` 与 `package-lock.json` 的 `version`;只在 **`README.md` 里与当前 `package.json.version` 一致**的那一节 `# ReleaseV…`(例如已是 `# ReleaseV2.3.7`)中**增补或修订** `#### Release Content`(及必要时同一节内的日期说明),把新变更写进**现有版本**的日志里;**增补/修订的正文仍须英文**(见「Release log language」)。
138
144
  - **若需要升版**:再执行下面的「升版 + 新节」流程。
139
145
 
140
146
  ### 升版 + 新 Release 节(仅在用户确认要发版时)
141
147
 
142
- 1. **版本号**(与 `cc --version` / `package.json` 一致)
148
+ 1. **版本号**(与 `cloudcc --version` / `package.json` 一致)
143
149
  - 在 **`package.json`** 中将 **`version`** 升为下一号(通常 patch `x.y.(z+1)`;破坏性变更再升 minor/major)。
144
150
  - 同步 **`package-lock.json`** 根包 **`""`** 的 **`version`**(以及文件最顶部 `name`/`version` 字段,若存在),避免锁文件与 `package.json` 不一致。
145
151
 
146
152
  2. **README.md 变更日志**
147
153
  - 在 **`README.md`** 中、**紧接「Usage Guide / CLI overview / MCP」等说明之后**、**旧版 Release 区块之上**,**插入新的** `# ReleaseV<主版本>.<次版本>.<补丁>` 一节(版本号与新的 `package.json` 一致)。
148
- - **新发布节全文使用英文**(标题、Release Date、Scope、Content 列表)。
154
+ - **本节内容与上文「Release log language」一致:全文英文**(含标题行、Date、Scope、Content)。
149
155
  - 结构建议:
150
156
  - `# ReleaseVx.y.z`
151
157
  - `#### Release Date: YYYY-M-D`
@@ -167,9 +173,9 @@ cc <动作 action> <资源 resource> <其余参数 ...>
167
173
 
168
174
  1. **`bin/cc.js`**:业务命令仍统一为 `await cc[action](argvs)`(`cc` 来自 `./index`);**全局/帮助类**(`--help`、`doctor`、`init` 等)在加载 `./index` **之前**分支;旧版在入口为 `permission` 单独写 `if` 的方式已废弃。
169
175
  2. **`bin/index.js`**:由「直接导出 `cc` 对象」改为 **`modules` + `Proxy`**,以支持以 **第一个单词为动作** 的路由;`doc` 对资源名做存在性校验。
170
- 3. **`permission` 命令语义**:由旧的 `cc permission assign|add|remove`(资源不在第二位)改为符合全局约定的 **`cc assign permission`、`cc add permission`、`cc remove permission`**;`cc get permission` 保持不变。
176
+ 3. **`permission` 命令语义**:由旧的 `cloudcc permission assign|add|remove`(资源不在第二位)改为符合全局约定的 **`cloudcc assign permission`、`cloudcc add permission`、`cloudcc remove permission`**;`cloudcc get permission` 保持不变。
171
177
  4. **`src/permission/index.js`**:与 `pagelayout` 等资源对齐,使用 **`cc` 子对象 + `main(action, argvs)`** 分发,去掉仅服务于旧写法的单参数 argv 分支。
172
- 5. **`.claude/settings.json`** 等:允许/bash 规则从 `cc permission:*` 调整为 `cc assign permission:*` 等新模式(若仍使用 Claude 相关自动化)。
173
- 6. **`bin/cc.js` 全局能力**:`--help`/`help`、`doctor`、`docs`、`init`(别名 `create project`)、`cc <action> -h`;`package.json` **不**注册 `cc-mcp`,MCP `node` + `bin/mcp.js` 路径。
178
+ 5. **`.claude/settings.json`** 等:允许/bash 规则从 `cloudcc permission:*` 调整为 `cloudcc assign permission:*` 等新模式(若仍使用 Claude 相关自动化)。
179
+ 6. **`bin/cc.js` 全局能力**:`--help`/`help`、`doctor`、`docs`、`init`(别名 `create project`)、`cloudcc <action> -h`;MCP 通过 **`cc-mcp`** **`node` + `bin/mcp.js`** 启动。
174
180
 
175
181
  实现新功能时,**以本节与上文「命令行结构」为准**,勿再引入「首词为资源名」的并行体系。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cloudcc-dev-skill
3
- description: CloudCC CRM 二次开发设计,实现工具 。用于在设计方案和实际开发时使用,优先通过各模块的 `cc doc <module> introduction` 与 `cc doc <module> devguide` 获取文档。用户提到 CloudCC、cloudcc-cli、`cc doc`、模块文档、设计方案、开发文档、项目初始化、开发环境、对象、字段、菜单、应用、类、定时类、触发器、自定义组件、自定义页面、自定义设置、客户端脚本、静态资源 时应优先使用。
3
+ description: CloudCC CRM 二次开发设计,实现工具 。用于在设计方案和实际开发时使用,优先通过各模块的 `cloudcc doc <module> introduction` 与 `cloudcc doc <module> devguide` 获取文档。用户提到 CloudCC、cloudcc-cli、`cloudcc doc`、模块文档、设计方案、开发文档、项目初始化、开发环境、对象、字段、菜单、应用、类、定时类、触发器、自定义组件、自定义页面、自定义设置、客户端脚本、静态资源 时应优先使用。
4
4
  ---
5
5
 
6
6
  # CloudCC CLI skill
@@ -12,60 +12,60 @@ description: CloudCC CRM 二次开发设计,实现工具 。用于在设计方
12
12
 
13
13
  ### 基础与环境
14
14
 
15
- - 开发环境设置:`cc doc project introduction`、`cc doc project devguide`
16
- - 开发环境密钥配置:`cc doc config devguide`
15
+ - 开发环境设置:`cloudcc doc project introduction`、`cloudcc doc project devguide`
16
+ - 开发环境密钥配置:`cloudcc doc config devguide`
17
17
 
18
18
  ### 元数据与模型设计
19
19
 
20
- - 对象:`cc doc object introduction`、`cc doc object devguide`
21
- - 对象字段:`cc doc fields introduction`、`cc doc fields devguide`
22
- - 对象记录类型:`cc doc recordType introduction`、`cc doc recordType devguide`
23
- - 全局选项列表:`cc doc globalSelectList introduction`、`cc doc globalSelectList devguide`
20
+ - 对象:`cloudcc doc object introduction`、`cloudcc doc object devguide`
21
+ - 对象字段:`cloudcc doc fields introduction`、`cloudcc doc fields devguide`
22
+ - 对象记录类型:`cloudcc doc recordType introduction`、`cloudcc doc recordType devguide`
23
+ - 全局选项列表:`cloudcc doc globalSelectList introduction`、`cloudcc doc globalSelectList devguide`
24
24
 
25
25
  ### 权限与组织管理
26
26
 
27
- - 用户:`cc doc user introduction`、`cc doc user devguide`
28
- - 角色:`cc doc role introduction`、`cc doc role devguide`
29
- - 简档:`cc doc profile introduction`、`cc doc profile devguide`
27
+ - 用户:`cloudcc doc user introduction`、`cloudcc doc user devguide`
28
+ - 角色:`cloudcc doc role introduction`、`cloudcc doc role devguide`
29
+ - 简档:`cloudcc doc profile introduction`、`cloudcc doc profile devguide`
30
30
 
31
31
  ### 业务扩展(后端)
32
32
 
33
- - 后端类:`cc doc classes introduction`、`cc doc classes devguide`
34
- - 触发器:`cc doc triggers introduction`、`cc doc triggers devguide`
35
- - 定时类:`cc doc timer introduction`、`cc doc timer devguide`
36
- - 定时作业:`cc doc scheduleJob introduction`、`cc doc scheduleJob devguide`
33
+ - 后端类:`cloudcc doc classes introduction`、`cloudcc doc classes devguide`
34
+ - 触发器:`cloudcc doc triggers introduction`、`cloudcc doc triggers devguide`
35
+ - 定时类:`cloudcc doc timer introduction`、`cloudcc doc timer devguide`
36
+ - 定时作业:`cloudcc doc scheduleJob introduction`、`cloudcc doc scheduleJob devguide`
37
37
 
38
38
  ### 业务扩展(前端)
39
39
 
40
- - 自定义组件:`cc doc plugin introduction`、`cc doc plugin devguide`
41
- - 自定义页面:`cc doc customPage introduction`、`cc doc customPage devguide`
42
- - 客户端脚本:`cc doc script introduction`、`cc doc script devguide`
43
- - 静态资源:`cc doc staticResource introduction`、`cc doc staticResource devguide`
40
+ - 自定义组件:`cloudcc doc plugin introduction`、`cloudcc doc plugin devguide`
41
+ - 自定义页面:`cloudcc doc customPage introduction`、`cloudcc doc customPage devguide`
42
+ - 客户端脚本:`cloudcc doc script introduction`、`cloudcc doc script devguide`
43
+ - 静态资源:`cloudcc doc staticResource introduction`、`cloudcc doc staticResource devguide`
44
44
 
45
45
  ### 平台配置与导航
46
46
 
47
- - 菜单:`cc doc menu introduction`、`cc doc menu devguide`
48
- - 应用:`cc doc application introduction`、`cc doc application devguide`
49
- - 自定义设置:`cc doc customSetting introduction`、`cc doc customSetting devguide`
47
+ - 菜单:`cloudcc doc menu introduction`、`cloudcc doc menu devguide`
48
+ - 应用:`cloudcc doc application introduction`、`cloudcc doc application devguide`
49
+ - 自定义设置:`cloudcc doc customSetting introduction`、`cloudcc doc customSetting devguide`
50
50
 
51
51
  ## 使用场景
52
52
 
53
53
  ### 1. 快速了解CloudCC CRM每个模块的定义信息
54
54
 
55
55
  - 比如做方案设计、实现设计、模块选型时,优先调用每个模块的`introduction`文档。
56
- - 命令格式:`cc doc <module> introduction`
56
+ - 命令格式:`cloudcc doc <module> introduction`
57
57
  - 目标:先理解模块定位、适用场景、能力边界。
58
58
 
59
59
  ### 2. 要了解某个CloudCC CRM 环境状态
60
60
 
61
- - 先创建模版项目`cc create project demo`
61
+ - 先创建模版项目`cloudcc create project demo`
62
62
  - 配置开发者密钥
63
63
  - 调用每个模块的 `devguide`
64
- 文档,命令格式:`cc doc <module> devguide`,了解如何查询系统数据
64
+ 文档,命令格式:`cloudcc doc <module> devguide`,了解如何查询系统数据
65
65
 
66
66
  ### 3. 要进行二开实施
67
67
 
68
- - 先创建模版项目`cc create project demo`
68
+ - 先创建模版项目`cloudcc create project demo`
69
69
  - 配置开发者密钥
70
70
  - 调用每个模块的 `devguide`
71
- 文档,命令格式:`cc doc <module> devguide`,了解如何创建,修改数据
71
+ 文档,命令格式:`cloudcc doc <module> devguide`,了解如何创建,修改数据
package/README.md CHANGED
@@ -10,24 +10,49 @@ npm i -g cloudcc-cli
10
10
  sudo npm i -g cloudcc-cli
11
11
  ```
12
12
 
13
+ Verify the install (recommended on macOS/Linux — use **`cloudcc`** so it is not confused with the system C compiler **`cc`**):
14
+
15
+ ```bash
16
+ cloudcc --version
17
+ # or (same binary, alternate name)
18
+ cc --version
19
+ ```
20
+
13
21
  ## CLI overview
14
22
 
15
- The `cc` entry point (`bin/cc.js`) has two layers:
23
+ The CLI ships two global command names for the same entry (`bin/cc.js`): **`cc`** and **`cloudcc`**. On macOS/Linux, **`cloudcc`** is recommended so it does not collide with the system C compiler (`/usr/bin/cc` is often clang/gcc). **`cc`** remains for backward compatibility.
24
+
25
+ Both names expose two layers:
16
26
 
17
- 1. **Global / maintenance commands** (handled before the `action + resource` router): `--help` / `-h` / `cc help`, `--version` / `-v`, `update`, `uninstall`, `doctor`, `docs`, `stats` (local command usage statistics), `init` (equivalent to `cc create project`), and `cc <action> -h` or `cc <action> --help` to list **resources** that support the given **action**.
18
- 2. **Business commands**: `cc <action> <resource> [...]` dispatched through `bin/index.js` (Proxy) to `src/<resource>/index.js`.
27
+ 1. **Global / maintenance commands** (handled before the `action + resource` router): `--help` / `-h` / `cloudcc help`, `--version` / `-v`, `update`, `uninstall`, `doctor`, `docs`, `stats` (local command usage statistics), `init` (equivalent to `cloudcc create project`), and `cloudcc <action> -h` or `cloudcc <action> --help` to list **resources** that support the given **action**.
28
+ 2. **Business commands**: `cloudcc <action> <resource> [...]` dispatched through `bin/index.js` (Proxy) to `src/<resource>/index.js`.
19
29
 
20
- Run **`cc --help`** for the full command list: modules follow `bin/index.js` `modules` keys, with short module hints and per-line descriptions maintained in `src/version/listModuleCommands.js`. When you add a resource, update **`MODULE_KEYS_ORDER`** and **`MODULE_FOLDER`** (and optional **`MODULE_HINT`** / **`RESOURCE_CN`** / **`describeActionLine`**) so `--help` and `cc <action> -h` stay accurate.
30
+ Run **`cloudcc --help`** or **`cc --help`** for the full command list: modules follow `bin/index.js` `modules` keys, with short module hints and per-line descriptions maintained in `src/version/listModuleCommands.js`. When you add a resource, update **`MODULE_KEYS_ORDER`** and **`MODULE_FOLDER`** (and optional **`MODULE_HINT`** / **`RESOURCE_CN`** / **`describeActionLine`**) so `--help` and `cloudcc <action> -h` stay accurate.
21
31
 
22
- **Implementation note:** `doctor`, `docs`, `stats`, `actionHelp`, and `initHelp` are **not** attached to `src/version/index.js` as `cc.*` handlers; `cc.js` loads them directly so the generated help does not show misleading lines such as `cc doctor version`.
32
+ **Implementation note:** `doctor`, `docs`, `stats`, `actionHelp`, and `initHelp` are **not** attached to `src/version/index.js` as `cc.*` handlers; `cc.js` loads them directly so the generated help does not show misleading lines such as `cloudcc doctor version`.
23
33
 
24
34
  ## Version output and changelog
25
35
 
26
- When you run **`cc --version`** / **`-v`** or when the built-in **version check** compares your install to the npm registry (e.g. during `cc update` / `checkUpdate`), the CLI prints the relevant **`# ReleaseV…`** sections from the package **`README.md`** (parsed at runtime via `utils/readmeReleases.js`). Output is rendered with **`utils/formatReleaseNotes.js`**: terminal-width wrapping, continuation lines aligned under the bullet text, and inline `` `code` `` spans kept intact so styling does not break across lines.
36
+ - **`cloudcc --version`** / **`-v`**: prints the installed version string only (no embedded release notes).
37
+ - **Registry version check** (`utils/checkVersion.js`, e.g. during **`cloudcc update`** or **`checkUpdate`** on pull/create flows): after comparing to npm, **only if a newer package exists** does the CLI print the relevant **`# ReleaseV…`** sections from **`README.md`** for versions **strictly after** the current install through **latest** (`utils/readmeReleases.js` → **`getReleasesBetween`**). If you are already up to date, no release block is printed (the panel still links to npm changelog). Rendering uses **`utils/formatReleaseNotes.js`**: terminal-width wrapping, aligned continuation lines, and safe inline `` `code` `` handling.
27
38
 
28
39
  ## MCP configuration
29
40
 
30
- `package.json` **does not** publish a `cc-mcp` binary. Start the MCP server with **Node** and the path to the bundled script:
41
+ After **`npm i -g cloudcc-cli`**, the package publishes a **`cc-mcp`** binary (→ `bin/mcp.js`). If your IDE **`mcp.json`** uses a command name (not `node` + `args`), use:
42
+
43
+ ```json
44
+ {
45
+ "mcpServers": {
46
+ "cloudcc-cli": {
47
+ "command": "cc-mcp"
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ Ensure the npm global bin directory is on **`PATH`** (same as for `cloudcc` / `cc`). On Windows the shim is typically **`cc-mcp.cmd`**.
54
+
55
+ **Alternative** (explicit Node + script path):
31
56
 
32
57
  ```json
33
58
  {
@@ -40,12 +65,43 @@ When you run **`cc --version`** / **`-v`** or when the built-in **version check*
40
65
  }
41
66
  ```
42
67
 
43
- After a global install, resolve the script path on macOS/Linux with:
68
+ Resolve the script path on macOS/Linux with:
44
69
 
45
70
  ```bash
46
71
  echo "$(npm root -g)/cloudcc-cli/bin/mcp.js"
47
72
  ```
48
73
 
74
+ # ReleaseV2.3.7
75
+
76
+ #### Release Date: 2026-4-1
77
+
78
+ #### Release Scope: Full
79
+
80
+ #### Release Content
81
+
82
+ - MCP
83
+ - **`cc-mcp`** (`package.json` → `bin/mcp.js`) is the recommended way to start the MCP server from IDE **`mcp.json`**; README **MCP configuration**, `src/project/docs/devguide.md` (section 5 and checklist), and **`.cursor/skills/cloudcc-cli-dev/SKILL.md`** are aligned, with **`node` + absolute path to `bin/mcp.js`** still documented as an alternative
84
+ - Documentation
85
+ - Release notes and **`package.json` / npm** version aligned to **2.3.7**
86
+
87
+ # ReleaseV2.3.6
88
+
89
+ #### Release Date: 2026-4-1
90
+
91
+ #### Release Scope: Full
92
+
93
+ #### Release Content
94
+
95
+ - CLI
96
+ - **`cloudcc` bin** (same entry as `cc` / `bin/cc.js`): avoids clashing with the system C compiler on Unix; MCP **`mcp/cliRunner.js`** spawns **`cloudcc`** / **`cloudcc.cmd`**
97
+ - **Command usage statistics** (default on): records `cloudcc <action> <resource>`-style keys (e.g. `` `cloudcc doc classes` `` for `` `cloudcc doc classes devguide` ``) in `` `~/.cloudcc-cli/command-stats.json` `` via **`utils/commandStats.js`** and **`bin/cc.js`**; run **`cloudcc stats`** to view; set **`CLOUDCC_CLI_STATS=0`** / **`false`** / **`off`** to disable
98
+ - Terminal hints / **`cloudcc --help`** output: user-facing examples prefer **`cloudcc`**; **`cc`** remains an alias
99
+ - **Changelog in terminal**: README **`# ReleaseV…`** excerpts print **only when the registry reports a newer version** than the running install (`utils/checkVersion.js`); **`cloudcc --version`** no longer dumps the current release section
100
+ - Documentation
101
+ - README: post-install **`cloudcc --version`** / **`cc --version`** check; **`cloudcc --help`** vs **`cc --help`** wording; CLI overview and release log structure updates
102
+ - **`src/**/docs/*.md`** and inline CLI usage strings: examples use **`cloudcc`** where a shell command is shown (internal code patterns **`cc.*`** unchanged)
103
+ - Cursor skills (**`cloudcc-cli-dev`**, **`cloudcc-dev-skill`**) aligned with **`cloudcc`** / **`cc`** dual entry
104
+
49
105
  # ReleaseV2.3.5
50
106
 
51
107
  #### Release Date: 2026-4-1
@@ -55,12 +111,11 @@ echo "$(npm root -g)/cloudcc-cli/bin/mcp.js"
55
111
  #### Release Content
56
112
 
57
113
  - CLI
58
- - Global commands: `doctor`, `docs`, `cc help`, `init` (alias for `cc create project`), clearer empty-argv / missing-resource hints, and `cc <action> -h` to list resources for an action
59
- - Richer `cc --help`: grouped modules, hints, and per-command descriptions via `src/version/listModuleCommands.js`
60
- - Removed `cc-mcp` from `package.json` `bin`; MCP is documented to use `node` and `bin/mcp.js`
61
- - Version checks and **`cc --version`** show **`# ReleaseV…`** blocks from **`README.md`** (`utils/readmeReleases.js`); `utils/checkVersion.js` prints notes when comparing to the registry
114
+ - Global commands: `doctor`, `docs`, `cloudcc help`, `init` (alias for `cloudcc create project`), clearer empty-argv / missing-resource hints, and `cloudcc <action> -h` to list resources for an action
115
+ - Richer `cloudcc --help`: grouped modules, hints, and per-command descriptions via `src/version/listModuleCommands.js`
116
+ - `cc-mcp` was temporarily removed from `package.json` `bin` in favor of `node` + `bin/mcp.js` only; **`cc-mcp` was restored in v2.3.6**; **v2.3.7** aligns README, project devguide, and **`cloudcc-cli-dev` SKILL** with **`"command": "cc-mcp"`** setup docs
117
+ - Version checks compare to the registry; **`# ReleaseV…`** excerpts from **`README.md`** were shown together with that check (behavior refined in v2.3.6: notes only when an upgrade exists)
62
118
  - Terminal-friendly release notes: width-aware wrapping, aligned continuation lines, **`utils/formatReleaseNotes.js`** styling, and safe handling of inline `` `code` `` when wrapping
63
- - **Command usage statistics** (default on): records `cc <action> <resource>`-style keys (e.g. `` `cc doc classes` `` for `` `cc doc classes devguide` ``) in `` `~/.cloudcc-cli/command-stats.json` `` via **`utils/commandStats.js`** and **`bin/cc.js`**; run **`cc stats`** to view; set **`CLOUDCC_CLI_STATS=0`** / **`false`** / **`off`** to disable
64
119
  - MCP
65
120
  - New tool **`get_jsp_migration_rules`**: returns fixed JSP migration rules (resolve JSP under `customize` from `name=` URLs, suggested batch flow, **`PageClsInvoker`** invocation patterns); **`analyze_jsp_migration`** / **`split_jsp_to_cloudcc`** descriptions updated to recommend calling it before batch migration
66
121
  - Documentation
package/bin/cc.js CHANGED
@@ -21,16 +21,16 @@ function runVersion(subAction, argvSlice) {
21
21
 
22
22
  function hintCcHelp() {
23
23
  console.error()
24
- console.error(chalk.yellow("用法:") + chalk.green(" cc ") + chalk.gray("<action> <resource> [args...]"))
25
- console.error(chalk.gray("完整帮助:") + chalk.green("cc --help") + chalk.gray(" 或 ") + chalk.green("cc -h") + chalk.gray(" 或 ") + chalk.green("cc help"))
24
+ console.error(chalk.yellow("用法:") + chalk.green(" cloudcc ") + chalk.gray("<action> <resource> [args...]"))
25
+ console.error(chalk.gray("完整帮助:") + chalk.green("cloudcc --help") + chalk.gray(" 或 ") + chalk.green("cloudcc -h") + chalk.gray(" 或 ") + chalk.green("cloudcc help"))
26
26
  console.error()
27
27
  }
28
28
 
29
29
  function hintMissingResource(act) {
30
30
  console.error()
31
- console.error(chalk.yellow("缺少 resource:") + chalk.green(`cc ${act} <resource> ...`))
32
- console.error(chalk.gray("查看该 action 下可用的 resource:") + chalk.green(`cc ${act} -h`))
33
- console.error(chalk.gray("查看全部命令:") + chalk.green("cc --help"))
31
+ console.error(chalk.yellow("缺少 resource:") + chalk.green(`cloudcc ${act} <resource> ...`))
32
+ console.error(chalk.gray("查看该 action 下可用的 resource:") + chalk.green(`cloudcc ${act} -h`))
33
+ console.error(chalk.gray("查看全部命令:") + chalk.green("cloudcc --help"))
34
34
  console.error()
35
35
  }
36
36
 
@@ -117,7 +117,7 @@ async function runWithArgvs(argv) {
117
117
  await cc[act](argv)
118
118
  } catch (e) {
119
119
  console.error()
120
- console.error(chalk.yellow("请查看帮助:cc --help"), e)
120
+ console.error(chalk.yellow("请查看帮助:cloudcc --help"), e)
121
121
  console.error()
122
122
  }
123
123
  }
package/mcp/cliRunner.js CHANGED
@@ -1,11 +1,11 @@
1
1
  const { spawnSync } = require("child_process");
2
2
 
3
3
  const CC_NOT_FOUND_HINT =
4
- "未找到 cc 命令。请将 cloudcc-cli 全局安装并确保 PATH 可用:npm install -g cloudcc-cli";
4
+ "未找到 cloudcc 命令。请将 cloudcc-cli 全局安装并确保 PATH 可用:npm install -g cloudcc-cli(与系统 C 编译器 cc 区分,请使用 cloudcc)";
5
5
 
6
6
  function runCcCommand(args, options = {}) {
7
7
  const { cwd = process.cwd(), timeoutMs = 120000 } = options;
8
- const ccCommand = process.platform === "win32" ? "cc.cmd" : "cc";
8
+ const ccCommand = process.platform === "win32" ? "cloudcc.cmd" : "cloudcc";
9
9
 
10
10
  const result = spawnSync(ccCommand, args, {
11
11
  cwd,
@@ -59,7 +59,7 @@ async function createApplicationTool(params = {}) {
59
59
  return {
60
60
  content: [{
61
61
  type: 'text',
62
- text: `⚠ 应用创建遇到问题\n\n${buildRunDetail(runResult) || 'cc 命令执行失败'}\n\n请检查:\n1. 应用名称和应用代码是否符合规范\n2. CloudCC服务器连接是否正常\n3. 项目配置是否正确\n4. 是否有足够的权限创建应用\n5. 菜单ID是否正确`
62
+ text: `⚠ 应用创建遇到问题\n\n${buildRunDetail(runResult) || 'cloudcc 命令执行失败'}\n\n请检查:\n1. 应用名称和应用代码是否符合规范\n2. CloudCC服务器连接是否正常\n3. 项目配置是否正确\n4. 是否有足够的权限创建应用\n5. 菜单ID是否正确`
63
63
  }]
64
64
  };
65
65
  }
@@ -44,7 +44,7 @@ async function getPendingApprovals({
44
44
  const run = runCcJsonCommand(['get', 'approval', process.cwd(), encoded]);
45
45
  if (!run.success) {
46
46
  return {
47
- content: [{ type: 'text', text: `✗ 拉取待审批记录失败: ${run.detail || 'cc 命令执行失败'}` }]
47
+ content: [{ type: 'text', text: `✗ 拉取待审批记录失败: ${run.detail || 'cloudcc 命令执行失败'}` }]
48
48
  };
49
49
  }
50
50
  const result = run.data || {};
@@ -100,7 +100,7 @@ async function approveRecord({
100
100
  const run = runCcJsonCommand(['approve', 'approval', process.cwd(), encoded]);
101
101
  if (!run.success) {
102
102
  return {
103
- content: [{ type: 'text', text: `✗ 审批通过失败: ${run.detail || 'cc 命令执行失败'}` }]
103
+ content: [{ type: 'text', text: `✗ 审批通过失败: ${run.detail || 'cloudcc 命令执行失败'}` }]
104
104
  };
105
105
  }
106
106
  const result = run.data || { success: true };
@@ -153,7 +153,7 @@ async function rejectRecord({ confirm, objid, comment = '', workItemId, token =
153
153
  const run = runCcJsonCommand(['reject', 'approval', process.cwd(), encoded]);
154
154
  if (!run.success) {
155
155
  return {
156
- content: [{ type: 'text', text: `✗ 拒绝审批失败: ${run.detail || 'cc 命令执行失败'}` }]
156
+ content: [{ type: 'text', text: `✗ 拒绝审批失败: ${run.detail || 'cloudcc 命令执行失败'}` }]
157
157
  };
158
158
  }
159
159
  const result = run.data || { success: true };
@@ -20,14 +20,14 @@ async function createClass({ className, projectPath = process.cwd() }) {
20
20
 
21
21
  if (!runResult.success) {
22
22
  const detail = [runResult.error, runResult.stderr, runResult.stdout].filter(Boolean).join('\n');
23
- return { content: [{ type: 'text', text: `✗ 创建失败: ${detail || 'cc 命令执行失败'}` }] };
23
+ return { content: [{ type: 'text', text: `✗ 创建失败: ${detail || 'cloudcc 命令执行失败'}` }] };
24
24
  }
25
25
 
26
26
  const classPath = path.join(resolvedPath, `classes/${className}`);
27
27
  return {
28
28
  content: [{
29
29
  type: 'text',
30
- text: `✓ 创建成功!\n\n调用命令: cc create classes ${className}\n执行目录: ${resolvedPath}\n类路径: ${classPath}\n生成的文件:\n - ${className}.java (主类文件)\n - ${className}Test.java (测试类文件)\n - config.json (配置文件)`
30
+ text: `✓ 创建成功!\n\n调用命令: cloudcc create classes ${className}\n执行目录: ${resolvedPath}\n类路径: ${classPath}\n生成的文件:\n - ${className}.java (主类文件)\n - ${className}Test.java (测试类文件)\n - config.json (配置文件)`
31
31
  }]
32
32
  };
33
33
  } catch (error) {
@@ -19,7 +19,7 @@ async function getClassDetail({ className, classId, projectPath = process.cwd()
19
19
  const args = ['detail', 'classes', className || '', classId || ''];
20
20
  const run = runCcJsonCommand(args, { cwd: resolvedPath });
21
21
  if (!run.success) {
22
- return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || 'cc 命令执行失败'}` }] };
22
+ return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
23
23
  }
24
24
  return { content: [{ type: 'text', text: JSON.stringify(run.data, null, 2) }] };
25
25
  } catch (error) {
@@ -40,7 +40,7 @@ async function editClass({ topic = 'devguide' } = {}) {
40
40
  return {
41
41
  content: [{
42
42
  type: 'text',
43
- text: `✗ 获取编辑指南失败: ${buildRunDetail(run) || 'cc 命令执行失败'}`
43
+ text: `✗ 获取编辑指南失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}`
44
44
  }]
45
45
  };
46
46
  }
@@ -14,7 +14,7 @@ async function listClasses({ projectPath = process.cwd() }) {
14
14
  const resolvedPath = path.resolve(projectPath);
15
15
  const run = runCcJsonCommand(['get', 'classes'], { cwd: resolvedPath });
16
16
  if (!run.success) {
17
- return { content: [{ type: 'text', text: `✗ 查询失败: ${run.detail || 'cc 命令执行失败'}` }] };
17
+ return { content: [{ type: 'text', text: `✗ 查询失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
18
18
  }
19
19
  const classList = run.data || [];
20
20
 
@@ -14,7 +14,7 @@ async function publishClass({ className, projectPath = process.cwd() }) {
14
14
  const resolvedPath = path.resolve(projectPath);
15
15
  const run = runCcCommand(['publish', 'classes', className], { cwd: resolvedPath });
16
16
  if (!run.success) {
17
- return { content: [{ type: 'text', text: `✗ 发布失败: ${buildRunDetail(run) || 'cc 命令执行失败'}` }] };
17
+ return { content: [{ type: 'text', text: `✗ 发布失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
18
18
  }
19
19
  return { content: [{ type: 'text', text: `✓ 发布成功!类 ${className} 已发布到服务器` }] };
20
20
  } catch (error) {
@@ -14,7 +14,7 @@ async function pullClass({ className, projectPath = process.cwd() }) {
14
14
  const resolvedPath = path.resolve(projectPath);
15
15
  const run = runCcCommand(['pull', 'classes', className], { cwd: resolvedPath });
16
16
  if (!run.success) {
17
- return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cc 命令执行失败'}` }] };
17
+ return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
18
18
  }
19
19
  return { content: [{ type: 'text', text: `✓ 拉取成功!本地文件已更新: classes/${className}/${className}.java` }] };
20
20
  } catch (error) {
@@ -21,7 +21,7 @@ async function getClientScriptDetail({ scriptPath, scriptId, projectPath = proce
21
21
  return {
22
22
  content: [{
23
23
  type: 'text',
24
- text: `✗ 获取失败: ${run.detail || 'cc 命令执行失败'}`
24
+ text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}`
25
25
  }]
26
26
  };
27
27
  }
@@ -11,7 +11,7 @@ async function editClientScript({ topic = "overview" } = {}) {
11
11
  return {
12
12
  content: [{
13
13
  type: "text",
14
- text: `✗ 获取编辑指南失败: ${buildRunDetail(run) || "cc 命令执行失败"}`
14
+ text: `✗ 获取编辑指南失败: ${buildRunDetail(run) || "cloudcc 命令执行失败"}`
15
15
  }]
16
16
  };
17
17
  }
@@ -30,7 +30,7 @@ async function listClientScripts({ projectPath = process.cwd(), condition = {} }
30
30
  return {
31
31
  content: [{
32
32
  type: 'text',
33
- text: `✗ 查询失败: ${run.detail || 'cc 命令执行失败'}\n\n可能的原因:\n- 项目路径不正确\n- 网络连接问题\n- 服务器API不可用`
33
+ text: `✗ 查询失败: ${run.detail || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 项目路径不正确\n- 网络连接问题\n- 服务器API不可用`
34
34
  }]
35
35
  };
36
36
  }
@@ -29,7 +29,7 @@ async function publishClientScript({ scriptPath, projectPath = process.cwd() })
29
29
  return {
30
30
  content: [{
31
31
  type: 'text',
32
- text: `✗ 发布失败: ${buildRunDetail(run) || 'cc 命令执行失败'}\n\n可能的原因:\n- 脚本文件不存在\n- 脚本格式不正确(必须包含 function main($CCDK, obj) 函数)\n- 网络连接问题\n- 服务器API不可用`
32
+ text: `✗ 发布失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 脚本文件不存在\n- 脚本格式不正确(必须包含 function main($CCDK, obj) 函数)\n- 网络连接问题\n- 服务器API不可用`
33
33
  }]
34
34
  };
35
35
  }
@@ -31,7 +31,7 @@ async function pullClientScript({ scriptPath, scriptId, projectPath = process.cw
31
31
  if (scriptId) {
32
32
  const run = runCcCommand(['pullList', 'script', scriptId, resolvedPath], { cwd: resolvedPath });
33
33
  if (!run.success) {
34
- return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cc 命令执行失败'}` }] };
34
+ return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
35
35
  }
36
36
  return {
37
37
  content: [{
@@ -42,7 +42,7 @@ async function pullClientScript({ scriptPath, scriptId, projectPath = process.cw
42
42
  }
43
43
  const run = runCcCommand(['pull', 'script', scriptPath], { cwd: resolvedPath });
44
44
  if (!run.success) {
45
- return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cc 命令执行失败'}` }] };
45
+ return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
46
46
  }
47
47
  return {
48
48
  content: [{
@@ -26,7 +26,7 @@ async function getCloudCCDevelopmentOverview({ }) {
26
26
  return {
27
27
  content: [{
28
28
  type: 'text',
29
- text: `✗ 获取 CloudCC 开发项目概要失败: ${buildRunDetail(run) || 'cc 命令执行失败'}`
29
+ text: `✗ 获取 CloudCC 开发项目概要失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}`
30
30
  }]
31
31
  };
32
32
  }
@@ -18,7 +18,7 @@ async function createCustomComponent({ pluginName, projectPath = process.cwd() }
18
18
  return {
19
19
  content: [{
20
20
  type: 'text',
21
- text: `✗ 创建失败: ${buildRunDetail(run) || 'cc 命令执行失败'}`
21
+ text: `✗ 创建失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}`
22
22
  }]
23
23
  };
24
24
  }
@@ -21,7 +21,7 @@ async function getCustomComponentDetail({ pluginName, pluginId, projectPath = pr
21
21
  return {
22
22
  content: [{
23
23
  type: 'text',
24
- text: `✗ 获取失败: ${run.detail || 'cc 命令执行失败'}\n\n可能的原因:\n- 组件不存在\n- 组件名称或ID不正确\n- 网络连接问题`
24
+ text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 组件不存在\n- 组件名称或ID不正确\n- 网络连接问题`
25
25
  }]
26
26
  };
27
27
  }