@eevee-ta/cli 0.1.0-beta.1 → 1.2.0

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 (75) hide show
  1. package/README.md +195 -119
  2. package/assets/skills/eevee-integration/SKILL.md +46 -0
  3. package/assets/skills/eevee-integration/agents/openai.yaml +3 -0
  4. package/assets/skills/eevee-integration/references/intake.md +87 -0
  5. package/assets/skills/eevee-integration/references/java-springboot.md +182 -0
  6. package/assets/skills/eevee-integration/references/umijs.md +210 -0
  7. package/assets/skills/eevee-mcp/SKILL.md +87 -3
  8. package/assets/skills/eevee-mcp/reference.md +31 -2
  9. package/dist/src/bin/cli.js +66 -27
  10. package/dist/src/bin/cli.js.map +1 -1
  11. package/dist/src/commands/business-command.js +9 -4
  12. package/dist/src/commands/business-command.js.map +1 -1
  13. package/dist/src/commands/i18n-command.js +194 -0
  14. package/dist/src/commands/i18n-command.js.map +1 -0
  15. package/dist/src/commands/skill-command.js +80 -29
  16. package/dist/src/commands/skill-command.js.map +1 -1
  17. package/dist/src/lib/business-catalog.js +24 -20
  18. package/dist/src/lib/business-catalog.js.map +1 -1
  19. package/dist/src/lib/config.js +1 -1
  20. package/dist/src/lib/config.js.map +1 -1
  21. package/dist/src/lib/http.js +95 -0
  22. package/dist/src/lib/http.js.map +1 -0
  23. package/dist/src/lib/i18n-exporter.js +402 -0
  24. package/dist/src/lib/i18n-exporter.js.map +1 -0
  25. package/dist/src/lib/i18n-scanner.js +1172 -0
  26. package/dist/src/lib/i18n-scanner.js.map +1 -0
  27. package/dist/src/lib/mcp-client.js +5 -4
  28. package/dist/src/lib/mcp-client.js.map +1 -1
  29. package/dist/src/lib/skill-installer.js +140 -42
  30. package/dist/src/lib/skill-installer.js.map +1 -1
  31. package/dist/src/lib/updater.js +129 -0
  32. package/dist/src/lib/updater.js.map +1 -0
  33. package/dist/src/lib/version.js +55 -0
  34. package/dist/src/lib/version.js.map +1 -0
  35. package/install.sh +203 -0
  36. package/package.json +9 -9
  37. package/scripts/postinstall.mjs +31 -0
  38. package/assets/skills/eevee-migration/SKILL.md +0 -181
  39. package/assets/skills/eevee-project-setup/SKILL.md +0 -266
  40. package/dist/src/commands/intl-command.js +0 -131
  41. package/dist/src/commands/intl-command.js.map +0 -1
  42. package/dist/src/commands/lint-command.js +0 -105
  43. package/dist/src/commands/lint-command.js.map +0 -1
  44. package/dist/src/lib/intl-catalog.js +0 -58
  45. package/dist/src/lib/intl-catalog.js.map +0 -1
  46. package/dist/src/lib/intl-config.js +0 -125
  47. package/dist/src/lib/intl-config.js.map +0 -1
  48. package/dist/src/lib/intl-downloader.js +0 -217
  49. package/dist/src/lib/intl-downloader.js.map +0 -1
  50. package/dist/src/lib/intl-serializers/csv.js +0 -25
  51. package/dist/src/lib/intl-serializers/csv.js.map +0 -1
  52. package/dist/src/lib/intl-serializers/custom.js +0 -23
  53. package/dist/src/lib/intl-serializers/custom.js.map +0 -1
  54. package/dist/src/lib/intl-serializers/index.js +0 -22
  55. package/dist/src/lib/intl-serializers/index.js.map +0 -1
  56. package/dist/src/lib/intl-serializers/js.js +0 -10
  57. package/dist/src/lib/intl-serializers/js.js.map +0 -1
  58. package/dist/src/lib/intl-serializers/json.js +0 -7
  59. package/dist/src/lib/intl-serializers/json.js.map +0 -1
  60. package/dist/src/lib/intl-serializers/properties.js +0 -43
  61. package/dist/src/lib/intl-serializers/properties.js.map +0 -1
  62. package/dist/src/lib/intl-serializers/ts.js +0 -16
  63. package/dist/src/lib/intl-serializers/ts.js.map +0 -1
  64. package/dist/src/lib/intl-serializers/xml.js +0 -21
  65. package/dist/src/lib/intl-serializers/xml.js.map +0 -1
  66. package/dist/src/lib/lint-config.js +0 -180
  67. package/dist/src/lib/lint-config.js.map +0 -1
  68. package/dist/src/lib/lint-java.js +0 -226
  69. package/dist/src/lib/lint-java.js.map +0 -1
  70. package/dist/src/lib/lint-types.js +0 -2
  71. package/dist/src/lib/lint-types.js.map +0 -1
  72. package/dist/src/lib/lint-web.js +0 -183
  73. package/dist/src/lib/lint-web.js.map +0 -1
  74. package/dist/src/lib/lint.js +0 -192
  75. package/dist/src/lib/lint.js.map +0 -1
