@kevlns/v-cli 0.2.13 → 0.2.14
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/AGENTS.md +13 -2
- package/LICENSE +21 -21
- package/README.md +18 -7
- package/dist/cli.mjs +6 -1
- package/package.json +2 -1
- package/schemas/v-cli-plugin.schema.json +143 -143
- package/skills/v-cli/SKILL.md +14 -5
package/AGENTS.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## 核心约定(v-cli 本体)
|
|
9
9
|
|
|
10
|
-
- 环境要求 Node.js >= 20;v-cli 版本 @kevlns/v-cli@0.2.
|
|
10
|
+
- 环境要求 Node.js >= 20;v-cli 版本 @kevlns/v-cli@0.2.14
|
|
11
11
|
- 命令分三类:builtin(内置)、local(~/.v-cli/commands/ 下的本地插件)、official(官方插件白名单);
|
|
12
12
|
**最新、live 的命令集合以实际发现为准**:先运行 `v-cli agent index --json` 获取全部命令与 agent 元数据
|
|
13
13
|
- 单个命令的完整元数据用 `v-cli agent describe <命令名> --json` 查看
|
|
@@ -17,11 +17,22 @@
|
|
|
17
17
|
随包版本是规范唯一权威:同名 SKILL.md 一律按随包版本刷新(本地修改会被覆盖并提示);随包没有的文件(项目扩展,如 PROJECT.md)默认保留,`--force` 时完全同步
|
|
18
18
|
- **首次调用规范**:首次调用任何 official 插件命令前,必须先运行 `v-cli agent docs <命令名>`,
|
|
19
19
|
掌握该插件包内 `AGENTS.md`;使用规范、快速流程与禁止事项以插件 AGENTS.md 为准。
|
|
20
|
-
- 官方插件命令(`v-cli xlmerge …`、`v-cli unity …`)在子进程中运行(stdio 继承):v-cli 只做路由,
|
|
20
|
+
- 官方插件命令(`v-cli xlmerge …`、`v-cli unity …`、`v-cli figma …`)在子进程中运行(stdio 继承):v-cli 只做路由,
|
|
21
21
|
不解析、不改写插件的 stdout/stderr;插件 `--help`/`--json` 等参数由插件自己消费
|
|
22
22
|
- 插件对 worktree 的写入/提交行为以插件清单 v-cli.plugin.json 的 `agent.safety` 为准:
|
|
23
23
|
v-cli 不替插件做 diff/write-back/commit;**未经显式 flag 不得 push**
|
|
24
24
|
|
|
25
|
+
## @kevlns/figma-to-uprefab — 命令 `v-cli figma …`
|
|
26
|
+
|
|
27
|
+
**版本**:0.1.1
|
|
28
|
+
**描述**:Figma REST -> staging-only Unity UGUI prefabs. Node orchestrates export/contract/install/build; the embedded Unity Editor package (source manifest + approximation overlay -> IR -> Prefab) is the only source->IR converter.
|
|
29
|
+
**平台**:win32(仅 Windows 主机可用;非 Windows 上 v-cli 会拒绝路由)
|
|
30
|
+
|
|
31
|
+
**何时使用**:Use to convert tagged Figma frames into staging-only Unity UGUI prefabs: export source manifests + node PNGs, validate the staging contract, install the embedded Unity converter package, or run the C# converter in Unity batch. Never use for promoting generated assets into runtime paths or writing UIConfig.
|
|
32
|
+
|
|
33
|
+
**首次调用前必读**:`v-cli agent docs figma`(插件包内 AGENTS.md 规范正本)
|
|
34
|
+
**实时参数/命令**:`v-cli agent describe figma --json`
|
|
35
|
+
|
|
25
36
|
## @kevlns/u-cli-mod — 命令 `v-cli unity …`
|
|
26
37
|
|
|
27
38
|
**版本**:0.2.3
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 kevlns <936277610@qq.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kevlns <936277610@qq.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ v-cli 让你**用一个命令沉淀所有个人小工具**,而不用为每个
|
|
|
23
23
|
它被设计为**依赖极少、秒级启动、写个文件就能扩展**,与 kevlns 工具家族的其余部分可自由组合。
|
|
24
24
|
|
|
25
25
|
- **插件化架构** - 内置命令走注册表随版本发布;本地插件放进 `~/.v-cli/commands/` 立即生效,无需发版
|
|
26
|
-
- **官方插件白名单** - `@kevlns/xlmerge`(`xlmerge
|
|
26
|
+
- **官方插件白名单** - `@kevlns/xlmerge`(`xlmerge`)、`@kevlns/u-cli-mod`(`unity`)与 `@kevlns/figma-to-uprefab`(`figma`),安装后在子进程中运行
|
|
27
27
|
- **容错加载** - 单个插件语法错误、契约不符或注册异常只会被跳过并报告,绝不阻断其他命令
|
|
28
28
|
- **双通道输出** - 结果走 stdout(可管道、可脚本化),诊断走 stderr
|
|
29
29
|
- **agent 友好** - `agent docs`/`agent init` 让 AI Agent 自举读取引导文档;`agent index/describe` 输出统一索引与完整元数据;仓库内 AGENTS.md 自动生成并有漂移检查
|
|
@@ -75,6 +75,16 @@ v-cli xlmerge --repo <repo> resolve
|
|
|
75
75
|
# Unity 工具链(仅 Windows 主机可用;其他平台 v-cli 会拒绝路由并说明原因)
|
|
76
76
|
npm install -g @kevlns/u-cli-mod@0.2.3
|
|
77
77
|
v-cli unity doctor <project>
|
|
78
|
+
|
|
79
|
+
# Figma -> Unity UGUI staging Prefab(仅 Windows,依赖 Vant Framework)
|
|
80
|
+
v-cli agent docs figma
|
|
81
|
+
v-cli figma --help
|
|
82
|
+
v-cli figma config init --project C:/path/to/UnityProject
|
|
83
|
+
v-cli figma export <fileKey> --project C:/path/to/UnityProject
|
|
84
|
+
v-cli figma contract --project C:/path/to/UnityProject --allow-missing-ir
|
|
85
|
+
v-cli figma unity install --project C:/path/to/UnityProject
|
|
86
|
+
v-cli figma build --project C:/path/to/UnityProject
|
|
87
|
+
v-cli figma contract --project C:/path/to/UnityProject
|
|
78
88
|
```
|
|
79
89
|
|
|
80
90
|
`v-cli <插件命令> …` 的执行语义:插件在**子进程**中运行(stdio 继承),
|
|
@@ -104,7 +114,7 @@ v-cli plugin list # [local] hello 已出现
|
|
|
104
114
|
```
|
|
105
115
|
|
|
106
116
|
> 旧版插件(无 `apiVersion: 1`)会被拒绝并给出解释性错误,请补上字段后重载。
|
|
107
|
-
> 本地插件不能占用内置命令名(`doctor`/`plugin`/`ts`/`agent`/`help`)或官方命令名(`xlmerge`/`unity`)。
|
|
117
|
+
> 本地插件不能占用内置命令名(`doctor`/`plugin`/`ts`/`agent`/`help`)或官方命令名(`xlmerge`/`unity`/`figma`)。
|
|
108
118
|
|
|
109
119
|
### 在脚本中消费输出
|
|
110
120
|
|
|
@@ -193,7 +203,7 @@ npm run check # build + typecheck + test + check:agents + pack:guard
|
|
|
193
203
|
> 发版除 `npm version` 外,还需同步全仓版本断言(`grep -rn 旧版本号 tests/ scripts/ src/` 应为零,含 pack-guard 依赖精确固定与 smoke 的插件版本期望),再打 tag。
|
|
194
204
|
```
|
|
195
205
|
|
|
196
|
-
> `@kevlns/xlmerge@2.0.0` / `@kevlns/u-cli-mod@0.2.3`
|
|
206
|
+
> `@kevlns/xlmerge@2.0.0` / `@kevlns/u-cli-mod@0.2.3` / `@kevlns/figma-to-uprefab@0.1.1` 随 `npm install` 装入仓库
|
|
197
207
|
> node_modules,`check:agents` 的 installed-deps 检查即为最终形态;预发布阶段需要以本地
|
|
198
208
|
> 清单 bootstrap 时显式传 `--manifest <path>`。
|
|
199
209
|
|
|
@@ -203,9 +213,10 @@ kevlns 工具家族共享同一套发布约定(tag 驱动、CI 护栏、MIT)
|
|
|
203
213
|
|
|
204
214
|
| Package | Purpose | Status |
|
|
205
215
|
| --- | --- | --- |
|
|
206
|
-
| [`v-cli`](https://github.com/kevlns/v-cli) | 个人工具箱 CLI(本仓库) | v0.2.
|
|
216
|
+
| [`v-cli`](https://github.com/kevlns/v-cli) | 个人工具箱 CLI(本仓库) | v0.2.14 |
|
|
207
217
|
| [`xlmerge`](https://github.com/kevlns/xlmerge) | Git 中 .xlsx/.xlsm 冲突可视化解决工具 | v2.0.0 |
|
|
208
218
|
| [`u-cli-mod`](https://github.com/kevlns/u-cli-mod) | Unity 精确版本路由 + CLI + pipeline 包(Windows-first) | v0.2.3 |
|
|
219
|
+
| [`figma-to-uprefab`](https://github.com/kevlns/figma-to-uprefab) | Figma 导出、契约校验与 Unity UGUI staging Prefab 构建 | v0.1.1 |
|
|
209
220
|
|
|
210
221
|
## Compatibility
|
|
211
222
|
|
|
@@ -214,8 +225,8 @@ kevlns 工具家族共享同一套发布约定(tag 驱动、CI 护栏、MIT)
|
|
|
214
225
|
| Node.js | `20` and later |
|
|
215
226
|
| TypeScript | `5.6` and later(仅开发时) |
|
|
216
227
|
|
|
217
|
-
CLI 核心逻辑以单文件 ESM(`dist/cli.mjs`)分发,运行时依赖 `commander`
|
|
218
|
-
(`@kevlns/xlmerge`、`@kevlns/u-cli-mod`,均为精确固定版本;安装 v-cli 时一起安装,
|
|
228
|
+
CLI 核心逻辑以单文件 ESM(`dist/cli.mjs`)分发,运行时依赖 `commander` 与三个官方插件包
|
|
229
|
+
(`@kevlns/xlmerge`、`@kevlns/u-cli-mod`、`@kevlns/figma-to-uprefab`,均为精确固定版本;安装 v-cli 时一起安装,
|
|
219
230
|
未装时 `plugin list`/`doctor`/`agent index` 会诚实报告 `missing` 状态)。
|
|
220
231
|
|
|
221
232
|
## Contributing
|
|
@@ -238,4 +249,4 @@ Released under the [MIT License](./LICENSE).
|
|
|
238
249
|
|
|
239
250
|
Part of the **kevlns** tool family.
|
|
240
251
|
|
|
241
|
-
</div>
|
|
252
|
+
</div>
|
package/dist/cli.mjs
CHANGED
|
@@ -312,6 +312,11 @@ var OFFICIAL_PLUGINS = [
|
|
|
312
312
|
package: "@kevlns/u-cli-mod",
|
|
313
313
|
command: "unity",
|
|
314
314
|
description: "Unity \u5DE5\u7A0B\u7CBE\u786E\u7248\u672C\u8DEF\u7531 + \u5B98\u65B9 CLI \u4E0B\u8F7D + com.unity.pipeline \u9002\u914D\u5305\uFF08Windows-first\uFF09"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
package: "@kevlns/figma-to-uprefab",
|
|
318
|
+
command: "figma",
|
|
319
|
+
description: "Figma \u6807\u8BB0\u754C\u9762\u5BFC\u51FA\u3001\u5951\u7EA6\u6821\u9A8C\u4E0E Unity UGUI staging Prefab \u6784\u5EFA\uFF08Windows-first\uFF09"
|
|
315
320
|
}
|
|
316
321
|
];
|
|
317
322
|
var OFFICIAL_COMMAND_NAMES = new Set(
|
|
@@ -627,7 +632,7 @@ import { createHash, randomBytes } from "crypto";
|
|
|
627
632
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
628
633
|
|
|
629
634
|
// src/version.ts
|
|
630
|
-
var VERSION = "0.2.
|
|
635
|
+
var VERSION = "0.2.14";
|
|
631
636
|
|
|
632
637
|
// src/core/agent-docs.ts
|
|
633
638
|
var BUNDLED_DOCS_FILE = "AGENTS.md";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevlns/v-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "kevlns 的个人工具箱 CLI(插件化架构,内置 + 本地插件)+ doctor/plugin/ts 命令",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"personal"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
+
"@kevlns/figma-to-uprefab": "0.1.1",
|
|
49
50
|
"@kevlns/u-cli-mod": "0.2.3",
|
|
50
51
|
"@kevlns/xlmerge": "2.0.0",
|
|
51
52
|
"commander": "^12.1.0"
|
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://github.com/kevlns/v-cli/schemas/v-cli-plugin.schema.json",
|
|
4
|
-
"title": "v-cli plugin manifest",
|
|
5
|
-
"description": "官方插件清单(v-cli.plugin.json)契约,schemaVersion 1。v-cli 使用内置校验器(src/core/manifest.ts)执行等价规则;本文件供编辑器提示与文档使用。",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": true,
|
|
8
|
-
"required": [
|
|
9
|
-
"schemaVersion",
|
|
10
|
-
"package",
|
|
11
|
-
"command",
|
|
12
|
-
"bin",
|
|
13
|
-
"description",
|
|
14
|
-
"platforms",
|
|
15
|
-
"runtime",
|
|
16
|
-
"environment",
|
|
17
|
-
"agent"
|
|
18
|
-
],
|
|
19
|
-
"properties": {
|
|
20
|
-
"schemaVersion": {
|
|
21
|
-
"const": 1,
|
|
22
|
-
"description": "清单契约版本。v-cli 0.2 仅支持 1;未知 major(>=2)会被拒绝。"
|
|
23
|
-
},
|
|
24
|
-
"package": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"pattern": "^@[a-zA-Z0-9][a-zA-Z0-9._~-]*/[a-zA-Z0-9][a-zA-Z0-9._~-]*$",
|
|
27
|
-
"description": "npm 包名(@scope/name),必须与 package.json 的 name 一致。"
|
|
28
|
-
},
|
|
29
|
-
"command": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"pattern": "^[a-z][a-z0-9-]*$",
|
|
32
|
-
"description": "v-cli 路由命令名。不可与内置命令(doctor/plugin/ts/agent/help)重名。"
|
|
33
|
-
},
|
|
34
|
-
"bin": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "package.json bin 中的键名;由 v-cli 以子进程方式调用。"
|
|
37
|
-
},
|
|
38
|
-
"description": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"minLength": 1
|
|
41
|
-
},
|
|
42
|
-
"platforms": {
|
|
43
|
-
"type": "array",
|
|
44
|
-
"minItems": 1,
|
|
45
|
-
"uniqueItems": true,
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"enum": ["darwin", "linux", "win32"]
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"runtime": {
|
|
52
|
-
"type": "object",
|
|
53
|
-
"description": "运行时要求(node/python/os 等,自由形状)。"
|
|
54
|
-
},
|
|
55
|
-
"environment": {
|
|
56
|
-
"type": "array",
|
|
57
|
-
"items": {
|
|
58
|
-
"type": "object",
|
|
59
|
-
"required": ["name", "description"],
|
|
60
|
-
"properties": {
|
|
61
|
-
"name": { "type": "string", "minLength": 1 },
|
|
62
|
-
"description": { "type": "string", "minLength": 1 }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"agent": {
|
|
67
|
-
"type": "object",
|
|
68
|
-
"required": ["whenToUse", "globalOptions", "commands"],
|
|
69
|
-
"properties": {
|
|
70
|
-
"whenToUse": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"description": "给 AI agent 的判断条件:什么场景该调用本插件。"
|
|
73
|
-
},
|
|
74
|
-
"globalOptions": {
|
|
75
|
-
"type": "array",
|
|
76
|
-
"items": {
|
|
77
|
-
"type": "object",
|
|
78
|
-
"required": ["flags", "description"],
|
|
79
|
-
"properties": {
|
|
80
|
-
"flags": { "type": "string", "minLength": 1 },
|
|
81
|
-
"description": { "type": "string", "minLength": 1 }
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"commands": {
|
|
86
|
-
"type": "array",
|
|
87
|
-
"items": {
|
|
88
|
-
"type": "object",
|
|
89
|
-
"required": ["path", "usage", "description", "arguments", "options", "output", "exitCodes", "safety"],
|
|
90
|
-
"properties": {
|
|
91
|
-
"path": {
|
|
92
|
-
"type": "array",
|
|
93
|
-
"minItems": 1,
|
|
94
|
-
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }
|
|
95
|
-
},
|
|
96
|
-
"usage": { "type": "string", "minLength": 1 },
|
|
97
|
-
"description": { "type": "string", "minLength": 1 },
|
|
98
|
-
"arguments": {
|
|
99
|
-
"type": "array",
|
|
100
|
-
"items": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"required": ["name", "required", "description"],
|
|
103
|
-
"properties": {
|
|
104
|
-
"name": { "type": "string", "minLength": 1 },
|
|
105
|
-
"required": { "type": "boolean" },
|
|
106
|
-
"description": { "type": "string", "minLength": 1 }
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"options": {
|
|
111
|
-
"type": "array",
|
|
112
|
-
"items": {
|
|
113
|
-
"type": "object",
|
|
114
|
-
"required": ["flags", "description"],
|
|
115
|
-
"properties": {
|
|
116
|
-
"flags": { "type": "string", "minLength": 1 },
|
|
117
|
-
"description": { "type": "string", "minLength": 1 }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"output": {
|
|
122
|
-
"type": "object",
|
|
123
|
-
"required": ["format", "description"],
|
|
124
|
-
"properties": {
|
|
125
|
-
"format": { "type": "string", "enum": ["json", "stdout", "text"] },
|
|
126
|
-
"description": { "type": "string", "minLength": 1 }
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"exitCodes": {
|
|
130
|
-
"type": "object",
|
|
131
|
-
"description": "code -> 含义 映射。",
|
|
132
|
-
"additionalProperties": { "type": "string" }
|
|
133
|
-
},
|
|
134
|
-
"safety": {
|
|
135
|
-
"type": "array",
|
|
136
|
-
"items": { "type": "string" }
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/kevlns/v-cli/schemas/v-cli-plugin.schema.json",
|
|
4
|
+
"title": "v-cli plugin manifest",
|
|
5
|
+
"description": "官方插件清单(v-cli.plugin.json)契约,schemaVersion 1。v-cli 使用内置校验器(src/core/manifest.ts)执行等价规则;本文件供编辑器提示与文档使用。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"package",
|
|
11
|
+
"command",
|
|
12
|
+
"bin",
|
|
13
|
+
"description",
|
|
14
|
+
"platforms",
|
|
15
|
+
"runtime",
|
|
16
|
+
"environment",
|
|
17
|
+
"agent"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schemaVersion": {
|
|
21
|
+
"const": 1,
|
|
22
|
+
"description": "清单契约版本。v-cli 0.2 仅支持 1;未知 major(>=2)会被拒绝。"
|
|
23
|
+
},
|
|
24
|
+
"package": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^@[a-zA-Z0-9][a-zA-Z0-9._~-]*/[a-zA-Z0-9][a-zA-Z0-9._~-]*$",
|
|
27
|
+
"description": "npm 包名(@scope/name),必须与 package.json 的 name 一致。"
|
|
28
|
+
},
|
|
29
|
+
"command": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
32
|
+
"description": "v-cli 路由命令名。不可与内置命令(doctor/plugin/ts/agent/help)重名。"
|
|
33
|
+
},
|
|
34
|
+
"bin": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "package.json bin 中的键名;由 v-cli 以子进程方式调用。"
|
|
37
|
+
},
|
|
38
|
+
"description": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1
|
|
41
|
+
},
|
|
42
|
+
"platforms": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1,
|
|
45
|
+
"uniqueItems": true,
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": ["darwin", "linux", "win32"]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"runtime": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"description": "运行时要求(node/python/os 等,自由形状)。"
|
|
54
|
+
},
|
|
55
|
+
"environment": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"required": ["name", "description"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"name": { "type": "string", "minLength": 1 },
|
|
62
|
+
"description": { "type": "string", "minLength": 1 }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"agent": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["whenToUse", "globalOptions", "commands"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"whenToUse": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "给 AI agent 的判断条件:什么场景该调用本插件。"
|
|
73
|
+
},
|
|
74
|
+
"globalOptions": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["flags", "description"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"flags": { "type": "string", "minLength": 1 },
|
|
81
|
+
"description": { "type": "string", "minLength": 1 }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"commands": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": ["path", "usage", "description", "arguments", "options", "output", "exitCodes", "safety"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"path": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"minItems": 1,
|
|
94
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }
|
|
95
|
+
},
|
|
96
|
+
"usage": { "type": "string", "minLength": 1 },
|
|
97
|
+
"description": { "type": "string", "minLength": 1 },
|
|
98
|
+
"arguments": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": ["name", "required", "description"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"name": { "type": "string", "minLength": 1 },
|
|
105
|
+
"required": { "type": "boolean" },
|
|
106
|
+
"description": { "type": "string", "minLength": 1 }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"options": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"required": ["flags", "description"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"flags": { "type": "string", "minLength": 1 },
|
|
117
|
+
"description": { "type": "string", "minLength": 1 }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"output": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"required": ["format", "description"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"format": { "type": "string", "enum": ["json", "stdout", "text"] },
|
|
126
|
+
"description": { "type": "string", "minLength": 1 }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"exitCodes": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"description": "code -> 含义 映射。",
|
|
132
|
+
"additionalProperties": { "type": "string" }
|
|
133
|
+
},
|
|
134
|
+
"safety": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": { "type": "string" }
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
144
|
}
|
package/skills/v-cli/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: v-cli
|
|
3
3
|
description: >
|
|
4
|
-
使用 kevlns 的个人工具箱 CLI(v-cli
|
|
5
|
-
unity
|
|
4
|
+
使用 kevlns 的个人工具箱 CLI(v-cli)处理配置表冲突、Unity 工程精确版本工具链与 Figma 转 Unity UGUI Prefab。当任务提到 v-cli、xlmerge、
|
|
5
|
+
unity / figma 命令、figma-to-uprefab、配置表 .xlsx/.xlsm Git 冲突处理、Unity CLI 安装、Unity 工程诊断/体检(doctor)、
|
|
6
6
|
com.unity.pipeline 适配包安装、v-cli agent init 工作区初始化时使用本 skill。
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -10,11 +10,11 @@ description: >
|
|
|
10
10
|
|
|
11
11
|
## 工具概述
|
|
12
12
|
|
|
13
|
-
- `@kevlns/v-cli` 是 npm 全局安装的个人工具箱 CLI,插件化架构;环境要求 Node.js >= 20(`unity` 插件仅 win32,其他平台 v-cli 拒绝路由)。
|
|
13
|
+
- `@kevlns/v-cli` 是 npm 全局安装的个人工具箱 CLI,插件化架构;环境要求 Node.js >= 20(`unity` 与 `figma` 插件仅 win32,其他平台 v-cli 拒绝路由)。
|
|
14
14
|
- 命令分三类:
|
|
15
15
|
- **builtin**(内置):`doctor`(环境体检)、`plugin list/path`(插件管理)、`ts`(时间戳互转)、`agent index/describe/docs/init`(agent 引导)。
|
|
16
16
|
- **local**:`~/.v-cli/commands/` 下的本地插件。
|
|
17
|
-
- **official**(官方插件,经 v-cli 路由):`xlmerge`、`unity`。
|
|
17
|
+
- **official**(官方插件,经 v-cli 路由):`xlmerge`、`unity`、`figma`。
|
|
18
18
|
- **本文件不写死任何版本号**:v-cli 本体与官方插件的实际版本、命令集合、参数一律以 `v-cli doctor` 与 `v-cli agent index --json` 的实时输出为准。
|
|
19
19
|
|
|
20
20
|
## 能力发现协议(核心规则,必须遵守)
|
|
@@ -29,7 +29,7 @@ description: >
|
|
|
29
29
|
|
|
30
30
|
## 首调规范
|
|
31
31
|
|
|
32
|
-
**首次调用任何 official 插件命令(`v-cli xlmerge …`、`v-cli unity …`)前,必须先运行 `v-cli agent docs <命令名>` 读取该插件包内的 AGENTS.md 规范正本。** 使用规范、快速流程与禁止事项以插件自身 AGENTS.md 为准。
|
|
32
|
+
**首次调用任何 official 插件命令(`v-cli xlmerge …`、`v-cli unity …`、`v-cli figma …`)前,必须先运行 `v-cli agent docs <命令名>` 读取该插件包内的 AGENTS.md 规范正本。** 使用规范、快速流程与禁止事项以插件自身 AGENTS.md 为准。
|
|
33
33
|
|
|
34
34
|
官方插件命令在子进程中运行(stdio 继承):v-cli 只做路由,不解析、不改写插件输出;插件 `--help`/`--json` 等参数由插件自己消费。插件对 worktree 的写入/提交行为以插件清单的安全标签为准;**未经显式 flag 不得 push**。
|
|
35
35
|
|
|
@@ -112,6 +112,15 @@ receipt 属工程本地生成物;就绪以当前路由的完整文件树校验
|
|
|
112
112
|
- 小范围:`--filter <命名空间或类>` 通常数秒内同步返回完整 Summary。
|
|
113
113
|
- 5 秒让位机制只保证 CLI 子进程存活并把输出写入 `Library/editor-pipeline-cli/exec-logs/*.log`,不改变 Editor 侧任务的同步语义;让出后不要重复发起同一命令,取消用 `-- command cancel_tests`。
|
|
114
114
|
|
|
115
|
+
## 官方插件三:figma(仅 win32)
|
|
116
|
+
|
|
117
|
+
- 用于标记 Figma 界面导出、staging 契约校验、Unity 转换包安装与 UGUI Prefab 构建;目标工程需要 Unity 2022.3 和 Vant Framework。
|
|
118
|
+
- 首次调用先读 `v-cli agent docs figma`,参数以 `v-cli agent describe figma --json` 为准。
|
|
119
|
+
- 用户配置按工程保存在 `~/.config/figma-to-uprefab/config.json`;token 来自 `FIGMA_ACCESS_TOKEN` 或工程配置段,不写入仓库。
|
|
120
|
+
- `export` 只导出 source manifest、节点 PNG 和根索引;source → IR → Prefab 由嵌入式 C# 转换器完成。
|
|
121
|
+
- 构建前使用 `contract --allow-missing-ir`;安装转换包并 `build` 后运行完整 `contract`。
|
|
122
|
+
- 输出限于 staging;不自动迁入正式资源目录、不写 UIConfig。NGUI 当前不支持。
|
|
123
|
+
|
|
115
124
|
## 典型流程
|
|
116
125
|
|
|
117
126
|
```bash
|