@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.
- package/README.md +195 -119
- package/assets/skills/eevee-integration/SKILL.md +46 -0
- package/assets/skills/eevee-integration/agents/openai.yaml +3 -0
- package/assets/skills/eevee-integration/references/intake.md +87 -0
- package/assets/skills/eevee-integration/references/java-springboot.md +182 -0
- package/assets/skills/eevee-integration/references/umijs.md +210 -0
- package/assets/skills/eevee-mcp/SKILL.md +87 -3
- package/assets/skills/eevee-mcp/reference.md +31 -2
- package/dist/src/bin/cli.js +66 -27
- package/dist/src/bin/cli.js.map +1 -1
- package/dist/src/commands/business-command.js +9 -4
- package/dist/src/commands/business-command.js.map +1 -1
- package/dist/src/commands/i18n-command.js +194 -0
- package/dist/src/commands/i18n-command.js.map +1 -0
- package/dist/src/commands/skill-command.js +80 -29
- package/dist/src/commands/skill-command.js.map +1 -1
- package/dist/src/lib/business-catalog.js +24 -20
- package/dist/src/lib/business-catalog.js.map +1 -1
- package/dist/src/lib/config.js +1 -1
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/http.js +95 -0
- package/dist/src/lib/http.js.map +1 -0
- package/dist/src/lib/i18n-exporter.js +402 -0
- package/dist/src/lib/i18n-exporter.js.map +1 -0
- package/dist/src/lib/i18n-scanner.js +1172 -0
- package/dist/src/lib/i18n-scanner.js.map +1 -0
- package/dist/src/lib/mcp-client.js +5 -4
- package/dist/src/lib/mcp-client.js.map +1 -1
- package/dist/src/lib/skill-installer.js +140 -42
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/updater.js +129 -0
- package/dist/src/lib/updater.js.map +1 -0
- package/dist/src/lib/version.js +55 -0
- package/dist/src/lib/version.js.map +1 -0
- package/install.sh +203 -0
- package/package.json +9 -9
- package/scripts/postinstall.mjs +31 -0
- package/assets/skills/eevee-migration/SKILL.md +0 -181
- package/assets/skills/eevee-project-setup/SKILL.md +0 -266
- package/dist/src/commands/intl-command.js +0 -131
- package/dist/src/commands/intl-command.js.map +0 -1
- package/dist/src/commands/lint-command.js +0 -105
- package/dist/src/commands/lint-command.js.map +0 -1
- package/dist/src/lib/intl-catalog.js +0 -58
- package/dist/src/lib/intl-catalog.js.map +0 -1
- package/dist/src/lib/intl-config.js +0 -125
- package/dist/src/lib/intl-config.js.map +0 -1
- package/dist/src/lib/intl-downloader.js +0 -217
- package/dist/src/lib/intl-downloader.js.map +0 -1
- package/dist/src/lib/intl-serializers/csv.js +0 -25
- package/dist/src/lib/intl-serializers/csv.js.map +0 -1
- package/dist/src/lib/intl-serializers/custom.js +0 -23
- package/dist/src/lib/intl-serializers/custom.js.map +0 -1
- package/dist/src/lib/intl-serializers/index.js +0 -22
- package/dist/src/lib/intl-serializers/index.js.map +0 -1
- package/dist/src/lib/intl-serializers/js.js +0 -10
- package/dist/src/lib/intl-serializers/js.js.map +0 -1
- package/dist/src/lib/intl-serializers/json.js +0 -7
- package/dist/src/lib/intl-serializers/json.js.map +0 -1
- package/dist/src/lib/intl-serializers/properties.js +0 -43
- package/dist/src/lib/intl-serializers/properties.js.map +0 -1
- package/dist/src/lib/intl-serializers/ts.js +0 -16
- package/dist/src/lib/intl-serializers/ts.js.map +0 -1
- package/dist/src/lib/intl-serializers/xml.js +0 -21
- package/dist/src/lib/intl-serializers/xml.js.map +0 -1
- package/dist/src/lib/lint-config.js +0 -180
- package/dist/src/lib/lint-config.js.map +0 -1
- package/dist/src/lib/lint-java.js +0 -226
- package/dist/src/lib/lint-java.js.map +0 -1
- package/dist/src/lib/lint-types.js +0 -2
- package/dist/src/lib/lint-types.js.map +0 -1
- package/dist/src/lib/lint-web.js +0 -183
- package/dist/src/lib/lint-web.js.map +0 -1
- package/dist/src/lib/lint.js +0 -192
- package/dist/src/lib/lint.js.map +0 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Java Spring Boot Integration
|
|
2
|
+
|
|
3
|
+
Use this reference for Java 11+ Spring Boot Maven or Gradle repositories.
|
|
4
|
+
|
|
5
|
+
## Inspect first
|
|
6
|
+
|
|
7
|
+
Determine:
|
|
8
|
+
|
|
9
|
+
- Maven or Gradle multi-module layout.
|
|
10
|
+
- JDK version and Maven version.
|
|
11
|
+
- Spring MessageSource basename, normally in `application*.yml`.
|
|
12
|
+
- Existing resource path, such as:
|
|
13
|
+
```yaml
|
|
14
|
+
spring:
|
|
15
|
+
messages:
|
|
16
|
+
basename: static/i18n/messages
|
|
17
|
+
```
|
|
18
|
+
- Existing resource naming:
|
|
19
|
+
```text
|
|
20
|
+
messages_zh_CN.properties
|
|
21
|
+
messages_en_US.properties
|
|
22
|
+
messages_ja_JP.properties
|
|
23
|
+
messages_ko_KR.properties
|
|
24
|
+
```
|
|
25
|
+
- Existing wrapper scripts, Git hooks, and build validation commands.
|
|
26
|
+
|
|
27
|
+
## `intl.json` shape
|
|
28
|
+
|
|
29
|
+
A typical all-version, no-tag Java configuration is:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"url": "https://eevee.example.com/mcp",
|
|
34
|
+
"token": "<basic-read-token-if-approved>",
|
|
35
|
+
"includes": ["**/src/main/java/**/*.java"],
|
|
36
|
+
"excludeAscii": true,
|
|
37
|
+
"excludeTrack": true,
|
|
38
|
+
"format": "properties",
|
|
39
|
+
"groupByTag": false,
|
|
40
|
+
"clean": false,
|
|
41
|
+
"localeAliases": {
|
|
42
|
+
"zh-CN": "messages_zh_CN",
|
|
43
|
+
"en-US": "messages_en_US",
|
|
44
|
+
"ja-JP": "messages_ja_JP",
|
|
45
|
+
"ko-KR": "messages_ko_KR"
|
|
46
|
+
},
|
|
47
|
+
"outPaths": [
|
|
48
|
+
{
|
|
49
|
+
"path": "/src/main/resources/static/i18n/",
|
|
50
|
+
"buildPath": "/target/classes/static/i18n/",
|
|
51
|
+
"projectIds": [
|
|
52
|
+
{
|
|
53
|
+
"projectId": 3,
|
|
54
|
+
"branchIds": []
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Adjust only after confirming IDs and output expectations with the user. A leading `/` in `path` or `buildPath` is repository-relative, not an absolute filesystem path.
|
|
63
|
+
|
|
64
|
+
## Wrapper script
|
|
65
|
+
|
|
66
|
+
Prefer `scripts/eevee-i18n.sh` with actions such as:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
scripts/eevee-i18n.sh export --dry-run
|
|
70
|
+
scripts/eevee-i18n.sh export
|
|
71
|
+
scripts/eevee-i18n.sh export --target build
|
|
72
|
+
scripts/eevee-i18n.sh scan --no-fail
|
|
73
|
+
scripts/eevee-i18n.sh scan-changed
|
|
74
|
+
scripts/eevee-i18n.sh check
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`check` normally performs:
|
|
78
|
+
|
|
79
|
+
1. `git diff --check`
|
|
80
|
+
2. EEVEE export dry-run
|
|
81
|
+
3. Full EEVEE scan with `--no-fail` for legacy visibility
|
|
82
|
+
4. Blocking scan of staged Java files
|
|
83
|
+
5. Maven `validate`
|
|
84
|
+
|
|
85
|
+
Use `EEVEE_CLI`, `MVN_CMD`, and `MAVEN_LOCAL_REPO` overrides for developer environments.
|
|
86
|
+
|
|
87
|
+
## Commit hook
|
|
88
|
+
|
|
89
|
+
Use `.githooks/pre-commit` and configure:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git config core.hooksPath .githooks
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Hook behavior:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
#!/usr/bin/env bash
|
|
99
|
+
set -euo pipefail
|
|
100
|
+
ROOT="$(git rev-parse --show-toplevel)"
|
|
101
|
+
"$ROOT/scripts/eevee-i18n.sh" scan-changed
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`scan-changed` must collect only:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
git diff --name-only --cached --diff-filter=ACMR | grep -E '\.java$'
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Skip cleanly when there are no staged Java files. This prevents thousands of legacy findings from blocking every commit while still checking files changed by the current work.
|
|
111
|
+
|
|
112
|
+
## Java suppression comments
|
|
113
|
+
|
|
114
|
+
The scanner understands real Java comments, including block comments:
|
|
115
|
+
|
|
116
|
+
```java
|
|
117
|
+
// eevee-i18n-disable-next-line:组件内部按 key 翻译
|
|
118
|
+
private String title = "操作";
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```java
|
|
122
|
+
private String title = "操作"; // eevee-i18n-disable:内部枚举显示名
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```java
|
|
126
|
+
// eevee-i18n-disable-file:本文件只维护后端返回类型标识
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Do not put the directive inside a string; it must be an actual comment.
|
|
130
|
+
|
|
131
|
+
## Validation
|
|
132
|
+
|
|
133
|
+
Run in this order:
|
|
134
|
+
|
|
135
|
+
1. `scripts/eevee-i18n.sh export --dry-run`
|
|
136
|
+
2. Real export only after the user confirms EEVEE is the source of truth
|
|
137
|
+
3. Properties consistency:
|
|
138
|
+
- same key set in every locale
|
|
139
|
+
- no duplicate keys
|
|
140
|
+
- expected key count
|
|
141
|
+
- placeholder parity where applicable
|
|
142
|
+
4. `scripts/eevee-i18n.sh scan --no-fail`
|
|
143
|
+
5. Positive and negative commit-hook tests:
|
|
144
|
+
- no staged Java file exits 0
|
|
145
|
+
- a staged temporary Java file with hardcoded user-visible Chinese exits non-zero
|
|
146
|
+
6. Maven validation, usually:
|
|
147
|
+
```bash
|
|
148
|
+
mvn -s settings.xml -Dmaven.repo.local="$HOME/.m2/repository" validate
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
On a clean repository, some Maven `banCircularDependencies` configurations resolve reactor siblings from the local repository. If validate fails with missing sibling artifacts, bootstrap once with the project's known-compatible Maven version:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
mvn -s settings.xml \
|
|
155
|
+
-Dmaven.repo.local="$HOME/.m2/repository" \
|
|
156
|
+
-DskipTests install
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Then rerun validate. Keep machine-specific credentials and repository paths out of committed settings.
|
|
160
|
+
|
|
161
|
+
## Documentation to leave in the repository
|
|
162
|
+
|
|
163
|
+
Record:
|
|
164
|
+
|
|
165
|
+
- EEVEE project and version policy
|
|
166
|
+
- whether tags are used
|
|
167
|
+
- output paths and format
|
|
168
|
+
- full command list
|
|
169
|
+
- commit-hook scope
|
|
170
|
+
- known legacy-debt count and policy
|
|
171
|
+
- all non-obvious directory exclusions and suppression examples
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## Term upload requirements (source metadata)
|
|
175
|
+
|
|
176
|
+
When backfilling terms extracted from Java sources or resource bundles, upload
|
|
177
|
+
`source_info` (`repo`/`branch`/`path`/`line`, all four together or omitted) and
|
|
178
|
+
`params` for message placeholders, plus `description` recording the class/usage
|
|
179
|
+
location. `term create --translations` sets initial translations; refreshing an
|
|
180
|
+
existing term's translation must go through `translation set-content` per locale
|
|
181
|
+
(`term update` ignores `--translations`). Keep upload scripts idempotent by
|
|
182
|
+
diffing against `eevee term list` before writing.
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# UmiJS / Umi Max Integration
|
|
2
|
+
|
|
3
|
+
Use this reference for Umi, Umi Max, React, TypeScript, and similar front-end repositories.
|
|
4
|
+
|
|
5
|
+
## Inspect first
|
|
6
|
+
|
|
7
|
+
Determine:
|
|
8
|
+
|
|
9
|
+
- Monorepo app directory, such as `apps/gaia/src`, versus single-app `src`.
|
|
10
|
+
- Existing locale loader and output directory:
|
|
11
|
+
- `src/locales`
|
|
12
|
+
- `public/intl`
|
|
13
|
+
- `apps/<app>/public/intl`
|
|
14
|
+
- Runtime file format:
|
|
15
|
+
- JSON files loaded by `intl.js`
|
|
16
|
+
- ESM `js` / `ts` modules
|
|
17
|
+
- existing `INTL` / `COMM_INTL` maps
|
|
18
|
+
- Existing i18n functions, especially `formatMessage` from `tant-intl`.
|
|
19
|
+
- Existing npm scripts, lint-staged config, ESLint setup, and Git hooks.
|
|
20
|
+
- Existing term maps such as `intl.ts` / `intl.tsx`.
|
|
21
|
+
- Whether old ESLint plugin configuration exists and must be replaced rather than duplicated.
|
|
22
|
+
|
|
23
|
+
## `intl.json` shape
|
|
24
|
+
|
|
25
|
+
Single-app grouped JSON example:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"includes": ["src/**/*.{ts,tsx,js,jsx}"],
|
|
30
|
+
"excludes": ["**/*.d.ts"],
|
|
31
|
+
"excludeAscii": true,
|
|
32
|
+
"excludeTrack": true,
|
|
33
|
+
"token": "<basic-read-token-if-approved>",
|
|
34
|
+
"format": "json",
|
|
35
|
+
"groupByTag": true,
|
|
36
|
+
"clean": true,
|
|
37
|
+
"localeAliases": {
|
|
38
|
+
"zh-CN": "zh",
|
|
39
|
+
"en-US": "en"
|
|
40
|
+
},
|
|
41
|
+
"outPaths": [
|
|
42
|
+
{
|
|
43
|
+
"path": "/public/intl/",
|
|
44
|
+
"buildPath": "/public/intl/",
|
|
45
|
+
"projectIds": [
|
|
46
|
+
{
|
|
47
|
+
"projectId": 12,
|
|
48
|
+
"branchIds": [21],
|
|
49
|
+
"tags": ["web"]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Monorepos should use app-specific paths and include globs. Confirm project, version, tags, grouping, aliases, and both output directories with the user before writing this file.
|
|
58
|
+
|
|
59
|
+
For ESM output, use `format: "js"` or `"ts"`:
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
export default {
|
|
63
|
+
登录: 'Sign in',
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## npm scripts
|
|
68
|
+
|
|
69
|
+
Prefer wrappers that call the local CLI:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"scripts": {
|
|
74
|
+
"eevee": "eevee",
|
|
75
|
+
"eevee:export": "eevee i18n export",
|
|
76
|
+
"eevee:i18n": "eevee i18n scan",
|
|
77
|
+
"eevee:check": "eevee doctor"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
A shell wrapper can add `--no-update-check`, verify CLI version, and route `scan-changed` / `check`.
|
|
83
|
+
|
|
84
|
+
## Scanner behavior and false-positive handling
|
|
85
|
+
|
|
86
|
+
The CLI scans:
|
|
87
|
+
|
|
88
|
+
- JavaScript / TypeScript strings
|
|
89
|
+
- template literals
|
|
90
|
+
- JSX text
|
|
91
|
+
- Vue text where applicable
|
|
92
|
+
|
|
93
|
+
It ignores by default:
|
|
94
|
+
|
|
95
|
+
- pure ASCII when `excludeAscii: true`
|
|
96
|
+
- import/export source strings
|
|
97
|
+
- object property keys
|
|
98
|
+
- tracking calls
|
|
99
|
+
- tests, mocks, fixtures, generated Umi directories, and build outputs
|
|
100
|
+
- standard i18n expressions inside template interpolation
|
|
101
|
+
- member expressions such as `INTL.操作`
|
|
102
|
+
|
|
103
|
+
Nonstandard patterns are not automatically exempt. Use explicit comments:
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
// eevee-i18n-disable-next-line:动态拼接词条字典 key
|
|
107
|
+
const title = REPO_INTL[`${isEdit ? '编辑' : '新建'}表`];
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
title: '操作', // eevee-i18n-disable:表格组件内部按 key 翻译
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For a whole term-key map:
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
// eevee-i18n-disable-file:本文件只维护词条 key
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Column arrays such as `COLUMN_DEFAULT_ALL` often need line-level comments when the table component translates keys internally. Add the comment to every affected title rather than suppressing an entire page file.
|
|
121
|
+
|
|
122
|
+
## Commit gate
|
|
123
|
+
|
|
124
|
+
Use a Git hook or lint-staged task that scans only staged frontend source files. A dedicated `scan-changed` script is easier to test than embedding complex shell in Git configuration.
|
|
125
|
+
|
|
126
|
+
Collect staged files with:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
git diff --name-only --cached --diff-filter=ACMR |
|
|
130
|
+
grep -E '\.(js|jsx|ts|tsx|vue)$'
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Pass each file to:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
eevee i18n scan . --include <file>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Skip when no matching file is staged.
|
|
140
|
+
|
|
141
|
+
For legacy repositories, full scanning can remain informational with `--no-fail`; only staged files should block commits.
|
|
142
|
+
|
|
143
|
+
## Validation
|
|
144
|
+
|
|
145
|
+
Run:
|
|
146
|
+
|
|
147
|
+
1. `npm run eevee -- version`, requiring CLI `>= 1.1.0`
|
|
148
|
+
2. Export dry-run and confirm expected project/version/tag/key counts
|
|
149
|
+
3. Real export only after confirming source of truth and cleanup behavior
|
|
150
|
+
4. Locale consistency:
|
|
151
|
+
- same key set
|
|
152
|
+
- expected count
|
|
153
|
+
- no duplicate keys
|
|
154
|
+
- runtime loader still references generated filenames
|
|
155
|
+
5. `eevee i18n scan --no-fail`
|
|
156
|
+
6. Blocking scan of staged source files
|
|
157
|
+
7. Existing project checks:
|
|
158
|
+
```bash
|
|
159
|
+
npm run tsc
|
|
160
|
+
npm run build
|
|
161
|
+
```
|
|
162
|
+
8. If ESLint integration changed, run the project's JS lint command and remove obsolete plugin configuration/dependencies.
|
|
163
|
+
|
|
164
|
+
## Documentation to leave in the repository
|
|
165
|
+
|
|
166
|
+
Record:
|
|
167
|
+
|
|
168
|
+
- project IDs and version IDs
|
|
169
|
+
- tag semantics and grouping
|
|
170
|
+
- output paths and format
|
|
171
|
+
- locale aliases
|
|
172
|
+
- npm or shell commands
|
|
173
|
+
- commit gate scope
|
|
174
|
+
- known false-positive categories and suppression examples
|
|
175
|
+
- legacy-debt policy and files or directories intentionally excluded
|
|
176
|
+
|
|
177
|
+
## Term upload requirements (source metadata)
|
|
178
|
+
|
|
179
|
+
When a repository uploads or backfills terms to EEVEE (for example a
|
|
180
|
+
`eevee:upload` wrapper around `eevee term create`), each term entry should carry
|
|
181
|
+
source metadata, not only translations:
|
|
182
|
+
|
|
183
|
+
| Field | Required | Shape / rule |
|
|
184
|
+
|---|---|---|
|
|
185
|
+
| `name` | yes | Term key. In zh-reference projects the key is usually the Chinese source text. |
|
|
186
|
+
| `translations` | yes | Map covering **every** project locale; use `""` only when explicitly intended. |
|
|
187
|
+
| `description` | recommended | Where the term appears, e.g. `顶栏导航:项目`. |
|
|
188
|
+
| `params` | recommended | Placeholder parameter array `[{"name":"count","value":"42","desc":"数量"}]`. Upload it whenever the source text contains `{placeholder}` tokens so translators see the parameter contract. |
|
|
189
|
+
| `source_info` | recommended | Repository origin `{"repo","branch","path","line"}`. All four fields must be filled together or omitted entirely (server rejects partial objects). Capture them from the file location / git revision at extraction time. |
|
|
190
|
+
|
|
191
|
+
Update semantics that scripts must respect:
|
|
192
|
+
|
|
193
|
+
- `term create --translations` is the only batch way to set initial translations.
|
|
194
|
+
- `term update` does **not** accept `--translations` (the server ignores it);
|
|
195
|
+
refresh existing translations per locale with
|
|
196
|
+
`eevee translation set-content --id <pid> --term-id <tid> --locale <locale> --content <text>`.
|
|
197
|
+
- Keep uploads idempotent: diff against `eevee term list`/`terms/page` first and
|
|
198
|
+
only write created terms plus drifted locales.
|
|
199
|
+
|
|
200
|
+
A minimal idempotent upload wrapper therefore looks like:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
eevee term list <project-id> --version-id <version-id> --json # remote baseline
|
|
204
|
+
eevee term create <project-id> <version-id> --name <key> \
|
|
205
|
+
--description "<location>" \
|
|
206
|
+
--params '[{"name":"count","value":"42","desc":"数量"}]' \
|
|
207
|
+
--source-info '{"repo":"org/web","branch":"main","path":"src/page.tsx","line":12}' \
|
|
208
|
+
--translations '{"zh-CN":"共 {count} 条","en-US":"{count} items"}'
|
|
209
|
+
eevee translation set-content --id <project-id> --term-id <tid> --locale en-US --content "{count} items"
|
|
210
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: eevee-mcp
|
|
3
|
-
description: Operate eevee through the @eevee/cli business commands—projects, versions, terms, translations, tags, permissions, logs—and retain access to raw MCP tools/resources/prompts.
|
|
3
|
+
description: Operate eevee through the @eevee-ta/cli business commands—projects, versions, terms, translations, tags, permissions, logs—and retain access to raw MCP tools/resources/prompts.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# eevee business-aware MCP skill
|
|
@@ -14,6 +14,9 @@ Use this skill when a user asks Codex/Claude or another terminal Agent to inspec
|
|
|
14
14
|
3. Destructive delete/clear operations require explicit `--yes`; ask the user first if they did not request deletion.
|
|
15
15
|
4. Report actual response data verbatim. If `isError=true`, stop and show the error instead of inventing fields.
|
|
16
16
|
5. Keep the user's personal token private; never print it or put it in code/docs/tests.
|
|
17
|
+
6. Before creating a term or setting/updating translations, search existing terms in the same project/version and inspect their translations. Use those translations as terminology, tone, placeholder, capitalization, and style references before machine-translating the new content.
|
|
18
|
+
7. Every term should normally provide content for every locale configured by the project. Leave a locale as `""` only when the user explicitly says that locale must remain an empty string.
|
|
19
|
+
8. When creating or maintaining terms, enrich metadata best effort — description, `params` for placeholders, `source_info` when a repo location is known, and doc-link attachments. If the context is missing, ask once instead of silently omitting it; never force the user to provide everything.
|
|
17
20
|
|
|
18
21
|
## First-run setup
|
|
19
22
|
|
|
@@ -56,17 +59,93 @@ eevee project list
|
|
|
56
59
|
eevee project create --name Demo --locales zh-CN,en-US --description '示例项目'
|
|
57
60
|
eevee project detail 12
|
|
58
61
|
eevee version list 12
|
|
59
|
-
eevee version create --id 12 --name 'Release 1' --
|
|
62
|
+
eevee version create --id 12 --name 'Release 1' --deadline-date 2026-12-31
|
|
60
63
|
eevee term create --id 12 --version-id 34 --name login.button \
|
|
61
64
|
--translations '{"zh-CN":"登录","en-US":"Sign in"}'
|
|
62
65
|
eevee translation set-content --id 12 --term-id 56 --locale zh-CN --content 登录
|
|
63
|
-
eevee translation assign-translators --id 12 --
|
|
66
|
+
eevee translation assign-translators --id 12 --locale en-US --user-id 3 --term-ids 56,57
|
|
64
67
|
eevee permission list 12
|
|
65
68
|
eevee log list --id 12 --page 1 --page-size 20
|
|
66
69
|
```
|
|
67
70
|
|
|
71
|
+
Version status starts at 待开始 on create; change it afterwards with
|
|
72
|
+
`eevee version set-status`. Translation status ceiling depends on role:
|
|
73
|
+
translator → 已翻译(3), reviewer/admin → 已审核(4), plain member → 已机翻(2).
|
|
74
|
+
|
|
68
75
|
Add `--json` for machine-readable `{ok,data}` output, or `--raw` to inspect the complete MCP result.
|
|
69
76
|
|
|
77
|
+
## Local source i18n scan
|
|
78
|
+
|
|
79
|
+
When the user asks to inspect a repository for hardcoded Chinese UI terms or Spring Boot i18n compatibility, run the packaged local scanner instead of shelling out to ESLint:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
eevee i18n scan <project-dir> --json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The command preserves the legacy `intl.json` ESLint-plugin options and also scans Java source, Java text blocks, Thymeleaf/JSP/Freemarker/Velocity templates, JS/TS strings, templates, JSX, and Vue files. It ignores tests, mocks, fixtures, generated Umi directories, and i18n expressions inside template interpolation. A non-zero exit code means issues were found.
|
|
86
|
+
|
|
87
|
+
## Configured term export
|
|
88
|
+
|
|
89
|
+
When the user asks to download or refresh locale files from eevee, inspect `intl.json` and run:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
eevee i18n export # path / development directory
|
|
93
|
+
eevee i18n export --target build # buildPath / online directory
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`branchIds` is a required list of version IDs; `[]` means all versions. `tags: []` means all terms; `tags: [null]` means terms without tags. Output supports JSON, ESM JS/TS, and Java properties, optional tag grouping, locale filename aliases, and configurable cleanup. Projects, versions, and tags are processed in configuration order; later entries overwrite duplicate keys when bundles are merged.
|
|
97
|
+
|
|
98
|
+
## Enrich term metadata (best effort)
|
|
99
|
+
|
|
100
|
+
Term quality depends on context, not only translations. When creating or
|
|
101
|
+
maintaining terms, upload as much of the following as the user's context
|
|
102
|
+
provides. Nothing below is mandatory — pass it whenever it is available:
|
|
103
|
+
|
|
104
|
+
| Field | When to include | How to collect |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| version | Always resolve explicitly | Single-version project: use that version. Multi-version project: ask the user which version owns the term before creating it. |
|
|
107
|
+
| description | Whenever the usage location is known | e.g. `顶栏导航:项目`, `设置页 → 保存按钮`. |
|
|
108
|
+
| params | Source text contains `{placeholder}` tokens | `--params '[{"name":"count","value":"42","desc":"数量"}]'` extracted from the call site; translators rely on this contract. |
|
|
109
|
+
| source_info | The term comes from a repository/file the user can point to | `--source-info '{"repo":"org/web","branch":"main","path":"src/page.tsx","line":12}'` from the file location and git revision. All four fields together, or omit entirely. |
|
|
110
|
+
| attachments | The user mentions screenshots, design specs, or docs | Design/doc URLs: `eevee term add-doc-link --id <pid> --term-id <tid> --link <url>`. Local screenshot files cannot be uploaded through MCP (multipart is unsupported) — tell the user to attach those in the web UI. |
|
|
111
|
+
|
|
112
|
+
The same enrichment applies to existing terms — backfill metadata with:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
eevee term update --id <pid> --term-id <tid> --description '设置页 → 保存按钮' --params '[{"name":"count","value":"42","desc":"数量"}]' --source-info '{"repo":"org/web","branch":"main","path":"src/page.tsx","line":12}'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Translations themselves are refreshed per locale with `translation set-content`.
|
|
119
|
+
|
|
120
|
+
## Required translation workflow
|
|
121
|
+
|
|
122
|
+
Apply this workflow to `term create` and `translation set-content`:
|
|
123
|
+
(`term update` only edits name/description/params/source_info — translations are
|
|
124
|
+
changed with `translation set-content`, one locale at a time.)
|
|
125
|
+
|
|
126
|
+
1. Read project detail or use another authoritative source to determine all project locales and the reference locale.
|
|
127
|
+
2. Search/list existing terms in the same project, preferably the same version and similar namespace or terminology, for example:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
eevee term list <project-id> --version-id <version-id> --json
|
|
131
|
+
eevee term detail <project-id> --term-id <similar-term-id> --json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
3. Extract existing translations and use them as references for terminology, tone, placeholder handling, capitalization, punctuation, and product-specific wording. Do not blindly translate in isolation.
|
|
135
|
+
4. Machine-translate the missing or changed content while keeping the source meaning and reference conventions consistent.
|
|
136
|
+
5. Upload a complete translation map with `term create --translations`; when using `translation set-content`, fill every missing locale unless it is intentionally empty.
|
|
137
|
+
6. Before upload, verify that every key matches a project locale exactly and that no configured locale is omitted. Use `""` only when the user explicitly requires an empty value for that locale.
|
|
138
|
+
|
|
139
|
+
Example:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
eevee term create <project-id> <version-id> --name login.button \
|
|
143
|
+
--description '登录页 → 提交按钮' \
|
|
144
|
+
--params '[{"name":"retry","value":"3","desc":"重试次数"}]' \
|
|
145
|
+
--source-info '{"repo":"org/web","branch":"main","path":"src/pages/login.tsx","line":42}' \
|
|
146
|
+
--translations '{"zh-CN":"登录","en-US":"Sign in","ja-JP":"ログイン"}'
|
|
147
|
+
```
|
|
148
|
+
|
|
70
149
|
## Fallback: raw server tools
|
|
71
150
|
|
|
72
151
|
The current eevee MCP server exposes three REST-backed tools. Use these only for an operation not yet represented by the business catalog, or while diagnosing it:
|
|
@@ -94,6 +173,11 @@ Always inspect current capability with `eevee tools list`; future servers may ex
|
|
|
94
173
|
|
|
95
174
|
## Other standard MCP surfaces
|
|
96
175
|
|
|
176
|
+
The current eevee server implements only `initialize`, `ping`, `tools/*`, and
|
|
177
|
+
`notifications/initialized`. The commands below fail with `Method not found`
|
|
178
|
+
against it; use them only when `eevee tools list` confirms the connected server
|
|
179
|
+
actually exposes resources/prompts.
|
|
180
|
+
|
|
97
181
|
```bash
|
|
98
182
|
eevee resources list
|
|
99
183
|
eevee resources templates
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @eevee/cli reference for Agents
|
|
1
|
+
# @eevee-ta/cli reference for Agents
|
|
2
2
|
|
|
3
3
|
## Command model
|
|
4
4
|
|
|
@@ -39,15 +39,42 @@ eevee project delete 86 --yes --json
|
|
|
39
39
|
eevee version list 86
|
|
40
40
|
eevee version create --id 86 --name v1
|
|
41
41
|
eevee term list 86
|
|
42
|
-
eevee term set-tags --id 86 --
|
|
42
|
+
eevee term set-tags --id 86 --term-id 22 --tag-ids 3,4
|
|
43
|
+
eevee version set-status --id 86 --version-id 9 --status 2
|
|
43
44
|
|
|
44
45
|
# Translations
|
|
46
|
+
eevee term list 86 --json
|
|
47
|
+
eevee term detail 86 --term-id 22 --json
|
|
45
48
|
eevee translation set-content --id 86 --term-id 22 --locale en-US --content Hello
|
|
46
49
|
eevee translation set-status --id 86 --term-id 22 --locale en-US --status 3
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
Use the returned IDs from live responses rather than examples above.
|
|
50
53
|
|
|
54
|
+
### Translation completeness workflow
|
|
55
|
+
|
|
56
|
+
Before `term create` or `translation set-content` — `term update` does not accept `--translations`; change existing translations one locale at a time with `translation set-content`:
|
|
57
|
+
|
|
58
|
+
1. Determine all locales configured on the project.
|
|
59
|
+
2. Search existing terms in the same project/version and read their details to collect comparable translations.
|
|
60
|
+
3. Use those translations as terminology and style references when machine-translating the new content.
|
|
61
|
+
4. Provide content for every configured locale in principle. An empty string is allowed only when the user explicitly requests that locale to remain empty.
|
|
62
|
+
5. Re-check locale keys before upload; do not invent locales that the project has not configured.
|
|
63
|
+
|
|
64
|
+
## Term metadata enrichment (best effort)
|
|
65
|
+
|
|
66
|
+
When creating or maintaining terms, fill every field the context can provide —
|
|
67
|
+
none are mandatory, but pass them whenever possible:
|
|
68
|
+
|
|
69
|
+
- Confirm the owning version first (single version: use it; multi-version: ask the user).
|
|
70
|
+
- `--description` for the usage location, e.g. `设置页 → 保存按钮`.
|
|
71
|
+
- `--params '[{"name":"count","value":"42","desc":"数量"}]'` whenever the text has `{placeholder}` tokens.
|
|
72
|
+
- `--source-info '{"repo":"...","branch":"...","path":"...","line":12}'` when the term comes from a repository (all four fields together or omitted).
|
|
73
|
+
- Design/doc links with `eevee term add-doc-link --id <pid> --term-id <tid> --link <url>`;
|
|
74
|
+
local screenshot files must be attached in the web UI (MCP cannot upload multipart files).
|
|
75
|
+
- Backfill existing terms with `term update --description/--params/--source-info`;
|
|
76
|
+
refresh translations per locale with `translation set-content`.
|
|
77
|
+
|
|
51
78
|
## Built-in MCP tool fallbacks
|
|
52
79
|
|
|
53
80
|
| Server tool | Purpose | Invocation |
|
|
@@ -60,6 +87,8 @@ Check `eevee tools list` first; it is authoritative if the server adds tools lat
|
|
|
60
87
|
|
|
61
88
|
## Full MCP surface
|
|
62
89
|
|
|
90
|
+
Capability note: the current eevee server implements only `initialize`, `ping`, `tools/*`, and `notifications/initialized`. The resources/prompts/completion/logging requests below return `Method not found` against it; verify with `eevee tools list` before using them on a different server.
|
|
91
|
+
|
|
63
92
|
```bash
|
|
64
93
|
eevee ping
|
|
65
94
|
eevee tools list [--raw|--json]
|