package/README.md CHANGED
@@ -1,11 +1,42 @@
1
- # @eevee/cli
1
+ # @eevee-ta/cli
2
2
 
3
- `@eevee/cli` 是 eevee MCP 服务的业务化命令行客户端和 Agent Skill 管理工具。公开命令采用稳定 `<group> <action>` 规范;也可以继续使用完整 MCP 能力(tools/resources/prompts/request/notify)。CLI 可直接给 Codex、Claude Code 或其他终端 Agent 使用,也适合人工排查 eevee 数据。
3
+ `@eevee-ta/cli` 是 eevee MCP 服务的业务化命令行客户端和 Agent Skill 管理工具。公开命令采用稳定 `<group> <action>` 规范;也可以继续使用完整 MCP 能力(tools/resources/prompts/request/notify)。CLI 可直接给 Codex、Claude Code 或其他终端 Agent 使用,也适合人工排查 eevee 数据。
4
4
 
5
- 运行时零依赖,只需要 Node.js 20.4+。
5
+ 运行时零依赖,只需要 Node.js 16+。
6
6
 
7
7
  ## 安装
8
8
 
9
+ ### 一键安装(推荐)
10
+
11
+ 使用 OSS 一键安装:
12
+
13
+ ```bash
14
+ curl -fsSL http://tga-doc.oss-accelerate-overseas.aliyuncs.com/eevee-dev/install.sh | bash
15
+ # 或
16
+ wget -qO- http://tga-doc.oss-accelerate-overseas.aliyuncs.com/eevee-dev/install.sh | bash
17
+ ```
18
+
19
+ 安装器会:
20
+
21
+ 1. 检查 `curl/wget`、`tar`、系统架构和 musl/glibc 环境;
22
+ 2. 下载并安装新 CLI 前,先检查并删除旧平台 `tant-intl-agent-cli`,避免 `eevee` 命令冲突;
23
+ 3. Node.js 缺失或低于 16 时,从 npmmirror 下载用户级 Node.js 到 `~/.eevee/node`;
24
+ 4. 使用用户级 npm 全局目录 `~/.eevee/npm`,从国内 npm 镜像安装 `@eevee-ta/cli@latest`,并将两个目录写入 shell PATH;
25
+ 5. 自动探测并复制 Skill 到已安装 Agent 的全局目录。
26
+
27
+ 可用环境变量定制:
28
+
29
+ | 变量 | 默认值 |
30
+ |---|---|
31
+ | `EEVEE_PACKAGE_NAME` | `@eevee-ta/cli` |
32
+ | `EEVEE_NODE_VERSION` | `22.21.1` |
33
+ | `EEVEE_NODE_MIRROR` | `https://npmmirror.com/mirrors/node` |
34
+ | `EEVEE_NPM_REGISTRY` | `https://registry.npmmirror.com` |
35
+ | `EEVEE_NODE_HOME` | `~/.eevee/node` |
36
+ | `EEVEE_NPM_PREFIX` | `~/.eevee/npm` |
37
+
38
+ ### npm 安装
39
+
9
40
  本地开发或全局启用:
10
41
 
11
42
  ```bash
@@ -18,15 +49,40 @@ npm link # 同时提供 eevee 和 eevee-cli 命令
18
49
  已发布后从 npm 安装:
19
50
 
20
51
  ```bash
21
- npm install -g @eevee/cli@latest
52
+ npm install -g @eevee-ta/cli@latest
22
53
  ```
23
54
 
55
+ npm 包的 `postinstall` 也会自动执行 Skill 迁移;如果安装时使用 `--ignore-scripts`,可手动执行 `eevee skills update --auto --global --force`。
56
+
24
57
  从本地仓库目录全局安装:
25
58
 
26
59
  ```bash
27
60
  npm install -g .
28
61
  ```
29
62
 
63
+ ## 版本更新
64
+
65
+ CLI 每次执行命令时会检查 npm dist-tag 中的 `latest`。发现新版本时:
66
+
67
+ - 交互终端会询问是否立即更新;
68
+ - 非交互终端会输出更新命令,不阻塞当前命令;
69
+ - 更新成功后会立即触发 Skill 迁移,并提示重新执行原命令。
70
+
71
+ 也可主动检查并更新:
72
+
73
+ ```bash
74
+ eevee update
75
+ eevee update --yes
76
+ eevee update --yes --registry https://registry.npmmirror.com
77
+ ```
78
+
79
+ 默认 npm 镜像是 `https://registry.npmmirror.com`,可用 `EEVEE_NPM_REGISTRY` 覆盖。跳过启动检查:
80
+
81
+ ```bash
82
+ EEVEE_SKIP_UPDATE_CHECK=1 eevee ping
83
+ eevee ping --no-update-check
84
+ ```
85
+
30
86
  ## 配置服务器地址和 token
