@kevlns/art-workshop 0.6.0 → 0.6.1
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 +1 -1
- package/art-workshop.mjs +2 -7
- package/docs/commands.md +0 -170
- package/lib/core.mjs +4 -2
- package/lib/object-format.mjs +1 -1
- package/lib/style-contract.mjs +2 -2
- package/lib/style-lifecycle.mjs +7 -72
- package/lib/style-report.mjs +1 -1
- package/lib/style-samples.mjs +3 -1
- package/lib/workspace.mjs +2 -1
- package/package.json +1 -1
- package/skills/art-workshop/references/project.md +2 -3
- package/skills/art-workshop/references/style-discussion.md +5 -7
- package/v-cli.plugin.json +0 -389
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ art-workshop image agent index
|
|
|
30
30
|
|
|
31
31
|
图片命令以 `art-workshop image` 或 `v-cli art image` 开头;原有不带 `image` 的图片命令继续兼容。视频以 `art-workshop video` 或 `v-cli art video` 开头,`--workspace` 明确指定工程根目录,不复用图片对象工作区。两条通道的模型配置、任务身份和状态分别保存。完整调用、SDK 和失败模式见 [图片与视频通道](docs/channels.md)。
|
|
32
32
|
|
|
33
|
-
1. 创建 schemaVersion 2
|
|
33
|
+
1. 创建 schemaVersion 2 工程和风格,按关注点导入分析参考;直接填写并保存规则,讨论直接整理成 config.rules,无需独立分析报告。规则随时增删修改,保存有效规则即生效。
|
|
34
34
|
2. 用 `style sample-job` 创建仅规则打样任务,--count 可指定每个主体生成 1~4 张候选,配置模型、编译预案并按任务授权生成。用户认可候选后用 `style sample-select` 完成样张定版并加入当前风格的运行时参考;不合适时修改规则重新打样。
|
|
35
35
|
3. 用 `job template` 创建实际任务,填写需求,选择 `styleReferenceMode` 为 `approved`(运行时参考)或 `text-only`(仅规则)。动态参考先 `job analyze`;编辑底图单独绑定。
|
|
36
36
|
4. 编译 `generate plan` 或 `edit plan`,保存并用 `run --plan ... --dry` 核对模型、尺寸、候选数、样张输入和参数转换,再按任务授权执行。
|
package/art-workshop.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {readJson,writeJson} from './lib/shared.mjs';
|
|
|
6
6
|
const args=process.argv.slice(2),pos=[],options={};
|
|
7
7
|
const channel=['image','video'].includes(args[0])?args.shift():null;
|
|
8
8
|
if(args.length===1&&['--version','-V'].includes(args[0])){console.log(readJson(new URL('./package.json',import.meta.url)).version);process.exit(0);}
|
|
9
|
-
const imageHelp='art-workshop image: config path/show/init/validate | doctor [--backend ID] [--start] | workflow list | environment guide/list/prepare/inspect/verify/register/unregister | refs guide | agent index/docs/export | conversation start/status/cancel/resume | list | style export/import/sources/create/list/read/update/derive/discard/
|
|
9
|
+
const imageHelp='art-workshop image: config path/show/init/validate | doctor [--backend ID] [--start] | workflow list | environment guide/list/prepare/inspect/verify/register/unregister | refs guide | agent index/docs/export | conversation start/status/cancel/resume | list | style export/import/sources/create/list/read/update/derive/discard/sample-job/sample-select/sample-remove/recover/show | generate show/plan/run | edit show/plan/run | task list/status/wait/cancel/recover/resume | shutdown | check RUN | project init/upgrade | job template/from-candidate/create/list/read/update/derive/discard/restore/analyze | reference import/list/update/remove | candidate list/favorites/favorite/finalize/delete/finalizations | compare PLAN PLAN\nrun --background 返回任务 ID;--backend 选择后端。shutdown 停止当前工作区关联任务,核验共享队列和进程身份后关闭本地服务。';
|
|
10
10
|
const videoHelp='art-workshop video: describe | snapshot | settings get/save/presets h3 | runtime status/start/stop | task list/read/create/rename/archive | operation create/update/rename/derive/validate/run/resume/cancel/accept/bind | script read/update/plan/apply | film compose/refine/preview/adopt/undo | material list/import/import-file/upload/hide | image | media status | execution status\n--workspace <工程根目录> --project <项目身份,默认 project> --input <工程内 JSON 对象文件> --operation <稳定CLI操作身份>\n所有写入必须传 --operation,重复同身份只核对原回执;execution status --operation 查询意图/回执。先 describe 读取业务输入契约;写入保留 revision/expectedRevision,生成必须传稳定 requestId。unknown 只查询原运行,不换 ID 重投。读取不会启动服务,runtime start/operation run/film 操作必须显式调用。';
|
|
11
11
|
const help='art-workshop: image(图片)与 video(视频)两个独立通道。图片旧根命令继续兼容。\n'+imageHelp+'\n'+videoHelp+'\n也可用 v-cli art 调用;先 v-cli agent docs art,再 v-cli agent describe art --json 查看完整参数。';
|
|
12
12
|
if(!args.length||args.length===1&&['--help','-h','help'].includes(args[0])){console.log(channel==='video'?videoHelp:channel==='image'?imageHelp:help);process.exit(0);}
|
|
@@ -63,7 +63,7 @@ const {startTask,taskStatus,taskView,recoverTask,resumeTask,waitTask,cancelTask,
|
|
|
63
63
|
const {runtimeRoot,tasks}=await import('./lib/runtime.mjs');
|
|
64
64
|
const {validateConfiguration,doctor}=await import('./lib/diagnostics.mjs');
|
|
65
65
|
const {finishMigration,createProject,createObject,listObjects,readObject,styleView,updateObject,deriveObject,discardObject,restoreTask,importReference,removeReference,updateReference,taskDisplayState,STYLE_CATEGORIES,TASK_PURPOSES}=await import('./lib/workspace.mjs');
|
|
66
|
-
const {startAnalysis,
|
|
66
|
+
const {startAnalysis,recoverStyleAdoption}=await import('./lib/style-lifecycle.mjs');
|
|
67
67
|
const {candidates,finalize,deleteCandidate,finalizations,editFromCandidate}=await import('./lib/candidates.mjs');
|
|
68
68
|
const {createStyleSampleJob,selectStyleSample,removeStyleSample}=await import('./lib/style-samples.mjs');
|
|
69
69
|
const {favoriteList,setFavorite}=await import('./lib/favorites.mjs');
|
|
@@ -166,12 +166,7 @@ try {
|
|
|
166
166
|
if(action==='sample-job')print(await createStyleSampleJob(settings,projectId,required('id'),Number(required('revision')),{name:options.name,...(options.count!==undefined?{count:Number(options.count)}:{})}));
|
|
167
167
|
else if(action==='sample-select')print(await selectStyleSample(settings,projectId,required('id'),Number(required('revision')),{job:required('job'),run:required('run'),candidate:required('candidate'),note:options.note}));
|
|
168
168
|
else if(action==='sample-remove')print(await removeStyleSample(settings,projectId,required('id'),Number(required('revision')),required('sample')));
|
|
169
|
-
else if(action==='analyze')print(await startAnalysis(settings,projectId,required('id'),Number(required('revision')),{dry:options.dry,operationId:options.operation}));
|
|
170
169
|
else if(action==='recover')print(await recoverStyleAdoption(settings,projectId,required('id')));
|
|
171
|
-
else if(action==='revise')print(styleView(ROOT,await reviseStyleRules(settings,projectId,required('id'),Number(required('revision')),readJson(path(required('input'))))));
|
|
172
|
-
else if(action==='resolve')print(styleView(ROOT,await resolveStyleIssue(settings,projectId,required('id'),Number(required('revision')),readJson(path(required('input'))))));
|
|
173
|
-
else if(action==='adopt')print(await adoptStyle(settings,projectId,required('id'),Number(required('revision')),{note:options.note}));
|
|
174
|
-
else if(action==='validate') print(validateReport(readJson(path(required('report'))),projectId));
|
|
175
170
|
else if(action==='show') print(loadCore(projectId,required('core'),ROOT));
|
|
176
171
|
else throw new Error('未知 style 操作');
|
|
177
172
|
}else if(['generate','edit'].includes(module)){
|
package/docs/commands.md
CHANGED
|
@@ -162,40 +162,6 @@ v-cli art list
|
|
|
162
162
|
结构化能力:`art.list`。
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
- 查询与预演不创建参考目录
|
|
166
|
-
- 无网络调用
|
|
167
|
-
|
|
168
|
-
### style analyze
|
|
169
|
-
|
|
170
|
-
草稿风格后台分析
|
|
171
|
-
|
|
172
|
-
```sh
|
|
173
|
-
v-cli art style analyze
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
结构化能力:`art.style-analyze`。
|
|
177
|
-
|
|
178
|
-
- `--project <id>`:工程身份
|
|
179
|
-
- `--id <id>`:对象身份
|
|
180
|
-
- `--revision <number>`:预期对象版本
|
|
181
|
-
- `--dry`:只读编译预演
|
|
182
|
-
- `--operation <id>`:分析启动前登记的稳定操作身份
|
|
183
|
-
|
|
184
|
-
- dry 不联网、不写参考目录;执行创建运行身份和不可变参考证据;远程停止不确定时保留资源
|
|
185
|
-
|
|
186
|
-
### style validate
|
|
187
|
-
|
|
188
|
-
校验报告及核心规则的一致性
|
|
189
|
-
|
|
190
|
-
```sh
|
|
191
|
-
v-cli art style validate [--project <id>] [--report <file>]
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
结构化能力:`art.style-validate`。
|
|
195
|
-
|
|
196
|
-
- `--project <id>`:工程 ID;未指定时使用本地 defaultProject,不跨工程回退
|
|
197
|
-
- `--report <file>`:风格报告 JSON,相对路径基于 workspace
|
|
198
|
-
|
|
199
165
|
- 查询与预演不创建参考目录
|
|
200
166
|
- 无网络调用
|
|
201
167
|
|
|
@@ -561,40 +527,6 @@ v-cli art style update
|
|
|
561
527
|
|
|
562
528
|
- 查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照
|
|
563
529
|
|
|
564
|
-
### style resolve
|
|
565
|
-
|
|
566
|
-
记录用户选择并修订风格方案;input 为 {issueId,optionId,note},不重新分析、不自动采用
|
|
567
|
-
|
|
568
|
-
```sh
|
|
569
|
-
v-cli art style resolve
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
结构化能力:`art.style-resolve`。
|
|
573
|
-
|
|
574
|
-
- `--project <id>`:工程身份
|
|
575
|
-
- `--id <id>`:对象身份
|
|
576
|
-
- `--revision <number>`:预期对象版本
|
|
577
|
-
- `--input <file>`:结构化配置文件
|
|
578
|
-
|
|
579
|
-
- 查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照
|
|
580
|
-
|
|
581
|
-
### style revise
|
|
582
|
-
|
|
583
|
-
保存完整规则修订 {rules,summary,note};不要求先有分析报告,不调用模型
|
|
584
|
-
|
|
585
|
-
```sh
|
|
586
|
-
v-cli art style revise
|
|
587
|
-
```
|
|
588
|
-
|
|
589
|
-
结构化能力:`art.style-revise`。
|
|
590
|
-
|
|
591
|
-
- `--project <id>`:工程身份
|
|
592
|
-
- `--id <id>`:对象身份
|
|
593
|
-
- `--revision <number>`:预期对象版本
|
|
594
|
-
- `--input <file>`:JSON {rules,summary,note};rules 为完整规则数组,每条 id/scope/strength/instruction/when,avoid 可含 negative 抽象排除表达数组
|
|
595
|
-
|
|
596
|
-
- 查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照
|
|
597
|
-
|
|
598
530
|
### style derive
|
|
599
531
|
|
|
600
532
|
派生独立草稿,保留结构化规则与独立参考;当前冻结证据标记沿用,不继承核心、执行或授权
|
|
@@ -736,23 +668,6 @@ v-cli art job restore
|
|
|
736
668
|
|
|
737
669
|
- 验证 revision、任务归属和停止确认;归档和恢复均保留原配置、收藏与所有历史文件,不自动执行
|
|
738
670
|
|
|
739
|
-
### style adopt
|
|
740
|
-
|
|
741
|
-
兼容旧草稿的报告采用入口;已保存规则保持当前版本,日常修改直接使用 style update
|
|
742
|
-
|
|
743
|
-
```sh
|
|
744
|
-
v-cli art style adopt
|
|
745
|
-
```
|
|
746
|
-
|
|
747
|
-
结构化能力:`art.style-adopt`。
|
|
748
|
-
|
|
749
|
-
- `--project <id>`:工程身份
|
|
750
|
-
- `--id <id>`:对象身份
|
|
751
|
-
- `--revision <number>`:预期对象版本
|
|
752
|
-
- `--note <text>`:采用说明
|
|
753
|
-
|
|
754
|
-
- 来源匹配且冲突已解决;采用事务可恢复,核心只写一次
|
|
755
|
-
|
|
756
671
|
### style recover
|
|
757
672
|
|
|
758
673
|
恢复已授权采用事务
|
|
@@ -1459,40 +1374,6 @@ v-cli art image list
|
|
|
1459
1374
|
结构化能力:`art.image-list`。
|
|
1460
1375
|
|
|
1461
1376
|
|
|
1462
|
-
- 查询与预演不创建参考目录
|
|
1463
|
-
- 无网络调用
|
|
1464
|
-
|
|
1465
|
-
### image style analyze
|
|
1466
|
-
|
|
1467
|
-
草稿风格后台分析
|
|
1468
|
-
|
|
1469
|
-
```sh
|
|
1470
|
-
v-cli art image style analyze
|
|
1471
|
-
```
|
|
1472
|
-
|
|
1473
|
-
结构化能力:`art.image-style-analyze`。
|
|
1474
|
-
|
|
1475
|
-
- `--project <id>`:工程身份
|
|
1476
|
-
- `--id <id>`:对象身份
|
|
1477
|
-
- `--revision <number>`:预期对象版本
|
|
1478
|
-
- `--dry`:只读编译预演
|
|
1479
|
-
- `--operation <id>`:分析启动前登记的稳定操作身份
|
|
1480
|
-
|
|
1481
|
-
- dry 不联网、不写参考目录;执行创建运行身份和不可变参考证据;远程停止不确定时保留资源
|
|
1482
|
-
|
|
1483
|
-
### image style validate
|
|
1484
|
-
|
|
1485
|
-
校验报告及核心规则的一致性
|
|
1486
|
-
|
|
1487
|
-
```sh
|
|
1488
|
-
v-cli art image style validate [--project <id>] [--report <file>]
|
|
1489
|
-
```
|
|
1490
|
-
|
|
1491
|
-
结构化能力:`art.image-style-validate`。
|
|
1492
|
-
|
|
1493
|
-
- `--project <id>`:工程 ID;未指定时使用本地 defaultProject,不跨工程回退
|
|
1494
|
-
- `--report <file>`:风格报告 JSON,相对路径基于 workspace
|
|
1495
|
-
|
|
1496
1377
|
- 查询与预演不创建参考目录
|
|
1497
1378
|
- 无网络调用
|
|
1498
1379
|
|
|
@@ -1858,40 +1739,6 @@ v-cli art image style update
|
|
|
1858
1739
|
|
|
1859
1740
|
- 查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照
|
|
1860
1741
|
|
|
1861
|
-
### image style resolve
|
|
1862
|
-
|
|
1863
|
-
记录用户选择并修订风格方案;input 为 {issueId,optionId,note},不重新分析、不自动采用
|
|
1864
|
-
|
|
1865
|
-
```sh
|
|
1866
|
-
v-cli art image style resolve
|
|
1867
|
-
```
|
|
1868
|
-
|
|
1869
|
-
结构化能力:`art.image-style-resolve`。
|
|
1870
|
-
|
|
1871
|
-
- `--project <id>`:工程身份
|
|
1872
|
-
- `--id <id>`:对象身份
|
|
1873
|
-
- `--revision <number>`:预期对象版本
|
|
1874
|
-
- `--input <file>`:结构化配置文件
|
|
1875
|
-
|
|
1876
|
-
- 查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照
|
|
1877
|
-
|
|
1878
|
-
### image style revise
|
|
1879
|
-
|
|
1880
|
-
按用户要求修订完整规则方案;input 为 {rules,summary,note},沿用未变化的参考证据,不调用模型或自动冻结
|
|
1881
|
-
|
|
1882
|
-
```sh
|
|
1883
|
-
v-cli art image style revise
|
|
1884
|
-
```
|
|
1885
|
-
|
|
1886
|
-
结构化能力:`art.image-style-revise`。
|
|
1887
|
-
|
|
1888
|
-
- `--project <id>`:工程身份
|
|
1889
|
-
- `--id <id>`:对象身份
|
|
1890
|
-
- `--revision <number>`:预期对象版本
|
|
1891
|
-
- `--input <file>`:JSON {rules,summary,note};rules 为完整规则数组,每条 id/scope/strength/instruction/when,avoid 可含 negative 抽象排除表达数组
|
|
1892
|
-
|
|
1893
|
-
- 查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照
|
|
1894
|
-
|
|
1895
1742
|
### image style derive
|
|
1896
1743
|
|
|
1897
1744
|
派生独立草稿,保留结构化规则与独立参考;当前冻结证据标记沿用,不继承核心、执行或授权
|
|
@@ -2033,23 +1880,6 @@ v-cli art image job restore
|
|
|
2033
1880
|
|
|
2034
1881
|
- 验证 revision、任务归属和停止确认;归档和恢复均保留原配置、收藏与所有历史文件,不自动执行
|
|
2035
1882
|
|
|
2036
|
-
### image style adopt
|
|
2037
|
-
|
|
2038
|
-
兼容旧草稿的报告采用入口;已保存规则保持当前版本,日常修改直接使用 style update
|
|
2039
|
-
|
|
2040
|
-
```sh
|
|
2041
|
-
v-cli art image style adopt
|
|
2042
|
-
```
|
|
2043
|
-
|
|
2044
|
-
结构化能力:`art.image-style-adopt`。
|
|
2045
|
-
|
|
2046
|
-
- `--project <id>`:工程身份
|
|
2047
|
-
- `--id <id>`:对象身份
|
|
2048
|
-
- `--revision <number>`:预期对象版本
|
|
2049
|
-
- `--note <text>`:采用说明
|
|
2050
|
-
|
|
2051
|
-
- 来源匹配且冲突已解决;采用事务可恢复,核心只写一次
|
|
2052
|
-
|
|
2053
1883
|
### image style recover
|
|
2054
1884
|
|
|
2055
1885
|
恢复已授权采用事务
|
package/lib/core.mjs
CHANGED
|
@@ -64,14 +64,16 @@ export function loadCore(projectId, coreId, root = ROOT) {
|
|
|
64
64
|
const { coreHash, ...body } = core;
|
|
65
65
|
if (core.schema !== 'art-workshop/core' || core.project !== projectId || core.id !== coreId || hash(body) !== coreHash) throw new Error('冻结核心身份或哈希校验失败');
|
|
66
66
|
if(core.revision!==undefined&&record&&(record.revision!==core.revision||record.coreHash!==coreHash))throw new Error('风格保存尚未完成,请重新读取并保存;不能执行不匹配的版本');
|
|
67
|
-
if(core.schemaVersion!==STYLE_SCHEMA_VERSION)throw new Error('
|
|
67
|
+
if(core.schemaVersion!==STYLE_SCHEMA_VERSION)throw new Error('旧风格核心需派生并重新整理保存规则,不能自动转换造型、材质或光照约束');
|
|
68
68
|
validateCoreConfig(core.config); return core;
|
|
69
69
|
}
|
|
70
70
|
export function selectCore(project, job, requested, root = ROOT) {
|
|
71
71
|
if (requested && job.core && requested !== job.core) throw new Error('指定核心与任务绑定冲突;请明确修改任务的 core');
|
|
72
72
|
const selected = requested ?? job.core ?? project.defaultCore;
|
|
73
73
|
if (!selected) throw new Error('未选定基础核心;请指定 core,不能猜测或跨工程回退');
|
|
74
|
-
|
|
74
|
+
const core=loadCore(project.id,selected,root);
|
|
75
|
+
if(!core.config.rules.length)throw new Error('config.rules 至少需要一条有效绘制规则才能编译生成预案');
|
|
76
|
+
return { core, source: requested ? '显式选择' : job.core ? '任务绑定' : '工程默认' };
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
export function corePrompt(core) {
|
package/lib/object-format.mjs
CHANGED
package/lib/style-contract.mjs
CHANGED
|
@@ -33,7 +33,7 @@ export const EXAMPLE_CONFIG={rules:[
|
|
|
33
33
|
export const STYLE_BOUNDARY='风格只定义如何绘制:媒介、刻画密度、明暗方式、描边、高光画法、笔触和色彩关系。具体主体、轮廓、比例、结构、部件、姿态、身份色、物理材质、光源位置方向、构图、背景和资产规格属于任务,不能冻结到风格中。刻画密度不删减任务要求的结构或部件;笔触不是物体表面纹理,高光画法不是统一材质。';
|
|
34
34
|
export function assertExecutableStyle(plan){
|
|
35
35
|
if(plan.sources?.core&&plan.snapshots?.core?.schemaVersion!==STYLE_SCHEMA_VERSION)
|
|
36
|
-
throw new Error('
|
|
36
|
+
throw new Error('旧风格计划需派生风格并重新整理保存规则、重新编译;历史证据仍可只读查看');
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export function validateStyleConfig(config){
|
|
@@ -71,4 +71,4 @@ export function validateStyleDraft(config){
|
|
|
71
71
|
export const REFERENCE_NOTE_LIMIT=8000;
|
|
72
72
|
export function validateReferenceNotes({note='',ignore=''}={}){for(const [field,value] of Object.entries({note,ignore}))if(typeof value!=='string'||value.length>REFERENCE_NOTE_LIMIT)throw new ContractError('参考说明必须为8000字以内文本',{fieldPath:field});}
|
|
73
73
|
export function styleAnalysisReadiness(input){const config=input.config??input,refs=input.references??input.refs??[];const ready=!!(config.description?.trim()||config.constraints?.some(x=>x.trim())||config.rules?.length||refs.length);return {ready,reason:ready?'':'请补充风格说明、规则或参考图后分析'};}
|
|
74
|
-
export function styleContract(){return {schemaVersion:STYLE_SCHEMA_VERSION,fields:['description','constraints','rules'
|
|
74
|
+
export function styleContract(){return {schemaVersion:STYLE_SCHEMA_VERSION,fields:['description','constraints','rules'],referenceNoteLimit:REFERENCE_NOTE_LIMIT,compilation:'config.rules 确定性编译;至少一条有效规则可打样,空规则可保存草稿',rules:{scopes:RULE_SCOPES,strengths:RULE_STRENGTHS},migration:true};}
|
package/lib/style-lifecycle.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {assertObjectCurrent} from './workspace.mjs';
|
|
2
|
-
import {styleProvenance} from './style-evidence.mjs';
|
|
3
2
|
import {join} from 'node:path';
|
|
4
3
|
import {randomUUID} from 'node:crypto';
|
|
5
4
|
import {existsSync,openSync,closeSync,rmSync,cpSync,mkdirSync} from 'node:fs';
|
|
@@ -10,11 +9,8 @@ import {runtimeRoot,tasks,locked,taskFile,alive,stateRead} from './runtime.mjs';
|
|
|
10
9
|
import {taskStatus,taskView} from './tasks.mjs';
|
|
11
10
|
import {assertIdle} from './lifecycle.mjs';
|
|
12
11
|
import {writeJson,readJson,hash} from './shared.mjs';
|
|
13
|
-
import {analyzeStyle} from './analyze.mjs';
|
|
14
12
|
import {referenceInput,analyzeTaskReferences} from './task-references.mjs';
|
|
15
|
-
import {freezeCore
|
|
16
|
-
import {styleReviewState,issueFingerprint,validateIssues,resolvedRecommendation,validateStyleConfig,styleSourceHash,styleEvidenceHash} from './style-review.mjs';
|
|
17
|
-
import {mutateObject} from './workspace.mjs';
|
|
13
|
+
import {freezeCore} from './core.mjs';
|
|
18
14
|
import {REFERENCE_CATEGORIES} from './style-contract.mjs';
|
|
19
15
|
|
|
20
16
|
export function analysisInput(settings,record){
|
|
@@ -22,65 +18,28 @@ export function analysisInput(settings,record){
|
|
|
22
18
|
return {project:record.project,id:record.id,description:record.config.description??'', constraints:record.config.constraints??[],...(record.config.rules?{rules:record.config.rules}:{}),previous:record.report?.data??null,refs:verifyReferences(settings.paths.workspace,record).map(ref=>{if(!scopes[ref.category])throw new Error('参考分类已取消,请先明确重新分类:'+ref.id);return {path:ref.path,scope:scopes[ref.category],note:ref.note||ref.category,ignore:ref.ignore??''};})};
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return mutateObject(settings,projectId,'style',styleId,revision,record=>{
|
|
28
|
-
validateStyleConfig({rules});
|
|
29
|
-
if(typeof summary!=='string'||!summary.trim()||summary.length>300)throw new Error('风格概述须为1至300字');
|
|
30
|
-
if(typeof note!=='string'||!note.trim()||note.length>2000)throw new Error('请记录本次规则修改的用户依据');
|
|
31
|
-
const prior=record.report;
|
|
32
|
-
if(prior?.sourceHash===styleSourceHash(record)&&prior.data.provenance?.method==='user-rules'&&prior.data.summary===summary.trim()&&hash(prior.data.recommendation.rules)===hash(rules))return record;
|
|
33
|
-
record.reviewHistory??=[];
|
|
34
|
-
record.reviewHistory.push({type:'rules-revision',revision:record.revision+1,note:note.trim(),previousReport:structuredClone(prior)});
|
|
35
|
-
record.config={...record.config,rules:structuredClone(rules)};
|
|
36
|
-
const data={schema:'art-workshop/style-report',schemaVersion:3,project:projectId,observations:[],notes:[],...structuredClone(prior?.data??{}),id:styleId,summary:summary.trim(),recommendation:{rules:structuredClone(rules)},issues:[],decisions:[],provenance:styleProvenance(prior?.data?.provenance,{method:'user-rules',...(prior?{sourceReportHash:hash(prior.data)}:{}),note:note.trim()})};
|
|
37
|
-
validateReport(data,projectId);
|
|
38
|
-
record.report={data,sourceRevision:record.revision+1,sourceHash:styleSourceHash(record),evidenceHash:styleEvidenceHash(record),path:null,runId:null};
|
|
39
|
-
return record;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
export async function startAnalysis(settings,projectId,styleId,revision,{dry=false,kind='style',operationId=null}={}){
|
|
21
|
+
export async function startAnalysis(settings,projectId,styleId,revision,{dry=false,kind='task',operationId=null}={}){
|
|
22
|
+
if(kind!=='task')throw new Error('风格直接保存规则并编译打样;独立风格分析已移除');
|
|
43
23
|
const root=runtimeRoot(settings);
|
|
44
24
|
const prepare=async()=>{
|
|
45
25
|
if(operationId&&!dry){if(!/^[a-z0-9-]{1,128}$/.test(operationId))throw new Error('操作身份非法');const existing=tasks(root).filter(t=>t.operationId===operationId);if(existing.length){if(existing.length!==1||existing[0].project!==projectId||existing[0].objectKind!==kind||existing[0].objectId!==styleId||existing[0].sourceRevision!==revision)throw new Error('操作身份已用于其他分析请求');return taskView(taskStatus(root,existing[0].taskId));}}
|
|
46
26
|
const record=readObject(settings.paths.workspace,projectId,kind,styleId);
|
|
47
27
|
assertObjectCurrent(settings.paths.workspace,record);
|
|
48
|
-
if(record.revision!==revision)throw new Error('
|
|
49
|
-
const input=
|
|
28
|
+
if(record.revision!==revision)throw new Error('任务版本冲突');if(record.status!=='draft')throw new Error('只有可编辑对象可分析');
|
|
29
|
+
const input=referenceInput(settings.paths.workspace,record),preview=await analyzeTaskReferences({projectId,input,root:settings.paths.workspace,refsDir:settings.paths.workspace,analysisModel:record.config.analysis?.model??record.config.model??settings.analysisModel,dry:true});
|
|
50
30
|
if(dry)return preview;
|
|
51
|
-
assertIdle(tasks(root).filter(t=>(
|
|
31
|
+
assertIdle(tasks(root).filter(t=>(t.plan?.job===styleId&&t.plan?.project===projectId||t.objectId===styleId&&t.project===projectId)).map(t=>taskStatus(root,t.taskId)),'风格');
|
|
52
32
|
const gate=stateRead(join(root,'shutdown.json'));if(gate&&alive(gate.pid))throw new Error('服务正在关闭,不能启动分析');
|
|
53
33
|
const taskId='task-'+randomUUID(),file=taskFile(root,taskId),logPath=join(root,'tasks',taskId+'.log');
|
|
54
34
|
const evidence=ownedPath(objectDirectory(settings.paths.workspace,projectId,kind,styleId),'reports',taskId,'refs');
|
|
55
35
|
for(const [index,ref] of (input.refs??input.references).entries()){mkdirSync(evidence,{recursive:true});const destination=ownedPath(evidence,index+'-'+ref.path.split(/[\\/]/).at(-1));cpSync(ref.path,destination,{errorOnExist:true,force:false});ref.path=destination;}
|
|
56
|
-
const task={schema:'art-workshop/task',operationId,kind:
|
|
36
|
+
const task={schema:'art-workshop/task',operationId,kind:'task-reference-analysis',objectKind:kind,objectId:styleId,taskId,project:projectId,status:'queued',stopConfirmed:false,createdAt:new Date().toISOString(),sourceRevision:revision,sourceHash:hash({config:record.config,references:record.references}),input,model:preview.provenance.model,analysisProvider:preview.provenance.provider,workspace:settings.paths.workspace,cache:settings.paths.cache,root,logPath};writeJson(file,task);
|
|
57
37
|
const fd=openSync(logPath,'a'),child=spawn(process.execPath,[fileURLToPath(new URL('./analysis-worker.mjs',import.meta.url)),file],{detached:true,windowsHide:true,stdio:['ignore',fd,fd]});closeSync(fd);
|
|
58
38
|
try{await new Promise((resolve,reject)=>{child.once('spawn',resolve);child.once('error',reject);});}catch(error){task.status='failed';task.stopConfirmed=true;task.error=error.message;writeJson(file,task);throw error;}
|
|
59
39
|
child.unref();return {taskId,status:'queued',styleId,sourceRevision:revision};
|
|
60
40
|
};
|
|
61
41
|
return dry?prepare():locked(root,'control',prepare);
|
|
62
42
|
}
|
|
63
|
-
export async function adoptStyle(settings,projectId,styleId,revision,{note}={}){
|
|
64
|
-
return locked(runtimeRoot(settings),'control',async()=>{
|
|
65
|
-
const record=readObject(settings.paths.workspace,projectId,'style',styleId);
|
|
66
|
-
if(!['draft','frozen'].includes(record.status)||record.revision!==revision)throw new Error('风格状态或版本已变化');
|
|
67
|
-
if(record.status==='frozen'&&Array.isArray(record.config.rules))return record;
|
|
68
|
-
assertIdle(tasks(runtimeRoot(settings)).filter(t=>t.styleId===styleId&&t.project===projectId).map(t=>taskStatus(runtimeRoot(settings),t.taskId)),'风格');
|
|
69
|
-
verifyReferences(settings.paths.workspace,record);
|
|
70
|
-
if(!record.report||record.report.sourceHash!==hash({config:record.config,references:record.references}))throw new Error('分析报告缺失或已过期');
|
|
71
|
-
const report=record.report.data;validateReport(report,projectId);if(report.id!==styleId||!styleReviewState(record).ready)throw new Error('报告身份、版本或待决定问题尚未解决');
|
|
72
|
-
const journal=ownedPath(objectDirectory(settings.paths.workspace,projectId,'style',styleId),'adoption.json');
|
|
73
|
-
writeJson(journal,{project:projectId,styleId,revision,report,note,record,createdAt:new Date().toISOString()});
|
|
74
|
-
const core=freezeCore({projectId,report,root:settings.paths.workspace,note,history:record.reviewHistory??[]});
|
|
75
|
-
record.config.rules=structuredClone(core.config.rules);record.report.sourceHash=hash({config:record.config,references:record.references});
|
|
76
|
-
if(record.migration?.status==='ready')record.migration.confirmedAt??=new Date().toISOString();
|
|
77
|
-
record.status='frozen';record.coreHash=core.coreHash;record.revision++;record.updatedAt=new Date().toISOString();
|
|
78
|
-
try{writeJson(objectFile(settings.paths.workspace,projectId,'style',styleId),record);}catch(error){throw new Error('核心已冻结,但风格状态提交失败,需要恢复:'+error.message);}
|
|
79
|
-
rmSync(journal,{force:true});return record;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
43
|
/** Complete an already authorized adoption after a crash; never create a second core. */
|
|
85
44
|
export async function recoverStyleAdoption(settings,projectId,styleId){
|
|
86
45
|
return locked(runtimeRoot(settings),'control',async()=>{
|
|
@@ -98,27 +57,3 @@ export async function recoverStyleAdoption(settings,projectId,styleId){
|
|
|
98
57
|
record.status='frozen';record.coreHash=core.coreHash;record.revision=intent.revision+1;record.updatedAt=core.approvedAt;writeJson(file,record);rmSync(journal,{force:true});return record;
|
|
99
58
|
});
|
|
100
59
|
}
|
|
101
|
-
|
|
102
|
-
/** Explicit decisions update the review, never rewrite reference evidence or raw model output. */
|
|
103
|
-
export async function resolveStyleIssue(settings,projectId,styleId,revision,{issueId,optionId,note}={}){
|
|
104
|
-
return mutateObject(settings,projectId,'style',styleId,revision,record=>{
|
|
105
|
-
const state=styleReviewState(record);
|
|
106
|
-
if(state.stale||!record.report)throw new Error(state.reason);
|
|
107
|
-
validateReport(record.report.data,projectId);
|
|
108
|
-
const report=record.report.data,issue=report.issues.find(i=>i.id===issueId);
|
|
109
|
-
const option=issue?.options.find(o=>o.id===optionId);
|
|
110
|
-
if(!issue||!option)throw new Error('问题或选项不存在,请重新读取');
|
|
111
|
-
if(typeof note!=='string'||!note.trim()||note.length>2000)throw new Error('必须记录用户取舍依据');
|
|
112
|
-
const touched=new Set([...option.remove,...option.upsert.map(r=>r.id)]);
|
|
113
|
-
report.decisions=report.decisions.filter(d=>{
|
|
114
|
-
if(d.issueId===issueId)return false;
|
|
115
|
-
const old=report.issues.find(i=>i.id===d.issueId)?.options.find(o=>o.id===d.optionId);
|
|
116
|
-
return old&&![...old.remove,...old.upsert.map(r=>r.id)].some(id=>touched.has(id));
|
|
117
|
-
});
|
|
118
|
-
report.decisions.push({issueId,fingerprint:issueFingerprint(issue),optionId,note:note.trim(),decidedAt:new Date().toISOString()});
|
|
119
|
-
validateIssues(report);resolvedRecommendation(report);
|
|
120
|
-
if(Array.isArray(record.config.rules)){record.config.rules=structuredClone(resolvedRecommendation(report).rules);record.report.sourceHash=styleSourceHash(record);}
|
|
121
|
-
record.reviewHistory??=[];record.reviewHistory.push({revision:record.revision+1,runId:record.report.runId,decision:report.decisions.at(-1)});
|
|
122
|
-
return record;
|
|
123
|
-
});
|
|
124
|
-
}
|
package/lib/style-report.mjs
CHANGED
|
@@ -26,7 +26,7 @@ export function validateReport(report, projectId) {
|
|
|
26
26
|
);
|
|
27
27
|
if (report.schemaVersion !== STYLE_SCHEMA_VERSION)
|
|
28
28
|
throw new ContractError(
|
|
29
|
-
"
|
|
29
|
+
"历史风格报告版本不支持,不能用于当前契约;请重新整理保存规则",
|
|
30
30
|
);
|
|
31
31
|
if (
|
|
32
32
|
report.schema !== "art-workshop/style-report" ||
|
package/lib/style-samples.mjs
CHANGED
|
@@ -37,11 +37,13 @@ export async function createStyleSampleJob(settings,projectId,styleId,revision,{
|
|
|
37
37
|
assertObjectCurrent(settings.paths.workspace,style);
|
|
38
38
|
if(style.revision!==revision)throw new Error('对象版本冲突,请重新读取');
|
|
39
39
|
if(['discarded','cleanup-required'].includes(style.status))throw new Error('风格不可用于打样');
|
|
40
|
+
if(!style.coreHash)throw new Error('config.rules 至少需要一条有效绘制规则,请先将讨论结果保存为规则再打样');
|
|
40
41
|
const core=loadCore(projectId,styleId,settings.paths.workspace);
|
|
42
|
+
if(!core.config.rules.length)throw new Error('config.rules 至少需要一条有效绘制规则,请先将讨论结果保存为规则再打样');
|
|
41
43
|
const config=jobTemplate(settings.paths.workspace,projectId,{core:styleId});
|
|
42
44
|
config.styleReferenceMode='text-only';
|
|
43
45
|
config.execution={...config.execution,perValue:count};
|
|
44
|
-
|
|
46
|
+
|
|
45
47
|
const subjects=[['stone','石块','一块不规则岩石,轮廓完整,具有几个清楚的大切面','中性灰'],['wood-box','木箱','一个简单方形木箱,保留木板接缝与金属包角','暖棕色木板、深灰色金属'],['metal-pot','金属壶','一把带把手和壶嘴的金属壶,结构清楚','低饱和蓝色壶体、银色金属边缘']];
|
|
46
48
|
config.items=subjects.map(([id,kind,appearance,color])=>({...structuredClone(config.items[0]),id,intent:`风格验证样张:${kind}。展示当前规则组合后的画法,保持主体简单完整,便于比较描边、明暗、笔触与材质表现`,entities:[{id:'subject',kind:id,appearance,color,role:'primary',count:1}],mustRead:['完整轮廓','保持主体结构与身份色','用同一绘制语言呈现']}));
|
|
47
49
|
return createObject(settings,projectId,'task',{name:name?.trim()||style.name+' · 风格打样',config,source:{kind:'style-sample',styleId,revision:style.revision,count,rulesHash:styleRulesHash(core),coreHash:core.coreHash}});
|
package/lib/workspace.mjs
CHANGED
|
@@ -62,9 +62,10 @@ export function styleView(root,record){
|
|
|
62
62
|
const format=objectFormat(root,record);
|
|
63
63
|
const pendingReferences=(record.references??[]).filter(ref=>!STYLE_CATEGORIES.includes(ref.category)).map(ref=>ref.id);
|
|
64
64
|
const config=structuredClone(record.config);
|
|
65
|
+
delete config.analysis; // Historical model selection is not an editable style field.
|
|
65
66
|
if(format.status==='current'&&!Array.isArray(config.rules)&&record.status==='frozen')config.rules=structuredClone(loadCore(record.project,record.id,root).config.rules);
|
|
66
67
|
const rulesHash=hash(config.rules??[]);
|
|
67
|
-
return {...record,config,rulesHash,samples:(record.samples??[]).map(sample=>({...sample,stale:sample.rulesHash!==rulesHash})),editable:format.canEdit,format,
|
|
68
|
+
return {...record,config,rulesHash,samples:(record.samples??[]).map(sample=>({...sample,stale:sample.rulesHash!==rulesHash})),editable:format.canEdit,format,review:styleReviewState(record),compatibility:{usable:format.status==='current',pendingReferences,reasons:format.reasons}};
|
|
68
69
|
}
|
|
69
70
|
function objectRuns(settings,record){return tasks(runtimeRoot(settings)).filter(t=>(t.plan?.project??t.project)===record.project&&(record.schema==='art-workshop/task'?(t.plan?.job===record.id||t.objectId===record.id&&t.objectKind==='task'):t.styleId===record.id&&t.project===record.project)).map(t=>taskStatus(runtimeRoot(settings),t.taskId));}
|
|
70
71
|
export async function mutateObject(settings,projectId,kind,objectId,revision,change,{allowFrozen=false}={}){
|
package/package.json
CHANGED
|
@@ -29,10 +29,7 @@ art-workshop agent index
|
|
|
29
29
|
### 风格生命周期
|
|
30
30
|
|
|
31
31
|
草稿可含 rules,每条为 id/scope/strength/instruction/when,avoid 可另填 negative 字符串数组。按媒介、描边、明暗、高光、笔触、刻画、配色整理,主题不必填满。required 必须遵守、default 默认倾向、avoid 必须避免;“默认少用”使用 default,不升级为禁止。条件保留在 when。风格负向只表达跨主体复用的抽象绘制语言,不排除具体主体、部件、身份色、物体纹理、材质或资产规格。negative 直接描述被排除的视觉特征,不加否定前缀;instruction 为同一规则的阅读说明,条件和例外写入 when。无条件且明确填写的 negative 编译为独立负向表达,条件规则连同排除表达保留在正向条件段;未填写 negative 的文字约束保留原文,不机械转换。支持负向参数的模型直接传递,不支持时由适配器并入排除段,不丢弃、不截断。
|
|
32
|
-
规则编辑使用 style update --project ID --id STYLE --revision N --input FILE,输入完整 {name,config} 并保留未修改字段。有效 config.rules 直接生效,不因报告过期或未决分析项强制重新分析。style revise 保留为兼容修订入口,记录用户修订方案与依据;原报告和参考证据不变,不伪造新的分析。
|
|
33
32
|
|
|
34
|
-
style create/read/update/derive/discard 管理风格;已有可执行风格也可 update。style analyze 是可选辅助,--dry 只读编译,不联网、启动服务或创建参考目录。实际 analyze 创建 taskId 与独立参考证据;task status/wait/cancel 控制执行,recover 查原登记,resume 仅按已记录的上游身份恢复查询与取回,不重新提交。
|
|
35
|
-
报告绑定源配置、参考与模型。更新配置保留报告并标记需复核,源证据保持不变。报告 recommendation.rules 是分析建议,config.rules 才是已保存规则;用户要求回填时必须取得实际保存回执。issues 仅列需用户取舍的矛盾;style resolve 按实际选择修订建议,不清空问题绕过分析。review.ready 只表示建议可采用,不限制直接保存规则。style adopt/style recover 保留兼容报告采用及其原中断事务,不是编辑保存的前置步骤。
|
|
36
33
|
退出风格配置先按宿主提供的保存或草稿机制处理未保存内容。分析与生成仍遵循原执行身份和停止确认;不能因切换页面或保存规则重投任务。
|
|
37
34
|
|
|
38
35
|
### 打样与样张定版
|
|
@@ -117,3 +114,5 @@ job read 返回的 resolvedAsset 是只读有效资产规格,assetError 表示
|
|
|
117
114
|
## 许可与版权
|
|
118
115
|
|
|
119
116
|
MIT。Copyright © 2026 Vant。
|
|
117
|
+
|
|
118
|
+
风格直接使用 style read/update 保存完整 config.rules,再 style sample-job 创建样张任务,通过 generate plan 编译契约与提示词后生成。没有独立风格分析、报告回填或采用步骤。可自由调整规则、条件、倾向、参考关注点和样张任务的主体与参数;描述与约束是讨论上下文,实际绘制契约以 config.rules 为准。空规则可保存草稿,打样需要有效规则。历史报告保留只读证据;style recover 仅用于完成原有中断事务,不能新建采用流程。
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
读取真实图片像素,再分析可复用的媒介观感、线条、笔触、明暗处理、刻画密度及色彩关系。某张图里的具体人物、比例、部件、身份色、材质、场景和光源记录在相关观察上下文,不写成跨主体风格要求。没有证据的分类可以不填,不补齐一套看似完整的规则。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
宿主模型能直接看图时,可以根据当前图像观察整理风格草稿;无需启动独立风格分析任务。宿主无法看图时使用会话中实际可用的视觉能力,能力未配置或不可用就说明限制,不凭图片名称猜测。只为普通措辞修改不重复分析。
|
|
12
12
|
|
|
13
|
-
用户已授权分析和填写时,把贴合目标的分析与适度专业化描述自动保存到当前草稿,保留未修改配置,使用工具提供的 description、constraints、rules
|
|
13
|
+
用户已授权分析和填写时,把贴合目标的分析与适度专业化描述自动保存到当前草稿,保留未修改配置,使用工具提供的 description、constraints、rules 等实际字段。图像观察通常适合写成 default 倾向;required/avoid 用于确实需要必须遵守或避免的要求,注意不要仅因参考图如此就升级强度。既有身份、参考分类及无关规则保持不变。
|
|
14
14
|
|
|
15
15
|
描述可以有细节,重点是保持适用范围和弹性。例如由柔和光晕提炼出柔和高光是合理的,直接变成所有资产禁止硬边高光就可能过度。毛发、雪面等可作观察例子,通用规则尽量提炼其背后的笔触或过渡方式。配色可描述参考图中的颜色及关系,但不要无意中固定以后所有主体的身份色。无需机械删除具体颜色、数量或形容词,按它们是否有依据、是否帮助当前目标来判断,也不要求填满所有绘制主题。
|
|
16
16
|
|
|
17
|
-
rules 使用当前工具返回的规则数组,不把主题目录包装成新对象。按当前 revision 用对象更新保存完整 config.rules
|
|
17
|
+
rules 使用当前工具返回的规则数组,不把主题目录包装成新对象。按当前 revision 用对象更新保存完整 config.rules,已有正式风格也可直接保存;有无正式报告都不要求先派生或重新分析。实际打样以 config.rules 编译;描述和约束用于讨论上下文,不自动转换为规则。
|
|
18
18
|
|
|
19
19
|
用户后续说“线条稍利落一点,颜色别变”时,只局部调整相关规则的措辞与程度,保留其他规则和配置,不把小幅修改改成全局禁用软边、纹理或其他技法。原意已清楚就直接保存,不以分类未填满为由继续追问。
|
|
20
20
|
|
|
@@ -22,10 +22,8 @@ rules 使用当前工具返回的规则数组,不把主题目录包装成新
|
|
|
22
22
|
|
|
23
23
|
规则保存后可以按用户要求创建仅规则打样任务,使用不同简单主体验证可复用的绘制语言。仅创建任务不自动生成;实际出图按任务配置和授权执行。用户不满意时局部修改并保存规则,重新打样;用户选定后通过样张定版加入当前风格的运行时参考。原始分主题图继续作为分析依据,不全部上传给生成模型。规则变化使原样张过期时说明实际状态,后续任务可重新打样或明确采用仅规则模式,不伪称新规则已验证。
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## 实际保存
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
不能只展示报告建议就声称已回填。用户要求填写配置时,分析完成后还需按当前 revision 保存可用规则;不强制重新分析、采用或派生。真实未决问题留在报告,不清空问题或更改参考伪装分析通过。用户直接编辑规则的依据与模型分析证据分别记录。
|
|
27
|
+
规则保存即同步当前契约,历史报告只保留证据,不需要报告回填或采用。空规则允许保存草稿;打样前将要生效的约束整理为规则。
|
|
30
28
|
|
|
31
29
|
用保存回执中的完整对象核对 revision 及实际 config;回执缺少完整内容时再读取一次。简短展示实际填入内容与必要未决项;用户要看最终配置时直接展示保存后的 JSON,不展示另写的一份理想配置。不逐条解释自己没有做哪些扩写,也不附带与本轮无关的下一步确认。保存失败、分析尚未完成或仅有观察建议时如实说明,不声称已经生效。一次校验后结束,本轮不自发循环分析、改写或出图。
|
package/v-cli.plugin.json
CHANGED
|
@@ -275,81 +275,6 @@
|
|
|
275
275
|
],
|
|
276
276
|
"capabilityId": "art.list"
|
|
277
277
|
},
|
|
278
|
-
{
|
|
279
|
-
"path": [
|
|
280
|
-
"style",
|
|
281
|
-
"analyze"
|
|
282
|
-
],
|
|
283
|
-
"usage": "art-workshop style analyze",
|
|
284
|
-
"description": "草稿风格后台分析",
|
|
285
|
-
"arguments": [],
|
|
286
|
-
"options": [
|
|
287
|
-
{
|
|
288
|
-
"flags": "--project <id>",
|
|
289
|
-
"description": "工程身份"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"flags": "--id <id>",
|
|
293
|
-
"description": "对象身份"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"flags": "--revision <number>",
|
|
297
|
-
"description": "预期对象版本"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"flags": "--dry",
|
|
301
|
-
"description": "只读编译预演"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"flags": "--operation <id>",
|
|
305
|
-
"description": "分析启动前登记的稳定操作身份"
|
|
306
|
-
}
|
|
307
|
-
],
|
|
308
|
-
"output": {
|
|
309
|
-
"format": "json",
|
|
310
|
-
"description": "草稿风格后台分析"
|
|
311
|
-
},
|
|
312
|
-
"exitCodes": {
|
|
313
|
-
"0": "成功",
|
|
314
|
-
"1": "校验、版本冲突或执行失败"
|
|
315
|
-
},
|
|
316
|
-
"safety": [
|
|
317
|
-
"dry 不联网、不写参考目录;执行创建运行身份和不可变参考证据;远程停止不确定时保留资源"
|
|
318
|
-
],
|
|
319
|
-
"capabilityId": "art.style-analyze"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"path": [
|
|
323
|
-
"style",
|
|
324
|
-
"validate"
|
|
325
|
-
],
|
|
326
|
-
"usage": "art-workshop style validate [--project <id>] [--report <file>]",
|
|
327
|
-
"description": "校验报告及核心规则的一致性",
|
|
328
|
-
"arguments": [],
|
|
329
|
-
"options": [
|
|
330
|
-
{
|
|
331
|
-
"flags": "--project <id>",
|
|
332
|
-
"description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"flags": "--report <file>",
|
|
336
|
-
"description": "风格报告 JSON,相对路径基于 workspace"
|
|
337
|
-
}
|
|
338
|
-
],
|
|
339
|
-
"output": {
|
|
340
|
-
"format": "json",
|
|
341
|
-
"description": "校验报告及核心规则的一致性"
|
|
342
|
-
},
|
|
343
|
-
"exitCodes": {
|
|
344
|
-
"0": "成功;验收状态以返回内容为准",
|
|
345
|
-
"1": "参数、配置、计划或执行失败"
|
|
346
|
-
},
|
|
347
|
-
"safety": [
|
|
348
|
-
"查询与预演不创建参考目录",
|
|
349
|
-
"无网络调用"
|
|
350
|
-
],
|
|
351
|
-
"capabilityId": "art.style-validate"
|
|
352
|
-
},
|
|
353
278
|
{
|
|
354
279
|
"path": [
|
|
355
280
|
"style",
|
|
@@ -1121,84 +1046,6 @@
|
|
|
1121
1046
|
],
|
|
1122
1047
|
"capabilityId": "art.style-update"
|
|
1123
1048
|
},
|
|
1124
|
-
{
|
|
1125
|
-
"path": [
|
|
1126
|
-
"style",
|
|
1127
|
-
"resolve"
|
|
1128
|
-
],
|
|
1129
|
-
"usage": "art-workshop style resolve",
|
|
1130
|
-
"description": "记录用户选择并修订风格方案;input 为 {issueId,optionId,note},不重新分析、不自动采用",
|
|
1131
|
-
"arguments": [],
|
|
1132
|
-
"options": [
|
|
1133
|
-
{
|
|
1134
|
-
"flags": "--project <id>",
|
|
1135
|
-
"description": "工程身份"
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
"flags": "--id <id>",
|
|
1139
|
-
"description": "对象身份"
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
"flags": "--revision <number>",
|
|
1143
|
-
"description": "预期对象版本"
|
|
1144
|
-
},
|
|
1145
|
-
{
|
|
1146
|
-
"flags": "--input <file>",
|
|
1147
|
-
"description": "结构化配置文件"
|
|
1148
|
-
}
|
|
1149
|
-
],
|
|
1150
|
-
"output": {
|
|
1151
|
-
"format": "json",
|
|
1152
|
-
"description": "校验预期版本及空闲状态后更新对象"
|
|
1153
|
-
},
|
|
1154
|
-
"exitCodes": {
|
|
1155
|
-
"0": "成功",
|
|
1156
|
-
"1": "校验、版本冲突或执行失败"
|
|
1157
|
-
},
|
|
1158
|
-
"safety": [
|
|
1159
|
-
"查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照"
|
|
1160
|
-
],
|
|
1161
|
-
"capabilityId": "art.style-resolve"
|
|
1162
|
-
},
|
|
1163
|
-
{
|
|
1164
|
-
"path": [
|
|
1165
|
-
"style",
|
|
1166
|
-
"revise"
|
|
1167
|
-
],
|
|
1168
|
-
"usage": "art-workshop style revise",
|
|
1169
|
-
"description": "保存完整规则修订 {rules,summary,note};不要求先有分析报告,不调用模型",
|
|
1170
|
-
"arguments": [],
|
|
1171
|
-
"options": [
|
|
1172
|
-
{
|
|
1173
|
-
"flags": "--project <id>",
|
|
1174
|
-
"description": "工程身份"
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
"flags": "--id <id>",
|
|
1178
|
-
"description": "对象身份"
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
"flags": "--revision <number>",
|
|
1182
|
-
"description": "预期对象版本"
|
|
1183
|
-
},
|
|
1184
|
-
{
|
|
1185
|
-
"flags": "--input <file>",
|
|
1186
|
-
"description": "JSON {rules,summary,note};rules 为完整规则数组,每条 id/scope/strength/instruction/when,avoid 可含 negative 抽象排除表达数组"
|
|
1187
|
-
}
|
|
1188
|
-
],
|
|
1189
|
-
"output": {
|
|
1190
|
-
"format": "json",
|
|
1191
|
-
"description": "校验预期版本及空闲状态后更新对象"
|
|
1192
|
-
},
|
|
1193
|
-
"exitCodes": {
|
|
1194
|
-
"0": "成功",
|
|
1195
|
-
"1": "校验、版本冲突或执行失败"
|
|
1196
|
-
},
|
|
1197
|
-
"safety": [
|
|
1198
|
-
"查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照"
|
|
1199
|
-
],
|
|
1200
|
-
"capabilityId": "art.style-revise"
|
|
1201
|
-
},
|
|
1202
1049
|
{
|
|
1203
1050
|
"path": [
|
|
1204
1051
|
"style",
|
|
@@ -1502,45 +1349,6 @@
|
|
|
1502
1349
|
],
|
|
1503
1350
|
"capabilityId": "art.job-restore"
|
|
1504
1351
|
},
|
|
1505
|
-
{
|
|
1506
|
-
"path": [
|
|
1507
|
-
"style",
|
|
1508
|
-
"adopt"
|
|
1509
|
-
],
|
|
1510
|
-
"usage": "art-workshop style adopt",
|
|
1511
|
-
"description": "兼容旧草稿的报告采用入口;已保存规则保持当前版本,日常修改直接使用 style update",
|
|
1512
|
-
"arguments": [],
|
|
1513
|
-
"options": [
|
|
1514
|
-
{
|
|
1515
|
-
"flags": "--project <id>",
|
|
1516
|
-
"description": "工程身份"
|
|
1517
|
-
},
|
|
1518
|
-
{
|
|
1519
|
-
"flags": "--id <id>",
|
|
1520
|
-
"description": "对象身份"
|
|
1521
|
-
},
|
|
1522
|
-
{
|
|
1523
|
-
"flags": "--revision <number>",
|
|
1524
|
-
"description": "预期对象版本"
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
"flags": "--note <text>",
|
|
1528
|
-
"description": "采用说明"
|
|
1529
|
-
}
|
|
1530
|
-
],
|
|
1531
|
-
"output": {
|
|
1532
|
-
"format": "json",
|
|
1533
|
-
"description": "采用当前有效报告并冻结"
|
|
1534
|
-
},
|
|
1535
|
-
"exitCodes": {
|
|
1536
|
-
"0": "成功",
|
|
1537
|
-
"1": "校验、版本冲突或执行失败"
|
|
1538
|
-
},
|
|
1539
|
-
"safety": [
|
|
1540
|
-
"来源匹配且冲突已解决;采用事务可恢复,核心只写一次"
|
|
1541
|
-
],
|
|
1542
|
-
"capabilityId": "art.style-adopt"
|
|
1543
|
-
},
|
|
1544
1352
|
{
|
|
1545
1353
|
"path": [
|
|
1546
1354
|
"style",
|
|
@@ -3047,83 +2855,6 @@
|
|
|
3047
2855
|
],
|
|
3048
2856
|
"capabilityId": "art.image-list"
|
|
3049
2857
|
},
|
|
3050
|
-
{
|
|
3051
|
-
"path": [
|
|
3052
|
-
"image",
|
|
3053
|
-
"style",
|
|
3054
|
-
"analyze"
|
|
3055
|
-
],
|
|
3056
|
-
"usage": "art-workshop image style analyze",
|
|
3057
|
-
"description": "草稿风格后台分析",
|
|
3058
|
-
"arguments": [],
|
|
3059
|
-
"options": [
|
|
3060
|
-
{
|
|
3061
|
-
"flags": "--project <id>",
|
|
3062
|
-
"description": "工程身份"
|
|
3063
|
-
},
|
|
3064
|
-
{
|
|
3065
|
-
"flags": "--id <id>",
|
|
3066
|
-
"description": "对象身份"
|
|
3067
|
-
},
|
|
3068
|
-
{
|
|
3069
|
-
"flags": "--revision <number>",
|
|
3070
|
-
"description": "预期对象版本"
|
|
3071
|
-
},
|
|
3072
|
-
{
|
|
3073
|
-
"flags": "--dry",
|
|
3074
|
-
"description": "只读编译预演"
|
|
3075
|
-
},
|
|
3076
|
-
{
|
|
3077
|
-
"flags": "--operation <id>",
|
|
3078
|
-
"description": "分析启动前登记的稳定操作身份"
|
|
3079
|
-
}
|
|
3080
|
-
],
|
|
3081
|
-
"output": {
|
|
3082
|
-
"format": "json",
|
|
3083
|
-
"description": "草稿风格后台分析"
|
|
3084
|
-
},
|
|
3085
|
-
"exitCodes": {
|
|
3086
|
-
"0": "成功",
|
|
3087
|
-
"1": "校验、版本冲突或执行失败"
|
|
3088
|
-
},
|
|
3089
|
-
"safety": [
|
|
3090
|
-
"dry 不联网、不写参考目录;执行创建运行身份和不可变参考证据;远程停止不确定时保留资源"
|
|
3091
|
-
],
|
|
3092
|
-
"capabilityId": "art.image-style-analyze"
|
|
3093
|
-
},
|
|
3094
|
-
{
|
|
3095
|
-
"path": [
|
|
3096
|
-
"image",
|
|
3097
|
-
"style",
|
|
3098
|
-
"validate"
|
|
3099
|
-
],
|
|
3100
|
-
"usage": "art-workshop image style validate [--project <id>] [--report <file>]",
|
|
3101
|
-
"description": "校验报告及核心规则的一致性",
|
|
3102
|
-
"arguments": [],
|
|
3103
|
-
"options": [
|
|
3104
|
-
{
|
|
3105
|
-
"flags": "--project <id>",
|
|
3106
|
-
"description": "工程 ID;未指定时使用本地 defaultProject,不跨工程回退"
|
|
3107
|
-
},
|
|
3108
|
-
{
|
|
3109
|
-
"flags": "--report <file>",
|
|
3110
|
-
"description": "风格报告 JSON,相对路径基于 workspace"
|
|
3111
|
-
}
|
|
3112
|
-
],
|
|
3113
|
-
"output": {
|
|
3114
|
-
"format": "json",
|
|
3115
|
-
"description": "校验报告及核心规则的一致性"
|
|
3116
|
-
},
|
|
3117
|
-
"exitCodes": {
|
|
3118
|
-
"0": "成功;验收状态以返回内容为准",
|
|
3119
|
-
"1": "参数、配置、计划或执行失败"
|
|
3120
|
-
},
|
|
3121
|
-
"safety": [
|
|
3122
|
-
"查询与预演不创建参考目录",
|
|
3123
|
-
"无网络调用"
|
|
3124
|
-
],
|
|
3125
|
-
"capabilityId": "art.image-style-validate"
|
|
3126
|
-
},
|
|
3127
2858
|
{
|
|
3128
2859
|
"path": [
|
|
3129
2860
|
"image",
|
|
@@ -3916,86 +3647,6 @@
|
|
|
3916
3647
|
],
|
|
3917
3648
|
"capabilityId": "art.image-style-update"
|
|
3918
3649
|
},
|
|
3919
|
-
{
|
|
3920
|
-
"path": [
|
|
3921
|
-
"image",
|
|
3922
|
-
"style",
|
|
3923
|
-
"resolve"
|
|
3924
|
-
],
|
|
3925
|
-
"usage": "art-workshop image style resolve",
|
|
3926
|
-
"description": "记录用户选择并修订风格方案;input 为 {issueId,optionId,note},不重新分析、不自动采用",
|
|
3927
|
-
"arguments": [],
|
|
3928
|
-
"options": [
|
|
3929
|
-
{
|
|
3930
|
-
"flags": "--project <id>",
|
|
3931
|
-
"description": "工程身份"
|
|
3932
|
-
},
|
|
3933
|
-
{
|
|
3934
|
-
"flags": "--id <id>",
|
|
3935
|
-
"description": "对象身份"
|
|
3936
|
-
},
|
|
3937
|
-
{
|
|
3938
|
-
"flags": "--revision <number>",
|
|
3939
|
-
"description": "预期对象版本"
|
|
3940
|
-
},
|
|
3941
|
-
{
|
|
3942
|
-
"flags": "--input <file>",
|
|
3943
|
-
"description": "结构化配置文件"
|
|
3944
|
-
}
|
|
3945
|
-
],
|
|
3946
|
-
"output": {
|
|
3947
|
-
"format": "json",
|
|
3948
|
-
"description": "校验预期版本及空闲状态后更新对象"
|
|
3949
|
-
},
|
|
3950
|
-
"exitCodes": {
|
|
3951
|
-
"0": "成功",
|
|
3952
|
-
"1": "校验、版本冲突或执行失败"
|
|
3953
|
-
},
|
|
3954
|
-
"safety": [
|
|
3955
|
-
"查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照"
|
|
3956
|
-
],
|
|
3957
|
-
"capabilityId": "art.image-style-resolve"
|
|
3958
|
-
},
|
|
3959
|
-
{
|
|
3960
|
-
"path": [
|
|
3961
|
-
"image",
|
|
3962
|
-
"style",
|
|
3963
|
-
"revise"
|
|
3964
|
-
],
|
|
3965
|
-
"usage": "art-workshop image style revise",
|
|
3966
|
-
"description": "按用户要求修订完整规则方案;input 为 {rules,summary,note},沿用未变化的参考证据,不调用模型或自动冻结",
|
|
3967
|
-
"arguments": [],
|
|
3968
|
-
"options": [
|
|
3969
|
-
{
|
|
3970
|
-
"flags": "--project <id>",
|
|
3971
|
-
"description": "工程身份"
|
|
3972
|
-
},
|
|
3973
|
-
{
|
|
3974
|
-
"flags": "--id <id>",
|
|
3975
|
-
"description": "对象身份"
|
|
3976
|
-
},
|
|
3977
|
-
{
|
|
3978
|
-
"flags": "--revision <number>",
|
|
3979
|
-
"description": "预期对象版本"
|
|
3980
|
-
},
|
|
3981
|
-
{
|
|
3982
|
-
"flags": "--input <file>",
|
|
3983
|
-
"description": "JSON {rules,summary,note};rules 为完整规则数组,每条 id/scope/strength/instruction/when,avoid 可含 negative 抽象排除表达数组"
|
|
3984
|
-
}
|
|
3985
|
-
],
|
|
3986
|
-
"output": {
|
|
3987
|
-
"format": "json",
|
|
3988
|
-
"description": "校验预期版本及空闲状态后更新对象"
|
|
3989
|
-
},
|
|
3990
|
-
"exitCodes": {
|
|
3991
|
-
"0": "成功",
|
|
3992
|
-
"1": "校验、版本冲突或执行失败"
|
|
3993
|
-
},
|
|
3994
|
-
"safety": [
|
|
3995
|
-
"查询不写入;修改验证 revision、归属和停止确认;风格规则保存即更新,历史执行保留快照"
|
|
3996
|
-
],
|
|
3997
|
-
"capabilityId": "art.image-style-revise"
|
|
3998
|
-
},
|
|
3999
3650
|
{
|
|
4000
3651
|
"path": [
|
|
4001
3652
|
"image",
|
|
@@ -4308,46 +3959,6 @@
|
|
|
4308
3959
|
],
|
|
4309
3960
|
"capabilityId": "art.image-job-restore"
|
|
4310
3961
|
},
|
|
4311
|
-
{
|
|
4312
|
-
"path": [
|
|
4313
|
-
"image",
|
|
4314
|
-
"style",
|
|
4315
|
-
"adopt"
|
|
4316
|
-
],
|
|
4317
|
-
"usage": "art-workshop image style adopt",
|
|
4318
|
-
"description": "兼容旧草稿的报告采用入口;已保存规则保持当前版本,日常修改直接使用 style update",
|
|
4319
|
-
"arguments": [],
|
|
4320
|
-
"options": [
|
|
4321
|
-
{
|
|
4322
|
-
"flags": "--project <id>",
|
|
4323
|
-
"description": "工程身份"
|
|
4324
|
-
},
|
|
4325
|
-
{
|
|
4326
|
-
"flags": "--id <id>",
|
|
4327
|
-
"description": "对象身份"
|
|
4328
|
-
},
|
|
4329
|
-
{
|
|
4330
|
-
"flags": "--revision <number>",
|
|
4331
|
-
"description": "预期对象版本"
|
|
4332
|
-
},
|
|
4333
|
-
{
|
|
4334
|
-
"flags": "--note <text>",
|
|
4335
|
-
"description": "采用说明"
|
|
4336
|
-
}
|
|
4337
|
-
],
|
|
4338
|
-
"output": {
|
|
4339
|
-
"format": "json",
|
|
4340
|
-
"description": "采用当前有效报告并冻结"
|
|
4341
|
-
},
|
|
4342
|
-
"exitCodes": {
|
|
4343
|
-
"0": "成功",
|
|
4344
|
-
"1": "校验、版本冲突或执行失败"
|
|
4345
|
-
},
|
|
4346
|
-
"safety": [
|
|
4347
|
-
"来源匹配且冲突已解决;采用事务可恢复,核心只写一次"
|
|
4348
|
-
],
|
|
4349
|
-
"capabilityId": "art.image-style-adopt"
|
|
4350
|
-
},
|
|
4351
3962
|
{
|
|
4352
3963
|
"path": [
|
|
4353
3964
|
"image",
|