@kevlns/art-workshop 0.1.1 → 0.1.2

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 ADDED
@@ -0,0 +1,17 @@
1
+ # 美术工坊 Agent 指导
2
+
3
+ 首次使用运行 v-cli agent docs art、v-cli agent describe art --json,再用 v-cli art config show 和 v-cli art agent index 确认外部路径、工程及核心。所有独立 art-workshop 命令都可通过 v-cli art 原样调用。详细流程、配置和输入结构用 v-cli art agent docs 查看,参考分类用 v-cli art refs guide 查看。
4
+
5
+ ## 流程与规则
6
+
7
+ - 风格分析与冻结:style analyze 生成报告,style validate 校验,用户采用报告后 style freeze。核心语言精炼、用词准确、前后一致、模块职责清楚;可复用视觉语言归核心,主体与动作归任务,背景与构图归资产配置,模型与尺寸归执行。已有冻结核心不可覆写。
8
+ - 文生图:generate show 读取任务,generate plan 编译计划,generate run --plan FILE --dry 预演,授权后去掉 --dry 生图。工程内核心选择为显式 --core、任务绑定、工程默认;冲突拒绝,不跨工程回退。默认纯白背景,其他背景必须明确声明。
9
+ - 图编辑:edit show / plan / run,明确原图、修改范围及保留范围。预演后按任务授权执行;不自动换背景或套默认核心。原图变化后重新预演。
10
+ - 计划与 dry 不调用远程模型,不产生图片;真实分析与生成会调用 bl 并产生费用。修改需求后重新编译,不手改冻结计划。
11
+ - check 导出或汇总人工验收,分别检查 content/style/asset;三项全部通过且完整性有效才可 select。工具不自动评价图片。
12
+
13
+ ## 本地资源与配套
14
+
15
+ 本地配置位于用户配置目录,可用 config path/show/init 发现;冻结核心在 workspace/projects/工程/cores。工程、参考、报告、计划、缓存、原图和产物都在安装目录之外,不纳入工具 Git 或 npm 包。相对资源按 workspace 解析,参考图按 refs 解析,RUN 按 output 解析。每次配置生效会补齐 refs 分类目录,包括 dry,不覆盖素材。
16
+
17
+ 随包 skills/art-workshop 是使用规范源,agent init --directory DIR 同步到已有 Agent 技能目录,保留扩展文件;自动同步也可用 npm run skill:sync。v-cli 负责路由、清单与本指导发现,美术工坊负责实际任务、核心选择与模型请求。安装 v-cli 会安装此官方依赖。
package/README.md CHANGED
@@ -125,3 +125,7 @@ node --test tests/art-workshop.test.mjs
125
125
  ```
126
126
 
127
127
  依赖 Node.js 与已配置的 bailian-cli。历史图片保留供对照,旧配置和旧计划接口不再支持。真实模型效果需另行实测。
128
+
129
+ ## v-cli 接入
130
+
131
+ 美术工坊是 v-cli 的随包官方插件,入口为 `v-cli art`。先运行 `v-cli agent docs art` 和 `v-cli agent describe art --json`,再运行 `v-cli art config show`、`v-cli art agent index` 选择正确工程。本文所有 `art-workshop` 命令都可将前缀替换为 `v-cli art`;参数、外部本地配置和冻结核心保持一致。`v-cli art --help` 查看入口,`v-cli art agent docs` 查看完整使用规范。
package/art-workshop.mjs CHANGED
@@ -1,19 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {readdirSync,existsSync} from 'node:fs';
3
3
  import {join,resolve} from 'node:path';
4
- import {loadJob,loadProject} from './lib/project.mjs';
5
- import {referenceRoot,ensureReferenceDirectories,referenceGuide} from './lib/refs.mjs';
6
- import {loadSettings,initSettings,externalPath} from './lib/settings.mjs';
7
4
  import {readJson,writeJson} from './lib/shared.mjs';
8
- import {analyzeStyle} from './lib/analyze.mjs';
9
- import {validateReport,freezeCore,loadCore} from './lib/core.mjs';
10
- import {compileGenerate} from './lib/generate.mjs';
11
- import {compileEdit} from './lib/edit.mjs';
12
- import {validatePlan,selectItems} from './lib/plan.mjs';
13
- import {executePlan,checkRun} from './lib/executor.mjs';
14
- import {agentIndex,agentDocs,syncSkill,autoSync} from './lib/agent.mjs';
15
5
  const args=process.argv.slice(2),pos=[],options={};
16
6
  if(args.length===1&&['--version','-V'].includes(args[0])){console.log(readJson(new URL('./package.json',import.meta.url)).version);process.exit(0);}
7
+ const help='art-workshop: config path/show/init | refs guide | agent index/docs/init | list | style analyze/validate/freeze/show | generate show/plan/run | edit show/plan/run | check/select RUN | compare PLAN PLAN\n也可用 v-cli art 调用;先 v-cli agent docs art,再 v-cli agent describe art --json 查看完整参数。';
8
+ if(!args.length||args.length===1&&['--help','-h','help'].includes(args[0])){console.log(help);process.exit(0);}
9
+ const {loadJob,loadProject}=await import('./lib/project.mjs');
10
+ const {referenceRoot,ensureReferenceDirectories,referenceGuide}=await import('./lib/refs.mjs');
11
+ const {loadSettings,initSettings,externalPath}=await import('./lib/settings.mjs');
12
+ const {analyzeStyle}=await import('./lib/analyze.mjs');
13
+ const {validateReport,freezeCore,loadCore}=await import('./lib/core.mjs');
14
+ const {compileGenerate}=await import('./lib/generate.mjs');
15
+ const {compileEdit}=await import('./lib/edit.mjs');
16
+ const {validatePlan,selectItems}=await import('./lib/plan.mjs');
17
+ const {executePlan,checkRun}=await import('./lib/executor.mjs');
18
+ const {agentIndex,agentDocs,syncSkill,autoSync}=await import('./lib/agent.mjs');
17
19
  const flags=new Set(['dry','explore']);
18
20
  const allowed=new Set(['config','workspace','output-dir','refs-dir','cache-dir','directory','project','input','out','report','note','core','job','plan','item','variant','offset','limit','review','file',...flags]);
19
21
  for(let i=0;i<args.length;i++){if(args[i].startsWith('--')){const k=args[i].slice(2);if(!allowed.has(k)||k in options) throw new Error('未知或重复参数 '+k);options[k]=flags.has(k)?true:args[++i];if(options[k]===undefined) throw new Error('参数缺少值 '+k);}else pos.push(args[i]);}
@@ -70,6 +72,6 @@ try {
70
72
  if(module==='check'){if(options.out) writeJson(path(options.out),rows);print(rows);}
71
73
  else {const matched=rows.filter(x=>x.itemId===required('item')&&x.variantId===required('variant')&&(!options.file||x.file===options.file));if(matched.length!==1||!matched[0].accepted) throw new Error('只能选择唯一且全部验收通过的产物');manifest.review=rows;manifest.selections[options.item]=matched[0];writeJson(file,manifest);print(matched[0]);}
72
74
  }else if(module==='compare'){const read=value=>{const data=readJson(path(value));const plan=data.plan??data;validatePlan(plan);return plan;};const a=read(action),b=read(pos[2]);print({sameCore:a.sources.coreHash===b.sources.coreHash,execution:{before:a.execution,after:b.execution},items:b.items.map(x=>({itemId:x.itemId,variantId:x.variantId,changed:a.items.find(y=>y.itemId===x.itemId&&y.variantId===x.variantId)?.inputHash!==x.inputHash}))});}
73
- else if(!module||module==='help') console.log('art-workshop: config path/show/init | refs guide | agent index/docs/init | list | style analyze/validate/freeze/show | generate show/plan/run | edit show/plan/run | check/select RUN | compare PLAN PLAN');
75
+ else if(!module||module==='help') console.log(help);
74
76
  else throw new Error('未知模块或旧入口:'+module);
75
77
  }catch(e){console.error(e.message);process.exitCode=1;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevlns/art-workshop",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "description": "美术工坊:统一风格的多工程图片生成与编辑工具",
6
6
  "type": "module",
@@ -15,7 +15,9 @@
15
15
  "scripts/sync-skill.mjs",
16
16
  "README.md",
17
17
  "docs/core-guidance.md",
18
- "LICENSE"
18
+ "LICENSE",
19
+ "v-cli.plugin.json",
20
+ "AGENTS.md"
19
21
  ],
20
22
  "scripts": {
21
23
  "postinstall": "node scripts/sync-skill.mjs",
@@ -40,5 +42,8 @@
40
42
  "access": "public"
41
43
  },
42
44
  "license": "MIT",
43
- "author": "kevlns"
45
+ "author": "kevlns",
46
+ "vCli": {
47
+ "manifest": "v-cli.plugin.json"
48
+ }
44
49
  }
@@ -5,7 +5,7 @@ description: 使用 美术工坊 分析并冻结视觉风格、在多工程中
5
5
 
6
6
  # 美术工坊
7
7
 
8
- 读取同目录 `runtime.json`,通过 `node <entry>` 调用工具;已安装全局命令时可用 `art-workshop`。随包直接使用时,在工具目录执行 `node art-workshop.mjs`。下文用 `art-workshop` 表示该入口。
8
+ 已安装 v-cli 时可用 `v-cli art` 调用全部命令,首次先读取 `v-cli agent docs art`,用 `v-cli agent describe art --json` 发现完整参数。独立调用时读取同目录 `runtime.json`,通过 `node <entry>` 调用工具;已安装全局命令时可用 `art-workshop`。随包直接使用时,在工具目录执行 `node art-workshop.mjs`。下文用 `art-workshop` 表示该入口。
9
9
 
10
10
  先用 `art-workshop config show` 读取本地配置与外部工作目录,再用 `art-workshop agent index` 发现模块、工程及核心;需要完整用法或配置结构时读取 `art-workshop agent docs`。查看实际任务用 `<generate|edit> show --project <工程> --job <任务>`,不要猜测任务或核心身份。
11
11
 
@@ -0,0 +1,799 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "package": "@kevlns/art-workshop",
4
+ "command": "art",
5
+ "bin": "art-workshop",
6
+ "description": "美术工坊:多工程风格分析与核心冻结、统一风格文生图及图编辑,支持计划预演与人工验收。",
7
+ "platforms": [
8
+ "win32",
9
+ "linux",
10
+ "darwin"
11
+ ],
12
+ "runtime": {
13
+ "node": ">=20",
14
+ "imageProvider": "bl CLI for remote analysis/generation"
15
+ },
16
+ "environment": [
17
+ {
18
+ "name": "ART_WORKSHOP_CONFIG",
19
+ "description": "外部本地配置文件路径;未指定时使用用户配置目录/art-workshop/config.json"
20
+ },
21
+ {
22
+ "name": "CODEX_HOME",
23
+ "description": "可选 Codex 配置目录,用于随包 skill 同步"
24
+ }
25
+ ],
26
+ "agent": {
27
+ "whenToUse": "视觉风格分析与冻结、基于正确工程核心生成统一风格图片、按修改与保留计划编辑现有图片,或查看 refs 分类、预演与验收。先 config show 和 agent index 选择工程,远程分析及生图须有任务授权。",
28
+ "globalOptions": [
29
+ {
30
+ "flags": "--config <file>",
31
+ "description": "外部本地配置文件"
32
+ },
33
+ {
34
+ "flags": "--workspace <dir>",
35
+ "description": "外部工程与任务根目录"
36
+ },
37
+ {
38
+ "flags": "--output-dir <dir>",
39
+ "description": "外部产物目录,默认系统下载目录/image.g"
40
+ },
41
+ {
42
+ "flags": "--refs-dir <dir>",
43
+ "description": "外部参考图目录"
44
+ },
45
+ {
46
+ "flags": "--cache-dir <dir>",
47
+ "description": "外部缓存目录"
48
+ },
49
+ {
50
+ "flags": "-V, --version",
51
+ "description": "单独使用,显示工具版本"
52
+ },
53
+ {
54
+ "flags": "-h, --help",
55
+ "description": "单独使用,显示入口帮助"
56
+ }
57
+ ],
58
+ "commands": [
59
+ {
60
+ "path": [
61
+ "help"
62
+ ],
63
+ "usage": "art-workshop help",
64
+ "description": "显示命令入口与 v-cli 发现方式",
65
+ "arguments": [],
66
+ "options": [],
67
+ "output": {
68
+ "format": "text",
69
+ "description": "显示命令入口与 v-cli 发现方式"
70
+ },
71
+ "exitCodes": {
72
+ "0": "成功;验收状态以返回内容为准",
73
+ "1": "参数、配置、计划或执行失败"
74
+ },
75
+ "safety": [
76
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
77
+ "无网络调用"
78
+ ]
79
+ },
80
+ {
81
+ "path": [
82
+ "config",
83
+ "path"
84
+ ],
85
+ "usage": "art-workshop config path",
86
+ "description": "显示本地配置文件路径",
87
+ "arguments": [],
88
+ "options": [],
89
+ "output": {
90
+ "format": "text",
91
+ "description": "显示本地配置文件路径"
92
+ },
93
+ "exitCodes": {
94
+ "0": "成功;验收状态以返回内容为准",
95
+ "1": "参数、配置、计划或执行失败"
96
+ },
97
+ "safety": [
98
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
99
+ "无网络调用"
100
+ ]
101
+ },
102
+ {
103
+ "path": [
104
+ "config",
105
+ "show"
106
+ ],
107
+ "usage": "art-workshop config show",
108
+ "description": "显示生效的本地配置和外部资源路径",
109
+ "arguments": [],
110
+ "options": [],
111
+ "output": {
112
+ "format": "json",
113
+ "description": "显示生效的本地配置和外部资源路径"
114
+ },
115
+ "exitCodes": {
116
+ "0": "成功;验收状态以返回内容为准",
117
+ "1": "参数、配置、计划或执行失败"
118
+ },
119
+ "safety": [
120
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
121
+ "无网络调用"
122
+ ]
123
+ },
124
+ {
125
+ "path": [
126
+ "config",
127
+ "init"
128
+ ],
129
+ "usage": "art-workshop config init",
130
+ "description": "配置不存在时创建本地模板;已存在时读取,不覆盖",
131
+ "arguments": [],
132
+ "options": [],
133
+ "output": {
134
+ "format": "json",
135
+ "description": "配置不存在时创建本地模板;已存在时读取,不覆盖"
136
+ },
137
+ "exitCodes": {
138
+ "0": "成功;验收状态以返回内容为准",
139
+ "1": "参数、配置、计划或执行失败"
140
+ },
141
+ "safety": [
142
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
143
+ "无网络调用",
144
+ "写入外部本地配置"
145
+ ]
146
+ },
147
+ {
148
+ "path": [
149
+ "refs",
150
+ "guide"
151
+ ],
152
+ "usage": "art-workshop refs guide [--project <id>]",
153
+ "description": "解释参考分类目录的用途与推荐图片样式",
154
+ "arguments": [],
155
+ "options": [
156
+ {
157
+ "flags": "--project <id>",
158
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
159
+ }
160
+ ],
161
+ "output": {
162
+ "format": "text",
163
+ "description": "解释参考分类目录的用途与推荐图片样式"
164
+ },
165
+ "exitCodes": {
166
+ "0": "成功;验收状态以返回内容为准",
167
+ "1": "参数、配置、计划或执行失败"
168
+ },
169
+ "safety": [
170
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
171
+ "无网络调用"
172
+ ]
173
+ },
174
+ {
175
+ "path": [
176
+ "agent",
177
+ "index"
178
+ ],
179
+ "usage": "art-workshop agent index",
180
+ "description": "发现模块、工程、核心、任务与随包 skill",
181
+ "arguments": [],
182
+ "options": [],
183
+ "output": {
184
+ "format": "json",
185
+ "description": "发现模块、工程、核心、任务与随包 skill"
186
+ },
187
+ "exitCodes": {
188
+ "0": "成功;验收状态以返回内容为准",
189
+ "1": "参数、配置、计划或执行失败"
190
+ },
191
+ "safety": [
192
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
193
+ "无网络调用"
194
+ ]
195
+ },
196
+ {
197
+ "path": [
198
+ "agent",
199
+ "docs"
200
+ ],
201
+ "usage": "art-workshop agent docs",
202
+ "description": "输出完整使用规范与核心冻结指导",
203
+ "arguments": [],
204
+ "options": [],
205
+ "output": {
206
+ "format": "text",
207
+ "description": "输出完整使用规范与核心冻结指导"
208
+ },
209
+ "exitCodes": {
210
+ "0": "成功;验收状态以返回内容为准",
211
+ "1": "参数、配置、计划或执行失败"
212
+ },
213
+ "safety": [
214
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
215
+ "无网络调用"
216
+ ]
217
+ },
218
+ {
219
+ "path": [
220
+ "agent",
221
+ "init"
222
+ ],
223
+ "usage": "art-workshop agent init [--directory <dir>] [--dry]",
224
+ "description": "将随包 skill 同步到目标下已有 Agent 技能目录",
225
+ "arguments": [],
226
+ "options": [
227
+ {
228
+ "flags": "--directory <dir>",
229
+ "description": "同步目标根目录,默认 cwd"
230
+ },
231
+ {
232
+ "flags": "--dry",
233
+ "description": "预演,不调用远程模型;仍补齐 refs 分类目录"
234
+ }
235
+ ],
236
+ "output": {
237
+ "format": "json",
238
+ "description": "将随包 skill 同步到目标下已有 Agent 技能目录"
239
+ },
240
+ "exitCodes": {
241
+ "0": "成功;验收状态以返回内容为准",
242
+ "1": "参数、配置、计划或执行失败"
243
+ },
244
+ "safety": [
245
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
246
+ "无网络调用",
247
+ "覆盖同名随包 skill 和 runtime.json,保留扩展文件"
248
+ ]
249
+ },
250
+ {
251
+ "path": [
252
+ "list"
253
+ ],
254
+ "usage": "art-workshop list",
255
+ "description": "列出外部工作目录中的工程",
256
+ "arguments": [],
257
+ "options": [],
258
+ "output": {
259
+ "format": "json",
260
+ "description": "列出外部工作目录中的工程"
261
+ },
262
+ "exitCodes": {
263
+ "0": "成功;验收状态以返回内容为准",
264
+ "1": "参数、配置、计划或执行失败"
265
+ },
266
+ "safety": [
267
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
268
+ "无网络调用"
269
+ ]
270
+ },
271
+ {
272
+ "path": [
273
+ "style",
274
+ "analyze"
275
+ ],
276
+ "usage": "art-workshop style analyze [--project <id>] [--input <file>] [--out <file>] [--dry]",
277
+ "description": "通过具备视觉能力的模型生成风格报告与推荐配置",
278
+ "arguments": [],
279
+ "options": [
280
+ {
281
+ "flags": "--project <id>",
282
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
283
+ },
284
+ {
285
+ "flags": "--input <file>",
286
+ "description": "分析输入 JSON,引用图片按 refs 解析"
287
+ },
288
+ {
289
+ "flags": "--out <file>",
290
+ "description": "可选外部输出文件;相对路径基于 workspace"
291
+ },
292
+ {
293
+ "flags": "--dry",
294
+ "description": "预演,不调用远程模型;仍补齐 refs 分类目录"
295
+ }
296
+ ],
297
+ "output": {
298
+ "format": "json",
299
+ "description": "通过具备视觉能力的模型生成风格报告与推荐配置"
300
+ },
301
+ "exitCodes": {
302
+ "0": "成功;验收状态以返回内容为准",
303
+ "1": "参数、配置、计划或执行失败"
304
+ },
305
+ "safety": [
306
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
307
+ "非 dry 会调用远程模型并产生费用",
308
+ "非 dry 可写入外部报告和分析缓存",
309
+ "不自动冻结核心"
310
+ ]
311
+ },
312
+ {
313
+ "path": [
314
+ "style",
315
+ "validate"
316
+ ],
317
+ "usage": "art-workshop style validate [--project <id>] [--report <file>]",
318
+ "description": "校验报告及核心规则的一致性",
319
+ "arguments": [],
320
+ "options": [
321
+ {
322
+ "flags": "--project <id>",
323
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
324
+ },
325
+ {
326
+ "flags": "--report <file>",
327
+ "description": "风格报告 JSON,相对路径基于 workspace"
328
+ }
329
+ ],
330
+ "output": {
331
+ "format": "json",
332
+ "description": "校验报告及核心规则的一致性"
333
+ },
334
+ "exitCodes": {
335
+ "0": "成功;验收状态以返回内容为准",
336
+ "1": "参数、配置、计划或执行失败"
337
+ },
338
+ "safety": [
339
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
340
+ "无网络调用"
341
+ ]
342
+ },
343
+ {
344
+ "path": [
345
+ "style",
346
+ "freeze"
347
+ ],
348
+ "usage": "art-workshop style freeze [--project <id>] [--report <file>] [--note <text>]",
349
+ "description": "采用报告并冻结核心,将核心绑定到当前工程",
350
+ "arguments": [],
351
+ "options": [
352
+ {
353
+ "flags": "--project <id>",
354
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
355
+ },
356
+ {
357
+ "flags": "--report <file>",
358
+ "description": "风格报告 JSON,相对路径基于 workspace"
359
+ },
360
+ {
361
+ "flags": "--note <text>",
362
+ "description": "冻结备注"
363
+ }
364
+ ],
365
+ "output": {
366
+ "format": "json",
367
+ "description": "采用报告并冻结核心,将核心绑定到当前工程"
368
+ },
369
+ "exitCodes": {
370
+ "0": "成功;验收状态以返回内容为准",
371
+ "1": "参数、配置、计划或执行失败"
372
+ },
373
+ "safety": [
374
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
375
+ "须有用户采用报告的授权",
376
+ "写入外部工程核心和 project.json,拒绝覆写已有核心",
377
+ "无网络调用"
378
+ ]
379
+ },
380
+ {
381
+ "path": [
382
+ "style",
383
+ "show"
384
+ ],
385
+ "usage": "art-workshop style show [--project <id>] [--core <id>]",
386
+ "description": "读取当前工程的指定冻结核心并验证完整性",
387
+ "arguments": [],
388
+ "options": [
389
+ {
390
+ "flags": "--project <id>",
391
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
392
+ },
393
+ {
394
+ "flags": "--core <id>",
395
+ "description": "工程内冻结核心 ID;显式选择与任务绑定冲突时拒绝执行"
396
+ }
397
+ ],
398
+ "output": {
399
+ "format": "json",
400
+ "description": "读取当前工程的指定冻结核心并验证完整性"
401
+ },
402
+ "exitCodes": {
403
+ "0": "成功;验收状态以返回内容为准",
404
+ "1": "参数、配置、计划或执行失败"
405
+ },
406
+ "safety": [
407
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
408
+ "无网络调用"
409
+ ]
410
+ },
411
+ {
412
+ "path": [
413
+ "generate",
414
+ "show"
415
+ ],
416
+ "usage": "art-workshop generate show [--project <id>] [--job <id>]",
417
+ "description": "读取文生图任务",
418
+ "arguments": [],
419
+ "options": [
420
+ {
421
+ "flags": "--project <id>",
422
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
423
+ },
424
+ {
425
+ "flags": "--job <id>",
426
+ "description": "工程内任务 ID"
427
+ }
428
+ ],
429
+ "output": {
430
+ "format": "json",
431
+ "description": "读取文生图任务"
432
+ },
433
+ "exitCodes": {
434
+ "0": "成功;验收状态以返回内容为准",
435
+ "1": "参数、配置、计划或执行失败"
436
+ },
437
+ "safety": [
438
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
439
+ "无网络调用"
440
+ ]
441
+ },
442
+ {
443
+ "path": [
444
+ "generate",
445
+ "plan"
446
+ ],
447
+ "usage": "art-workshop generate plan [--project <id>] [--job <id>] [--core <id>] [--out <file>]",
448
+ "description": "编译文生图计划,明确来源及真实请求",
449
+ "arguments": [],
450
+ "options": [
451
+ {
452
+ "flags": "--project <id>",
453
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
454
+ },
455
+ {
456
+ "flags": "--job <id>",
457
+ "description": "工程内任务 ID"
458
+ },
459
+ {
460
+ "flags": "--core <id>",
461
+ "description": "工程内冻结核心 ID;显式选择与任务绑定冲突时拒绝执行"
462
+ },
463
+ {
464
+ "flags": "--out <file>",
465
+ "description": "可选外部输出文件;相对路径基于 workspace"
466
+ }
467
+ ],
468
+ "output": {
469
+ "format": "json",
470
+ "description": "编译文生图计划,明确来源及真实请求"
471
+ },
472
+ "exitCodes": {
473
+ "0": "成功;验收状态以返回内容为准",
474
+ "1": "参数、配置、计划或执行失败"
475
+ },
476
+ "safety": [
477
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
478
+ "无网络调用",
479
+ "指定 out 时写入外部计划文件"
480
+ ]
481
+ },
482
+ {
483
+ "path": [
484
+ "generate",
485
+ "run"
486
+ ],
487
+ "usage": "art-workshop generate run [--plan <file>] [--project <id>] [--job <id>] [--core <id>] [--item <id>] [--variant <id>] [--explore] [--offset <n>] [--limit <n>] [--dry]",
488
+ "description": "执行或预演文生图计划",
489
+ "arguments": [],
490
+ "options": [
491
+ {
492
+ "flags": "--plan <file>",
493
+ "description": "冻结计划文件;不能同时指定 project/job/core/explore"
494
+ },
495
+ {
496
+ "flags": "--project <id>",
497
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
498
+ },
499
+ {
500
+ "flags": "--job <id>",
501
+ "description": "工程内任务 ID"
502
+ },
503
+ {
504
+ "flags": "--core <id>",
505
+ "description": "工程内冻结核心 ID;显式选择与任务绑定冲突时拒绝执行"
506
+ },
507
+ {
508
+ "flags": "--item <id>",
509
+ "description": "选择单体"
510
+ },
511
+ {
512
+ "flags": "--variant <id>",
513
+ "description": "选择候选,默认 base"
514
+ },
515
+ {
516
+ "flags": "--explore",
517
+ "description": "执行全部候选;仅在从任务编译时使用"
518
+ },
519
+ {
520
+ "flags": "--offset <n>",
521
+ "description": "选择起始偏移,默认 0"
522
+ },
523
+ {
524
+ "flags": "--limit <n>",
525
+ "description": "执行数量上限"
526
+ },
527
+ {
528
+ "flags": "--dry",
529
+ "description": "预演,不调用远程模型;仍补齐 refs 分类目录"
530
+ }
531
+ ],
532
+ "output": {
533
+ "format": "stdout",
534
+ "description": "执行或预演文生图计划"
535
+ },
536
+ "exitCodes": {
537
+ "0": "成功;验收状态以返回内容为准",
538
+ "1": "参数、配置、计划或执行失败"
539
+ },
540
+ "safety": [
541
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
542
+ "非 dry 调用远程模型并产生费用,需任务授权",
543
+ "真实执行写入外部图片及 manifest",
544
+ "预演展示请求,不生成图片"
545
+ ]
546
+ },
547
+ {
548
+ "path": [
549
+ "edit",
550
+ "show"
551
+ ],
552
+ "usage": "art-workshop edit show [--project <id>] [--job <id>]",
553
+ "description": "读取图编辑任务",
554
+ "arguments": [],
555
+ "options": [
556
+ {
557
+ "flags": "--project <id>",
558
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
559
+ },
560
+ {
561
+ "flags": "--job <id>",
562
+ "description": "工程内任务 ID"
563
+ }
564
+ ],
565
+ "output": {
566
+ "format": "json",
567
+ "description": "读取图编辑任务"
568
+ },
569
+ "exitCodes": {
570
+ "0": "成功;验收状态以返回内容为准",
571
+ "1": "参数、配置、计划或执行失败"
572
+ },
573
+ "safety": [
574
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
575
+ "无网络调用"
576
+ ]
577
+ },
578
+ {
579
+ "path": [
580
+ "edit",
581
+ "plan"
582
+ ],
583
+ "usage": "art-workshop edit plan [--project <id>] [--job <id>] [--core <id>] [--out <file>]",
584
+ "description": "编译图编辑计划,明确来源及真实请求",
585
+ "arguments": [],
586
+ "options": [
587
+ {
588
+ "flags": "--project <id>",
589
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
590
+ },
591
+ {
592
+ "flags": "--job <id>",
593
+ "description": "工程内任务 ID"
594
+ },
595
+ {
596
+ "flags": "--core <id>",
597
+ "description": "工程内冻结核心 ID;显式选择与任务绑定冲突时拒绝执行"
598
+ },
599
+ {
600
+ "flags": "--out <file>",
601
+ "description": "可选外部输出文件;相对路径基于 workspace"
602
+ }
603
+ ],
604
+ "output": {
605
+ "format": "json",
606
+ "description": "编译图编辑计划,明确来源及真实请求"
607
+ },
608
+ "exitCodes": {
609
+ "0": "成功;验收状态以返回内容为准",
610
+ "1": "参数、配置、计划或执行失败"
611
+ },
612
+ "safety": [
613
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
614
+ "无网络调用",
615
+ "指定 out 时写入外部计划文件"
616
+ ]
617
+ },
618
+ {
619
+ "path": [
620
+ "edit",
621
+ "run"
622
+ ],
623
+ "usage": "art-workshop edit run [--plan <file>] [--project <id>] [--job <id>] [--core <id>] [--item <id>] [--variant <id>] [--explore] [--offset <n>] [--limit <n>] [--dry]",
624
+ "description": "执行或预演图编辑计划",
625
+ "arguments": [],
626
+ "options": [
627
+ {
628
+ "flags": "--plan <file>",
629
+ "description": "冻结计划文件;不能同时指定 project/job/core/explore"
630
+ },
631
+ {
632
+ "flags": "--project <id>",
633
+ "description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
634
+ },
635
+ {
636
+ "flags": "--job <id>",
637
+ "description": "工程内任务 ID"
638
+ },
639
+ {
640
+ "flags": "--core <id>",
641
+ "description": "工程内冻结核心 ID;显式选择与任务绑定冲突时拒绝执行"
642
+ },
643
+ {
644
+ "flags": "--item <id>",
645
+ "description": "选择单体"
646
+ },
647
+ {
648
+ "flags": "--variant <id>",
649
+ "description": "选择候选,默认 base"
650
+ },
651
+ {
652
+ "flags": "--explore",
653
+ "description": "执行全部候选;仅在从任务编译时使用"
654
+ },
655
+ {
656
+ "flags": "--offset <n>",
657
+ "description": "选择起始偏移,默认 0"
658
+ },
659
+ {
660
+ "flags": "--limit <n>",
661
+ "description": "执行数量上限"
662
+ },
663
+ {
664
+ "flags": "--dry",
665
+ "description": "预演,不调用远程模型;仍补齐 refs 分类目录"
666
+ }
667
+ ],
668
+ "output": {
669
+ "format": "stdout",
670
+ "description": "执行或预演图编辑计划"
671
+ },
672
+ "exitCodes": {
673
+ "0": "成功;验收状态以返回内容为准",
674
+ "1": "参数、配置、计划或执行失败"
675
+ },
676
+ "safety": [
677
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
678
+ "非 dry 调用远程模型并产生费用,需任务授权",
679
+ "真实执行写入外部图片及 manifest",
680
+ "预演展示请求,不生成图片"
681
+ ]
682
+ },
683
+ {
684
+ "path": [
685
+ "check"
686
+ ],
687
+ "usage": "art-workshop check RUN [--review <file>] [--out <file>]",
688
+ "description": "导出或汇总人工验收;不自动评价图片",
689
+ "arguments": [
690
+ {
691
+ "name": "RUN",
692
+ "description": "运行目录或 manifest 路径,按 output 解析",
693
+ "required": true
694
+ }
695
+ ],
696
+ "options": [
697
+ {
698
+ "flags": "--review <file>",
699
+ "description": "人工 review JSON"
700
+ },
701
+ {
702
+ "flags": "--out <file>",
703
+ "description": "可选外部输出文件;相对路径基于 workspace"
704
+ }
705
+ ],
706
+ "output": {
707
+ "format": "json",
708
+ "description": "导出或汇总人工验收;不自动评价图片"
709
+ },
710
+ "exitCodes": {
711
+ "0": "成功;验收状态以返回内容为准",
712
+ "1": "参数、配置、计划或执行失败"
713
+ },
714
+ "safety": [
715
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
716
+ "无网络调用",
717
+ "指定 out 时写入外部验收文件"
718
+ ]
719
+ },
720
+ {
721
+ "path": [
722
+ "select"
723
+ ],
724
+ "usage": "art-workshop select RUN [--item <id>] [--variant <id>] [--review <file>] [--file <path>]",
725
+ "description": "选择完整性有效且 content/style/asset 全部通过的唯一产物",
726
+ "arguments": [
727
+ {
728
+ "name": "RUN",
729
+ "description": "运行目录或 manifest 路径,按 output 解析",
730
+ "required": true
731
+ }
732
+ ],
733
+ "options": [
734
+ {
735
+ "flags": "--item <id>",
736
+ "description": "必须指定单体"
737
+ },
738
+ {
739
+ "flags": "--variant <id>",
740
+ "description": "必须指定候选"
741
+ },
742
+ {
743
+ "flags": "--review <file>",
744
+ "description": "人工 review JSON"
745
+ },
746
+ {
747
+ "flags": "--file <path>",
748
+ "description": "选择记录内的图片文件"
749
+ }
750
+ ],
751
+ "output": {
752
+ "format": "json",
753
+ "description": "选择完整性有效且 content/style/asset 全部通过的唯一产物"
754
+ },
755
+ "exitCodes": {
756
+ "0": "成功;验收状态以返回内容为准",
757
+ "1": "参数、配置、计划或执行失败"
758
+ },
759
+ "safety": [
760
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
761
+ "无网络调用",
762
+ "写回外部 manifest 的验收与选择记录"
763
+ ]
764
+ },
765
+ {
766
+ "path": [
767
+ "compare"
768
+ ],
769
+ "usage": "art-workshop compare BEFORE AFTER",
770
+ "description": "比较两份计划或执行记录的核心、执行配置和单体变更",
771
+ "arguments": [
772
+ {
773
+ "name": "BEFORE",
774
+ "description": "前一份计划/执行记录 JSON,按 workspace 解析",
775
+ "required": true
776
+ },
777
+ {
778
+ "name": "AFTER",
779
+ "description": "后一份计划/执行记录 JSON,按 workspace 解析",
780
+ "required": true
781
+ }
782
+ ],
783
+ "options": [],
784
+ "output": {
785
+ "format": "json",
786
+ "description": "比较两份计划或执行记录的核心、执行配置和单体变更"
787
+ },
788
+ "exitCodes": {
789
+ "0": "成功;验收状态以返回内容为准",
790
+ "1": "参数、配置、计划或执行失败"
791
+ },
792
+ "safety": [
793
+ "配置生效时补齐外部 refs 分类目录,不覆盖素材",
794
+ "无网络调用"
795
+ ]
796
+ }
797
+ ]
798
+ }
799
+ }