31
87
 
32
88
  ```bash
@@ -70,6 +126,8 @@ eevee config unset --token
70
126
  | `eevee <group> <action>` | 推荐:执行 project、version、term、translation 等约 50 个业务动作 |
71
127
  | `eevee business` / `eevee -h` | 查看全部业务命令;`-h` 会列全协议命令 |
72
128
  | `eevee <group> <action> --help` | 查看该动作的 path/query/body 参数和类型 |
129
+ | `eevee i18n scan` | 本地扫描 JS/TS/JSX/Vue 与 Java Spring Boot 项目中的硬编码词条 |
130
+ | `eevee update` | 检查、交互确认并更新到 npm latest,同时迁移 Skill |
73
131
  | `eevee config show/set/get/unset/path` | 管理服务器地址和用户 token |
74
132
  | `eevee doctor` | 校验配置、MCP 连接、tools/list 和已装 Skill |
75
133
  | `eevee ping` | 完成完整 MCP initialize 握手并调用 ping |
@@ -78,8 +136,7 @@ eevee config unset --token
78
136
  | `eevee prompts ...` | list/get |
79
137
  | `eevee request <method>` | 调用任意标准 MCP JSON-RPC method |
80
138
  | `eevee notify <method>` | 发送 JSON-RPC notification |
81
- | `eevee skills install/update/...` | 安装内置 Agent Skill 到 Claude/Codex/global 目录 |
82
- | `eevee lint [files...]` | 本地国际化检查;`eslint-plugin-eevee/no-created` 的 CLI 迁移版 |
139
+ | `eevee skills install/update/...` | 安装/更新内置 Agent Skill 到 Codex、Claude Code、Cursor、OpenCode 或自定义目录 |
83
140
 
84
141
  联网命令均支持临时覆盖:
85
142
 
@@ -90,153 +147,154 @@ eevee --url https://staging.example.com/mcp \
90
147
  ping
91
148
  ```
92
149
 
93
- ## 本地国际化检查
150
+ ## 国际化扫描与导出
151
+
152
+ ### 服务端词条导出
94
153
 
95
- `eevee lint` 把 `eslint-plugin-eevee` 的 `no-created` 规则迁移为本地检查器。Web 适配器直接解析
96
- TypeScript AST,支持 `.ts`、`.tsx`、`.js`、`.jsx`、`.mjs` 和 `.cjs`,不依赖目标项目安装 ESLint:
154
+ 按项目 `intl.json` 的 `outPaths / projectIds / tags` 配置从 EEVEE 服务端导出词条:
97
155
 
98
156
  ```bash
99
- eevee lint
100
- eevee lint apps/gaia/src
101
- eevee lint --staged
102
- eevee lint --source changed
103
- eevee lint --language web --json
157
+ eevee i18n export # 默认写 path(开发目录)
158
+ eevee i18n export --target build # 写 buildPath(线上目录)
159
+ eevee i18n export --env online # --target build 的语义别名
160
+ eevee i18n export --dry-run --json
104
161
  ```
105
162
 
106
- 检查配置优先读取 `.eevee-lint.json`、`.eeveerc.json`,然后读取 `package.json` 的 `eevee.lint`:
163
+ 每次只写入一个目录:`dev/offline` 使用 `path`,`build/online` 使用 `buildPath`。旧配置中以 `/` 开头的输出路径按项目根内路径处理。
164
+
165
+ 导出配置支持:
107
166
 
108
167
  ```json
109
168
  {
110
- "eevee": {
111
- "lint": {
112
- "refresh": {
113
- "config": "intl.download.json"
114
- },
115
- "languages": {
116
- "web": {
117
- "enabled": true,
118
- "root": ".",
119
- "intlConfig": "intl.json",
120
- "includes": ["apps/**/*.{ts,tsx,js,jsx}"],
121
- "excludes": ["**/*.test.*", "**/mock/**"],
122
- "excludeAscii": true,
123
- "tagMatchMap": {
124
- "apps/gaia/**/*": ["gaia"],
125
- "apps/sso/**/*": ["sso"]
126
- },
127
- "excludeProperties": ["title", "description"],
128
- "excludeTrack": true
169
+ "format": "json",
170
+ "groupByTag": true,
171
+ "clean": true,
172
+ "localeAliases": {
173
+ "zh-CN": "zh",
174
+ "en-US": "en"
175
+ },
176
+ "outPaths": [
177
+ {
178
+ "path": "/apps/gaia/public/intl/",
179
+ "buildPath": "/apps/gaia/public/intl/",
180
+ "projectIds": [
181
+ {
182
+ "projectId": 12,
183
+ "branchIds": [21, 22],
184
+ "tags": ["gaia"]
129
185
  },
130
- "java": {
131
- "enabled": true,
132
- "root": ".",
133
- "intlConfig": ".eevee/intl.json",
134
- "includes": ["*/src/main/java/**/*.java"],
135
- "excludes": ["**/src/test/**", "**/generated/**"],
136
- "tagMatchMap": {
137
- "*/src/main/java/**/*": ["server"]
138
- },
139
- "localeMethods": ["getLocaleMessage", "tryLocaleMessage", "getMessage"],
140
- "checkHardcoded": true,
141
- "excludeMethods": ["trace", "debug", "info", "warn", "error"]
186
+ {
187
+ "projectId": 1,
188
+ "branchIds": [],
189
+ "tags": ["portal", "talos", null]
142
190
  }
143
- }
191
+ ]
144
192
  }
145
- }
193
+ ]
146
194
  }
147
195
  ```
148
196
 
149
- `intlConfig` 复用旧插件的 `intl.json` 结构;CLI 只读取 `outPaths` 下的 `zh-CN*.json` 作为平台词条。
150
- `excludePropertys` 和 `execludeTrack` 这两个旧拼写继续兼容,推荐新配置使用上面的规范拼写。
197
+ 规则:
151
198
 
152
- `eevee lint` 在检查前强制同步一次平台词条快照,下载完成后再读取 `intlConfig` 指向的本地 JSON。
153
- `refresh.config` 指向 `eevee intl download` 使用的目标数组配置;不配置时默认读取项目
154
- `package.json` 的 `eevee.intl`。
199
+ - `branchIds` 是 EEVEE 版本 ID 数组,`[]` 表示全部版本。数组内按配置顺序拉取,跨版本重复 key 由后配置版本覆盖;
200
+ - `tags: []` 表示全部词条;
201
+ - `tags: [null]` 表示无标签词条,也可以和普通标签混用;
202
+ - `format` 支持 `json`、`js`、`ts`、`property`、`properties`;`js/ts` 输出 ESM `export default`;
203
+ - `groupByTag: true` 输出 `语言-标签.格式`;`false` 输出 `语言.格式`;
204
+ - `localeAliases` 只影响输出文件名,例如 `zh-CN` 配置为 `zh` 后输出 `zh-web.json`;
205
+ - `clean: true` 时仅清理输出目录中符合当前语言命名规则的旧导出文件,再写入新文件;
206
+ - 项目和标签都按配置顺序处理;不按标签分组合并时,重复 key 由后配置的项目/标签覆盖;
207
+ - token 优先级为 `--token`、`EEVEE_TOKEN`、`intl.json` 的 `token`、本机 CLI 配置;`intl.json` 适合配置基础数据读取 token,个人 token 不建议提交到仓库。
155
208
 
156
- 同步失败、平台返回 0 词条、本地词条文件解析失败,都会直接阻断检查;不会退回旧快照,也不会提供
157
- `--no-refresh` 旁路。词条同步成功但代码引用的 key 未登记时,诊断为 `unregistered`,退出码同样是 `1`。
209
+ `i18n scan` 迁移自 `@tant/eslint-plugin-eevee` 的核心检查能力,但不要求目标项目安装 ESLint 插件,也不需要 Node 项目改造:
158
210
 
159
211
  ```bash
160
- # 使用独立下载目标配置;同步仍然强制执行
161
- eevee lint --refresh-config intl.download.json
212
+ eevee i18n scan
213
+ eevee i18n scan /path/to/project
214
+ eevee i18n scan --json
215
+ eevee i18n scan --include 'src/main/java/**/*.java' --exclude '**/generated/**'
162
216
  ```
163
217
 
164
- 提交前推荐使用:
218
+ CLI 会默认依次查找:
165
219
 
166
- ```bash
167
- eevee lint --staged
220
+ ```text
221
+ intl.json
222
+ .eevee/i18n.json
223
+ eevee.i18n.json
168
224
  ```
169
225
 
170
- 发现问题退出码为 `1`。`--json` 输出 `{ok:true,data}` envelope,其中 `data.passed=false` 表示检查执行成功但存在诊断;
171
- 配置或执行失败仍是 `{ok:false}`。每条诊断包含 `code`、精确位置、原文、中文说明和 `hint`:
172
-
173
- - `missing-intl`:文案没有接入国际化;
174
- - `tag-mismatch`:词条存在,但不属于当前文件配置的标签;
175
- - `unregistered`:词条不在当前平台数据中。
176
-
177
- 当前不开启源码自动修复。改写文案需要选择词条 key、补充导入并确认运行时 API,自动改写容易产生语义错误;
178
- 因此诊断只输出确定性建议,`--fix` 作为保留参数。后续只有在能生成稳定 key 且不影响导入/类型/运行时行为时,
179
- 才应把对应诊断标记为 `fixable=true`。
180
-
181
- ### Java 后端项目接入
182
-
183
- Java 适配器解析 `.java` 文件,适合 Spring Boot 后端仓库:
184
-
185
- - 校验 `LocaleHandler.getLocaleMessage(...)`、`tryLocaleMessage(...)`、`MessageSource.getMessage(...)`
186
- 第一参数里的直写字符串是否登记到配置的 EEVEE tag;
187
- - 检查 Java 字符串字面量中的硬编码中文;
188
- - 默认排除日志方法(`trace/debug/info/warn/error` 等)、单测断言和注解描述;
189
- - 默认排除 `**/src/test/**` 和 `**/generated/**`。
190
-
191
- 后端仓库无 `package.json` 时,推荐在仓库根目录放 `.eevee-lint.json`。完整结构如下:
226
+ 旧版 ESLint 插件配置中的 `outPaths`、`includes`、`excludes`、`excludeAscii`、`tagMatchMap`、`excludePropertys`、`execludeTrack` 均继续可用,同时支持更正后的 `excludeProperties` 和 `excludeTrack`:
192
227
 
193
228
  ```json
194
229
  {
195
- "refresh": {
196
- "config": ".eevee/download.json"
230
+ "outPaths": [{ "path": "locales/" }],
231
+ "includes": ["src/**/*.{js,jsx,ts,tsx,vue}"],
232
+ "excludes": ["**/*.test.*"],
233
+ "excludeAscii": true,
234
+ "tagMatchMap": {
235
+ "src/pages/**": ["page"]
197
236
  },
198
- "languages": {
199
- "web": { "enabled": false },
200
- "java": {
201
- "enabled": true,
202
- "root": ".",
203
- "intlConfig": ".eevee/intl.json",
204
- "includes": ["*/src/main/java/**/*.java"],
205
- "excludes": ["**/src/test/**", "**/generated/**"],
206
- "tagMatchMap": {
207
- "*/src/main/java/**/*": ["server"]
208
- },
209
- "checkHardcoded": true
210
- }
211
- }
237
+ "excludeProperties": ["description"],
238
+ "excludeTrack": true
212
239
  }
213
240
  ```
214
241
 
215
- `.eevee/intl.json` 只负责告诉检查器去哪里读快照:
242
+ 检查规则:
216
243
 
217
- ```json
218
- { "outPaths": [{ "path": "locales" }] }
244
+ - 扫描 JavaScript / TypeScript 字符串、模板字符串、JSX / Vue 文案;
245
+ - `formatMessage(...)` 内的词条会按 `zh-CN-<tag>.*` 词条文件检查「未登记」和「标签不匹配」;
246
+ - 词条文件支持 JSON、`export default {}` / `module.exports = {}` 常见形态和 Spring properties;JS 词条只做静态解析,不执行项目代码;
247
+ - 默认跳过纯 ASCII、导入导出字符串、对象属性 key、指定属性和埋点调用;
248
+ - 默认跳过测试、Mock、Fixture 和构建生成文件;
249
+ - 默认跳过模板字符串插值里的已国际化表达式;
250
+ - TSX 中 `INTL.操作` 这类成员表达式不视为 JSX 文案;
251
+ - 支持禁用注释:
252
+ - `// eevee-i18n-disable-next-line`
253
+ - `// eevee-i18n-disable`
254
+ - `// eevee-i18n-disable-file`
255
+ - 默认与旧插件一致跳过普通函数调用的直接字符串参数,需要更严格检查时可加 `--check-call-arguments`。
256
+
257
+ ### Java Spring Boot 兼容
258
+
259
+ CLI 不依赖 ESLint 解析 Java,因此可以直接在 Maven / Gradle 多模块 Spring Boot 仓库执行:
260
+
261
+ ```bash
262
+ cd /path/to/spring-boot-service
263
+ eevee i18n scan
219
264
  ```
220
265
 
221
- `.eevee/download.json` 使用 `eevee intl download` 的目标数组格式:
266
+ 默认包含:
222
267
 
223
- ```json
224
- [
225
- {
226
- "outPath": ".eevee/locales",
227
- "format": "json",
228
- "languages": { "zh-CN": "zh-CN" },
229
- "projects": [{ "projectId": 1, "tags": [123] }]
230
- }
231
- ]
268
+ ```text
269
+ **/src/main/java/**/*.java
270
+ **/src/main/resources/templates/**/*.{html,htm,jsp,jspf,tag,ftl,vm}
232
271
  ```
233
272
 
234
- 把 `projectId` 和 tag ID 换成后端词条项目实际值。提交检测推荐在 Git `pre-commit` 中执行:
273
+ Java 支持包括:
235
274
 
236
- ```bash
237
- npx @eevee/cli lint --staged --language java
275
+ - 普通字符串和 Java 17 文本块;
276
+ - 跳过 Java 注释;
277
+ - 默认跳过注解中的中文说明,可用 `--check-annotations` 打开;
278
+ - 识别 `MessageSource#getMessage` 使用 message key 的常规写法;
279
+ - 支持 Thymeleaf / JSP / Freemarker / Velocity 模板文本和 UI 属性;
280
+ - 跳过 `#{...}`、`${...}`、`<spring:message>`、`<fmt:message>` 等已国际化表达式;
281
+ - 词条输出目录支持 `messages*_zh*_CN*.properties`。
282
+
283
+ 示例配置:
284
+
285
+ ```json
286
+ {
287
+ "outPaths": ["src/main/resources/messages/"],
288
+ "includes": [
289
+ "**/src/main/java/**/*.java",
290
+ "**/src/main/resources/templates/**/*.{html,jsp}"
291
+ ],
292
+ "excludes": ["**/generated/**"]
293
+ }
238
294
  ```
239
295
 
296
+ 扫描发现问题会输出文件、行列、规则和词条;CI 中可直接使用非 0 退出码阻断流水线,`--no-fail` 可保留展示但不阻断。
297
+
240
298
  ## Business command layer
241
299
 
242
300
  Business commands 是主要接口,命名规范固定为 `<group> <action>`。它把底层 `call_api_operation` 封装成语义稳定、参数有类型的命令,不需要手工查找 `operation_id`:
@@ -406,33 +464,43 @@ eevee notify notifications/cancelled '{"requestId":"<id>","reason":"user cancell
406
464
 
407
465
  ## Agent Skill 快速安装
408
466
 
409
- 仓库中已经内置 `assets/skills/eevee-mcp/SKILL.md` 和 `reference.md`。
467
+ 仓库内置两个 Agent Skill:
410
468
 
411
- 默认复制到当前用户的 Codex + Claude 全局目录:
469
+ - `eevee-mcp`:业务数据操作与 MCP 能力。
470
+ - `eevee-integration`:把 EEVEE 词条导出和代码扫描接入 Java Spring Boot 或 UmiJS 项目;包含项目/版本 ID 询问清单、目录纳入/屏蔽策略、提交钩子和误报处理。
471
+
472
+ 默认自动探测已安装的 Codex、Claude Code、Cursor 和 OpenCode,并复制到对应客户端的全局目录:
412
473
 
413
474
  ```bash
414
475
  eevee skills install
476
+ eevee skills install --skill eevee-integration
477
+ eevee skills agents # 查看探测结果
415
478
  ```
416
479
 
417
480
  实际路径:
418
481
 
419
482
  - Codex: `$CODEX_HOME/skills/eevee-mcp`,默认 `~/.codex/skills/eevee-mcp`
420
483
  - Claude Code: `$CLAUDE_CONFIG_DIR/skills/eevee-mcp`,默认 `~/.claude/skills/eevee-mcp`
484
+ - Cursor: `$CURSOR_HOME/skills/eevee-mcp`,默认 `~/.cursor/skills/eevee-mcp`
485
+ - OpenCode: `$OPENCODE_CONFIG_DIR/skills/eevee-mcp`,默认 `~/.config/opencode/skills/eevee-mcp`
421
486
  - Universal/兼容 Agent Skills 实现: `$EEVEE_AGENT_HOME/skills/eevee-mcp`,默认 `~/.agents/skills/eevee-mcp`
422
487
 
423
488
  显式选择 agent:
424
489
 
425
490
  ```bash
426
- eevee skills install codex,claude
491
+ eevee skills install codex,claude,cursor,opencode
427
492
  eevee skills install codex
493
+ eevee skills install claudecode
428
494
  eevee skills install universal
495
+ eevee skills install --all
496
+ eevee skills install --skill eevee-integration codex,claude
429
497
  ```
430
498
 
431
499
  复制到某个项目的 Claude/Codex 目录:
432
500
 
433
501
  ```bash
434
502
  cd /path/to/repo
435
- eevee skills install codex,claude --project .
503
+ eevee skills install codex,claude,cursor,opencode --project .
436
504
  ```
437
505
 
438
506
  复制到任意自定义 skills 根目录:
@@ -457,10 +525,18 @@ eevee skills uninstall claude --project . --yes
457
525
  ```bash
458
526
  eevee skills list
459
527
  eevee skills paths
528
+ eevee skills agents
460
529
  eevee skills info
461
530
  ```
462
531
 
463
- Claude/Codex 重启后加载名为 `eevee-mcp` 的 skill。Skill 内容指导 Agent 先 discover contract,再 call tool,并避免未授权的破坏性变更。
532
+ 自动迁移时机:
533
+
534
+ - `install.sh` 安装成功后;
535
+ - npm 安装/更新包后的 `postinstall`;
536
+ - `eevee update` 更新成功后;
537
+ - 用户主动执行 `eevee skills install/update`。
538
+
539
+ 未检测到任何客户端时,自动迁移会跳过;显式 `--all` 会写入全部兼容目录。对应 Agent 重启后加载名为 `eevee-mcp` 的 skill。Skill 内容指导 Agent 先 discover contract,再 call tool,并避免未授权的破坏性变更。
464
540
 
465
541
  ## 诊断与故障排查
466
542
 
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: eevee-integration
3
+ description: Integrate @eevee-ta/cli term export and i18n scanning into Java Spring Boot or UmiJS/Umi Max repositories, including intl.json, scripts, Git hooks, project/version IDs, and include/exclude scope. Not for routine eevee data operations; use eevee-mcp for those.
4
+ metadata:
5
+ short-description: Configure EEVEE CLI for Java or UmiJS repositories
6
+ ---
7
+
8
+ # EEVEE Project Integration
9
+
10
+ Use this skill when adding or changing EEVEE CLI integration in a application repository. Produce a reproducible configuration, project-specific scripts or npm scripts, documentation, and a commit-time check. Do not merely leave instructions in chat.
11
+
12
+ ## Mandatory intake
13
+
14
+ Before writing or changing configuration, inspect the repository and ask the user for decisions that cannot be inferred. In particular, ask for all of the following that are not already authoritative in the repository:
15
+
16
+ 1. EEVEE server URL and token policy.
17
+ 2. Platform project ID(s). Never guess them.
18
+ 3. Version ID list. Clarify whether all versions are wanted (`branchIds: []`) or only selected IDs.
19
+ 4. Tag policy: all terms, selected tags, or `[null]` for untagged terms; whether output must be split by tag.
20
+ 5. Output directories for development and build artifacts, output format, and language filename aliases.
21
+ 6. Source-directory policy: which directories must be scanned, which are generated/test/mock/vendor and must be excluded, and how legacy debt should be handled.
22
+ 7. Commit-gate scope: staged files only or full repository.
23
+
24
+ Use `references/intake.md` for the exact question set and decision rules. If the user supplies only some values, state the reasonable defaults you will use and ask only for decisions that materially change behavior.
25
+
26
+ ## Implementation route
27
+
28
+ 1. Inspect the existing build system, source layout, locale resources, lint scripts, and Git hooks.
29
+ 2. Read the mode-specific reference:
30
+ - Java 11 / Spring Boot / Maven or Gradle: `references/java-springboot.md`
31
+ - UmiJS / Umi Max / React front end: `references/umijs.md`
32
+ 3. Add `intl.json` at the repository root unless an existing configuration is authoritative.
33
+ 4. Add a small wrapper script or npm script rather than requiring people to remember long CLI invocations.
34
+ 5. Add a commit-time check for staged source files when the user wants commit gating.
35
+ 6. Document the configuration, commands, exclusions, suppression comments, and known legacy debt in the repository.
36
+ 7. Run dry-run export, real export where authorized, scanning, syntax/build checks, and the commit gate. Record actual commands and results.
37
+
38
+ ## Non-negotiable constraints
39
+
40
+ - Do not guess project IDs, version IDs, tags, or output paths.
41
+ - Do not commit personal tokens or machine-specific Maven settings. A basic read-only token may be committed only when the user explicitly says it is safe.
42
+ - Prefer narrow, explainable exclusions and inline suppression comments over a long file-by-file baseline.
43
+ - Do not silently overwrite locale resources. Confirm whether the EEVEE project is the source of truth and whether cleanup is enabled.
44
+ - Preserve unrelated user modifications and do not reset a dirty worktree.
45
+ - Keep full scans informational when there is known legacy debt; make the commit gate scan only staged files unless the user explicitly requires a full blocking scan.
46
+ - When a repository uploads terms to EEVEE, include source metadata: `description` (usage location), `params` for placeholders, and `source_info` (`repo`/`branch`/`path`/`line` — all four together or omitted). Refresh existing translations with `translation set-content`; `term update` ignores `--translations`.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "EEVEE Integration"
3
+ short_description: "Configure EEVEE CLI for Java or UmiJS repositories"
@@ -0,0 +1,87 @@
1
+ # EEVEE Integration Intake
2
+
3
+ Use these questions before changing `intl.json`, wrapper scripts, or hooks. The goal is to make platform metadata and repository scope explicit rather than inferred.
4
+
5
+ ## Required platform questions
6
+
7
+ Ask these unless the repository already contains authoritative answers:
8
+
9
+ ```text
10
+ 1. EEVEE MCP 地址是什么?token 是基础读取 token 还是个人 token?是否允许写入仓库?
11
+ 2. 使用哪个 EEVEE 项目 ID?多个项目需要合并导出吗?
12
+ 3. 每个项目使用哪些版本 ID?是全部版本(branchIds: [])还是指定 ID 列表?
13
+ 4. 词条按什么规则筛选?
14
+ - tags: [] 表示全部
15
+ - tags: [null] 表示无标签
16
+ - tags: ["web", null] 表示指定标签加无标签
17
+ 5. 输出是否按标签拆分?
18
+ - groupByTag: true -> zh-CN-web.json
19
+ - groupByTag: false -> zh-CN.json
20
+ 6. 输出格式是什么:json、js、ts、property、properties?
21
+ 7. 每种语言输出文件名是否需要别名?
22
+ 例:zh-CN -> zh,或 zh-CN -> messages_zh_CN
23
+ 8. 开发目录 path 和构建目录 buildPath 分别是什么?每次导出只写其中一个,默认写哪个?
24
+ ```
25
+
26
+ If the user knows the project but not IDs, offer discovery commands rather than guessing:
27
+
28
+ ```bash
29
+ eevee project list --json
30
+ eevee version list <project-id> --json
31
+ eevee tag-group list <project-id> --json
32
+ ```
33
+
34
+ `branchIds` is a required array in current CLI versions. Do not use legacy singular `branch` values.
35
+
36
+ ## Required repository-scope questions
37
+
38
+ Ask these after inspecting the repository:
39
+
40
+ ```text
41
+ 1. 哪些源码目录包含用户可见文案,必须纳入扫描?
42
+ 2. 哪些目录是生成代码、测试、Mock、Fixture、文档示例、vendor 或构建产物,应该屏蔽?
43
+ 3. 存量未国际化文案是立即全量修复、全量阻断、还是先只阻断本次变更文件?
44
+ 4. 是否存在组件内部按词条 key 翻译的列配置或动态字典,需要用注释豁免?
45
+ 5. locale 资源目录是否只允许 EEVEE 导出,还是还保存手工文件?
46
+ ```
47
+
48
+ ### Include policy
49
+
50
+ Start narrow and expand only with evidence:
51
+
52
+ - Java: usually `**/src/main/java/**/*.java`; include template resources only when the project has server-rendered templates.
53
+ - UmiJS: usually source directories such as `src/**/*.{ts,tsx,js,jsx}` or application-specific `apps/<app>/src/**`.
54
+ - Scan real source directories, not an entire repository by default.
55
+ - Always let CLI defaults exclude dependencies, build outputs, generated Umi directories, minified files, tests, mocks, and fixtures unless the user explicitly requires otherwise.
56
+
57
+ ### Exclude and suppression policy
58
+
59
+ Prefer this order:
60
+
61
+ 1. Correct the code by moving user-visible text to the project's i18n mechanism.
62
+ 2. Use an inline comment for a semantic false positive:
63
+ ```ts
64
+ title: '操作', // eevee-i18n-disable:组件内部按 key 翻译
65
+ ```
66
+ 3. Use a next-line comment for declarations or dynamic dictionary keys:
67
+ ```ts
68
+ // eevee-i18n-disable-next-line:动态拼接词条字典 key
69
+ const title = REPO_INTL[`${isEdit ? '编辑' : '新建'}表`];
70
+ ```
71
+ 4. Use file-level suppression only when the entire file is a term-key map, internal mapping, Mock, or generated equivalent:
72
+ ```java
73
+ // eevee-i18n-disable-file:本文件只维护词条 key
74
+ ```
75
+ 5. Add a directory or glob to `excludes` only for generated/test/mock/vendor content or an explicitly approved legacy-debt boundary.
76
+ 6. Do not maintain an unexplained list of hundreds of source files. If full scanning has legacy debt, keep it informational with `--no-fail` and gate only staged files.
77
+
78
+ ## Output and gate decisions
79
+
80
+ Confirm these before writing files:
81
+
82
+ - Is EEVEE the source of truth? A real export can remove keys that exist locally but are absent in the selected EEVEE project/version/tag set.
83
+ - Is `clean` enabled? Cleanup deletes old generated language-prefix files; hand-written files in the output directory need another location or a non-language prefix.
84
+ - Should the commit hook scan only staged files? This is normally preferred for repositories with legacy debt.
85
+ - Which existing build checks must accompany the EEVEE check?
86
+
87
+ Record the user's answers and the resulting defaults in project documentation before implementation.