@kevlns/art-workshop 0.3.11 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/AGENTS.md +21 -3
  2. package/README.md +1 -1
  3. package/art-workshop.mjs +20 -10
  4. package/docs/commands.md +76 -5
  5. package/docs/core-guidance.md +12 -4
  6. package/docs/data-formats.md +31 -5
  7. package/docs/deployment.md +1 -1
  8. package/docs/local-models/qwen-image-2.1.json +19 -1
  9. package/docs/local-models/qwen-image-2.1.md +6 -4
  10. package/docs/model-architecture.md +4 -0
  11. package/docs/modes.md +7 -1
  12. package/docs/troubleshooting.md +5 -2
  13. package/lib/agent.mjs +3 -1
  14. package/lib/analysis-worker.mjs +2 -1
  15. package/lib/analyze.mjs +8 -7
  16. package/lib/backends.mjs +8 -0
  17. package/lib/candidates.mjs +10 -4
  18. package/lib/comfy-recovery.mjs +17 -0
  19. package/lib/comfyui.mjs +12 -7
  20. package/lib/core.mjs +24 -7
  21. package/lib/edit.mjs +11 -8
  22. package/lib/environment-runtime.mjs +99 -0
  23. package/lib/environments.mjs +7 -4
  24. package/lib/executor.mjs +7 -4
  25. package/lib/favorites.mjs +49 -0
  26. package/lib/generate.mjs +12 -8
  27. package/lib/generation-policy.mjs +1 -1
  28. package/lib/heartbeat.mjs +16 -0
  29. package/lib/presentation.mjs +3 -1
  30. package/lib/prompt-structure.mjs +22 -0
  31. package/lib/shared.mjs +5 -1
  32. package/lib/style-contract.mjs +14 -1
  33. package/lib/style-lifecycle.mjs +25 -3
  34. package/lib/style-review.mjs +10 -1
  35. package/lib/task-contract.mjs +33 -3
  36. package/lib/task-references.mjs +13 -1
  37. package/lib/task-worker.mjs +22 -5
  38. package/lib/tasks.mjs +23 -6
  39. package/lib/templates.mjs +4 -2
  40. package/lib/transparent-output.mjs +74 -0
  41. package/lib/workspace.mjs +30 -9
  42. package/package.json +1 -1
  43. package/rules/core-guidance.json +1 -0
  44. package/skills/art-workshop/SKILL.md +25 -5
  45. package/v-cli.plugin.json +181 -7
  46. package/workflows/vant-builtin-qwen-image-2.1-Q4-8GB.api.json +1 -1
  47. package/workflows/vant-builtin-qwen-image-2.1-Q4-8GB.json +2 -2
package/lib/workspace.mjs CHANGED
@@ -11,12 +11,13 @@ import {validateImage} from './images.mjs';
11
11
  import {taskStatus} from './tasks.mjs';
12
12
 
13
13
  import {STYLE_CATEGORIES,STYLE_SCHEMA_VERSION} from './style-contract.mjs';
14
- import {styleReviewState,resolvedRecommendation} from './style-review.mjs';
14
+ import {styleReviewState,resolvedRecommendation,validateStyleConfig,styleEvidenceHash} from './style-review.mjs';
15
15
  export {STYLE_CATEGORIES} from './style-contract.mjs';
16
16
  export const TASK_PURPOSES=['subject','composition','pose','identity-color','surface','scene-light','text'];
17
17
  const now=()=>new Date().toISOString();
18
18
  function styleConfig(config){
19
- keys(config,['description','constraints','analysis'],'style config');
19
+ keys(config,['description','constraints','rules','analysis'],'style config');
20
+ if(config.rules!==undefined)validateStyleConfig({rules:config.rules});
20
21
  if(config.description!==undefined&&(typeof config.description!=='string'||config.description.length>12000))throw new Error('风格描述必须是12000字以内文本');
21
22
  if(config.constraints!==undefined)texts(config.constraints,'constraints',{empty:true});
22
23
  if(config.analysis!==undefined){keys(config.analysis,['provider','model'],'analysis');text(config.analysis.provider,'analysis.provider');text(config.analysis.model,'analysis.model');}
@@ -61,7 +62,7 @@ export function styleView(root,record){
61
62
  }
62
63
  return {...record,review:styleReviewState(record),compatibility:{usable:reasons.length===0,pendingReferences,reasons}};
63
64
  }
64
- function objectRuns(settings,record){return tasks(runtimeRoot(settings)).map(t=>taskStatus(runtimeRoot(settings),t.taskId)).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));}
65
+ 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));}
65
66
  export async function mutateObject(settings,projectId,kind,objectId,revision,change,{allowFrozen=false}={}){
66
67
  const file=objectFile(settings.paths.workspace,projectId,kind,objectId);
67
68
  return locked(runtimeRoot(settings),'control',async()=>{
@@ -114,7 +115,7 @@ export async function importReference(settings,projectId,kind,objectId,revision,
114
115
  });}catch(error){if(created)rmSync(created,{force:true});throw error;}
115
116
  }
116
117
  export async function updateObject(settings,projectId,kind,objectId,revision,{name,config}={}){
117
- return mutateObject(settings,projectId,kind,objectId,revision,async record=>{const before=hash(record.config);if(name!==undefined){if(!name.trim())throw new Error('名称不能为空');record.name=name;}if(config!==undefined){if(kind==='task'&&(config.kind!==record.config.kind||config.project&&config.project!==projectId))throw new Error('任务类型/工程不可修改');record.config=kind==='task'?await importSources(settings,record,validateTaskDraft(config)):styleConfig(config);if(kind==='task')record.config.project=projectId;}if(hash(record.config)!==before)if(kind==='task')record.report=null;return record;});
118
+ return mutateObject(settings,projectId,kind,objectId,revision,async record=>{if(kind==='style'&&record.report&&record.report.sourceHash===hash({config:record.config,references:record.references}))record.report.evidenceHash=styleEvidenceHash(record);const before=hash(record.config);if(name!==undefined){if(!name.trim())throw new Error('名称不能为空');record.name=name;}if(config!==undefined){if(kind==='task'&&(config.kind!==record.config.kind||config.project&&config.project!==projectId))throw new Error('任务类型/工程不可修改');record.config=kind==='task'?await importSources(settings,record,validateTaskDraft(config)):styleConfig(config);if(kind==='task')record.config.project=projectId;}if(hash(record.config)!==before)if(kind==='task')record.report=null;return record;});
118
119
  }
119
120
  export async function removeReference(settings,projectId,kind,objectId,revision,referenceId){
120
121
  // Keep immutable snapshot resources. A later explicit object cleanup owns deletion.
@@ -150,12 +151,17 @@ export async function deriveObject(settings,projectId,kind,objectId,revision){
150
151
  assertIdle(objectRuns(settings,source));
151
152
  if(source.revision!==revision)throw new Error('对象版本冲突');
152
153
  verifyReferences(settings.paths.workspace,source);
153
- const finalRules=kind==='style'&&source.status==='frozen'&&source.report?.data?.schemaVersion===STYLE_SCHEMA_VERSION?resolvedRecommendation(source.report.data).rules:null;
154
- const config=kind==='style'?{description:finalRules?finalRules.map(r=>`${r.strength==='required'?'必须':r.strength==='avoid'?'避免':'默认'}${r.when?'('+r.when+')':''}:${r.instruction}`).join('\n'):source.config.description??source.report?.data?.summary??'',constraints:finalRules?[]:source.config.constraints??[],...(source.config.analysis?{analysis:source.config.analysis}:{})}:source.config;
154
+ const frozenCore=kind==='style'&&source.status==='frozen'&&source.report?.data?.schemaVersion===STYLE_SCHEMA_VERSION?(await import('./core.mjs')).loadCore(projectId,objectId,settings.paths.workspace):null;
155
+ const finalRules=frozenCore?.config.rules??null;
156
+ const config=kind==='style'?{description:finalRules?source.report.data.summary:source.config.description??source.report?.data?.summary??'',constraints:finalRules?[]:source.config.constraints??[],...(finalRules?{rules:structuredClone(finalRules)}:source.config.rules?{rules:structuredClone(source.config.rules)}:{}),...(source.config.analysis?{analysis:source.config.analysis}:{})}:source.config;
155
157
  const derived=await createObject(settings,projectId,kind,{name:source.name+' · 派生',config,source:{id:source.id,revision:source.revision}});
156
158
  try{
157
159
  const directory=objectDirectory(settings.paths.workspace,projectId,kind,derived.id);
158
160
  for(const ref of source.references){const old=ownedPath(objectDirectory(settings.paths.workspace,projectId,kind,source.id),ref.path),target=ownedPath(directory,ref.path);mkdirSync(dirname(target),{recursive:true});cpSync(old,target,{errorOnExist:true,force:false});derived.references.push({...ref});}
161
+ if(finalRules){
162
+ const data={...structuredClone(source.report.data),id:derived.id,recommendation:{rules:structuredClone(finalRules)},issues:[],decisions:[],provenance:{method:'inherited-frozen',source:{id:source.id,revision:source.revision,coreHash:source.coreHash},sourceReportHash:hash(source.report.data),evidence:source.report.data.provenance??null}};
163
+ derived.report={data,sourceRevision:derived.revision,sourceHash:hash({config:derived.config,references:derived.references}),evidenceHash:styleEvidenceHash(derived),path:null,runId:null};
164
+ }
159
165
  writeJson(objectFile(settings.paths.workspace,projectId,kind,derived.id),derived);return derived;
160
166
  }catch(error){derived.status='cleanup-required';derived.error=error.message;writeJson(objectFile(settings.paths.workspace,projectId,kind,derived.id),derived);throw error;}
161
167
  });
@@ -164,10 +170,15 @@ export async function discardObject(settings,projectId,kind,objectId,revision){
164
170
  const directory=objectDirectory(settings.paths.workspace,projectId,kind,objectId);
165
171
  return mutateObject(settings,projectId,kind,objectId,revision,record=>{
166
172
  if(record.status==='frozen')throw new Error('正式风格不能作为草稿放弃');
167
- // Executed artifacts are immutable evidence and are not draft trash.
168
- if(kind==='task'&&objectRuns(settings,record).some(run=>run.plan))throw new Error('对象已有执行记录,不能作为草稿放弃');
173
+ // Task archival removes its active identity, preserving immutable history
174
+ // and files that other task plans or private edit sources may reference.
175
+ if(kind==='task'){
176
+ if(record.status==='discarded')return record;
177
+ record.status='discarded';record.deletedAt=now();
178
+ return record;
179
+ }
169
180
  if(record.status==='discarded'&&record.cleanup?.status==='completed')return record;
170
- record.status='discarded';if(kind==='task')record.report=null;record.references=[];record.cleanup={status:'pending'};
181
+ record.status='discarded';record.references=[];record.cleanup={status:'pending'};
171
182
  // Mark and advance the revision before cleanup. Failed or interrupted deletion
172
183
  // stays explicit and can be retried without reviving the draft.
173
184
  writeJson(objectFile(settings.paths.workspace,projectId,kind,objectId),{...record,revision:record.revision+1,updatedAt:now()});
@@ -176,6 +187,15 @@ export async function discardObject(settings,projectId,kind,objectId,revision){
176
187
  return record;
177
188
  },{allowFrozen:true});
178
189
  }
190
+ export async function restoreTask(settings,projectId,objectId,revision){
191
+ return mutateObject(settings,projectId,'task',objectId,revision,record=>{
192
+ if(record.status==='draft')return record;
193
+ if(record.status!=='discarded')throw new Error('只有已归档任务可以恢复');
194
+ record.status='draft';delete record.deletedAt;
195
+ record.restoredAt=now();
196
+ return record;
197
+ },{allowFrozen:true});
198
+ }
179
199
  export function assertPlanCurrent(plan,settings){
180
200
  const current=readObject(settings.paths.workspace,plan.project,'task',plan.job);
181
201
  if(current.status==='discarded'||current.revision!==plan.sources.taskRevision||hash(current.config)!==plan.sources.taskConfigHash)throw new Error('计划来源已变化,请重新编译');
@@ -188,6 +208,7 @@ export function assertPlanCurrent(plan,settings){
188
208
  }
189
209
  export function taskDisplayState(record,runs,finalizations=[]){
190
210
  const own=runs.filter(r=>(r.plan?.project??r.project)===record.project&&(r.plan?.job===record.id||r.objectKind==='task'&&r.objectId===record.id));
211
+ if(own.some(run=>run.status==='unknown'))return {status:'待恢复',issue:'执行连接中断,需核对原批次'};
191
212
  if(own.some(run=>!executionSettled(run)))return {status:'执行中',issue:own.some(r=>r.status==='unknown'||r.unsettled)?'停止未确认':null};
192
213
  const items=record.config.items??[],selected=new Set(finalizations.filter(f=>f.taskConfigHash===hash(record.config)).map(f=>f.assetId));
193
214
  if(items.length&&items.every(i=>selected.has(i.id)))return {status:'已定版',issue:null};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevlns/art-workshop",
3
- "version": "0.3.11",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "description": "管理项目风格、参考图、图片生成、编辑和定版。支持本地 ComfyUI 与远程图片模型。",
6
6
  "type": "module",
@@ -9,6 +9,7 @@
9
9
  "分类决定观察焦点,不按图片主体或文件名推断;风格参考不配置任务用途。",
10
10
  "区分观察、建议和未确定项,不从参考图片中的内容生成全局主题或题材白名单。",
11
11
  "规则精炼且一致,模型、凭据、参数和运行状态不进入风格核心。",
12
+ "风格负向只排除可跨主体复用的抽象绘制语言,不冻结具体内容黑名单;明确 negative 表达不加否定前缀,条件与例外写入 when,条件规则不展开为全局禁止。",
12
13
  "冻结可追溯,核心不可原地覆写;旧职责版本必须重新分析和明确采用。"
13
14
  ],
14
15
  "ownership": {
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: art-workshop
3
- description: 美术工坊风格、任务、参考、预演、执行与定版管理。
3
+ description: "管理项目风格、参考图、图片生成、编辑和定版。支持本地 ComfyUI 与远程图片模型。"
4
4
  ---
5
5
 
6
+ 随包规范通过 `v-cli agent docs art` 读取;使用说明与数据契约通过 `v-cli art agent docs` 读取。
7
+
6
8
  # Vant 美术工坊 Agent 规范
7
9
 
8
10
  ## 定位
@@ -25,30 +27,48 @@ art-workshop agent index
25
27
 
26
28
  ### 对象与参考
27
29
 
30
+ 任务参考只提取 purposes 指定且未被 ignore 排除的特征。用途范围外、用户已明确覆盖的背景和绘制差异不构成阻塞;conflicts 仅列范围内不可调和要求,uncertainties 仅列影响执行的关键缺失,两者为非空字符串数组,无问题用 []。不得删除用户参考或清空报告来绕过分析;应明确参考范围后重新分析,真正的未决取舍再交用户决定。
31
+
28
32
  工程对象使用 schemaVersion 2;读写前核实工程配置和当前 revision。
29
- 风格和任务都有稳定 id 与 revision。UI、聊天和 CLI 共用对象;写入、派生与清理提交预期 revision,冲突重新读取。正式风格只读,改动创建派生风格;派生不继承报告、核心、批次、授权与对话。
33
+ 风格和任务都有稳定 id 与 revision。UI、聊天和 CLI 共用对象;写入、派生与清理提交预期 revision,冲突重新读取。正式风格只读,改动创建派生风格;派生不继承核心、批次、授权与对话。当前版本冻结风格派生时保留结构化规则和独立参考,报告明确标记沿用原冻结证据;不伪造新的分析。
30
34
  风格静态参考只有 style、palette、rendering,只分析媒介、描绘、明暗、描边、笔触和色彩关系。具体造型、比例、结构、部件、身份色、材质与光源属于任务。任务动态参考只有 subject、composition、pose、identity-color、surface、scene-light、text;编辑底图另列。导入复制原图,不修改用户文件。未适配直接参考时拒绝,不隐式上传风格图片。
31
35
 
32
36
  ### 风格生命周期
33
37
 
34
- style create/read/update/derive/discard 管理草稿。style analyze --dry 只读编译,不联网、启动服务或创建参考目录。实际 analyze 创建 taskId 与独立参考证据;task status/wait/cancel 控制执行,recover 查原登记,resume 仅恢复远程查询与取回。
38
+ 草稿可含 rules,每条为 id/scope/strength/instruction/when,avoid 可另填 negative 字符串数组。按媒介、描边、明暗、高光、笔触、刻画、配色整理,主题不必填满。required 必须遵守、default 默认倾向、avoid 必须避免;“默认少用”使用 default,不升级为禁止。条件保留在 when。风格负向只表达跨主体复用的抽象绘制语言,不排除具体主体、部件、身份色、物体纹理、材质或资产规格。negative 直接描述被排除的视觉特征,不加否定前缀;instruction 为同一规则的阅读说明,条件和例外写入 when。无条件且明确填写的 negative 编译为独立负向表达,条件规则连同排除表达保留在正向条件段;未填写 negative 的文字约束保留原文,不机械转换。支持负向参数的模型直接传递,不支持时由适配器并入排除段,不丢弃、不截断。
39
+ 已有证据的规则编辑可用 style revise --project ID --id STYLE --revision N --input FILE,输入 {rules,summary,note};这是用户修订方案,沿用未改变的参考,记录原报告和用户依据,不调用模型、不自动采用。参考或分析配置变化、未决问题、旧职责版本仍需对应处理。用户明确授权后 adopt 冻结新身份,旧核心与历史任务快照保留。
40
+
41
+ style create/read/update/derive/discard 管理草稿。style analyze --dry 只读编译,不联网、启动服务或创建参考目录。实际 analyze 创建 taskId 与独立参考证据;task status/wait/cancel 控制执行,recover 查原登记,resume 仅按已记录的上游身份恢复查询与取回,不重新提交。
35
42
  报告绑定源配置、参考与模型。更新配置保留报告并标记需复核,旧证据不变。报告 recommendation.rules 是精炼独立成稿,规则含主题、强度和适用条件,不包含迭代描述。issues 仅列需用户取舍的矛盾,notes 保留不阻塞采用的证据局限。style resolve --input {issueId,optionId,note} 记录明确选择并修订有效方案,不重新分析;以 style read 的 review.ready 判断采用条件。复核沿用证据与决定,新证据才重新打开问题。style adopt 校验来源匹配和所有问题已决定,用户采用后冻结。采用中断通过 style recover 完成已授权事务,不能重新冻结另一份核心。
36
43
  退出风格配置先继续编辑、保存草稿或放弃;分析停止未确认时不能清理。
37
44
 
38
45
  ### 计划与执行
39
46
 
47
+ 动态需求自由文本不设字数上限:意图、外观、颜色、动作、效果与关系、场景说明、编辑指令和可读特征均完整保存与编译,不为通过校验删减或截断。必填项仍检查非空、类型和占位符;标识符、模型名称、采样器等结构字段保留各自契约。
48
+
49
+ 风格与任务用 config.analysis{provider,model} 保存独立视觉分析实例;任务另用 config.generation{backend,remote?,options?} 保存生成后端,remote 为 {provider,model}。本地采样参数通过任务 generation.options 保存:steps 为 1~10000 整数,cfg 为 0~100 数值,sampler/scheduler 为 ComfyUI 支持的名称。新任务的本地推荐值为 steps=25、cfg=3、sampler=euler、scheduler=simple;内置工作流采用同一默认值,确保普通 CFG 负向分支参与引导。显式配置(含 cfg=0/1)保留,旧批次不改写。省略沿用后端或工作流默认值,远程后端不接受这些参数。使用 job update(v-cli art.job-update)更新任务后重新 plan,核对 backend.options 和 dry 请求的采样节点;不要通过独立 CLI config.json 或宿主管理的工程 settings.json 调整当前任务。聊天模型不改写执行选择。CLI plan 优先使用显式 --backend,其次任务 backend,再按独立工具的本地配置选择;任务绑定后端时使用其真实模型,不能被旧 execution.model 覆盖。宿主按实例注入凭据,不在对象或预案写入密钥;修改选择使原方案失效。
50
+
40
51
  先读取实际 job,再 generate/edit plan 和 run --plan --dry,展示有效核心、设计尺寸、预留缩放、请求与实际像素、模型后端、候选数量和编辑底图。后端尺寸由工具统一解析,超限或未对齐选最近合法尺寸,保留设计基准并明确实际值;不承诺显存或自动缩放导出。
41
52
  授权覆盖方案后使用 run --background;前台同样创建执行身份。配置、核心、规格、参考、底图和后端变化拒绝失效方案,重新编译。重启查 taskId,不重复提交。不自动换模型或重跑成功项。
42
- 每个任务只能有一个未停止确认的执行;编辑、派生、删除与运行共用状态检查。切页面不取消。
53
+ 每个任务只能有一个未停止确认的执行;编辑、派生、归档、恢复与运行共用状态检查。切页面不取消。
54
+ job discard 归档已停止的任务,草稿、待定版和已定版均可归档。按 revision 将任务标记为 discarded(归档存储状态),保留配置、参考、私有底图、运行、输出、收藏和定版历史;活跃列表、收藏及作品暂不显示。job restore 按同一身份和当前 revision 恢复到活跃列表,收藏与作品重新显示,不重新生成。归档与恢复均检查停止确认和版本,重复操作幂等;恢复后原方案需按当前版本重新编译。风格 discard 仍为草稿放弃,不参与任务归档。
43
55
 
44
56
  ### 取消、异常和关闭
45
57
 
58
+ 本地 ComfyUI 按资产及采样序号持久化 prompt ID。工作进程丢失后使用 task resume 或 Vant 原批次恢复入口,沿用原身份查询与取回,不重新上传或提交生图;未提交项不补发。Windows 心跳写入暂时失败记录诊断并重试,不能导致定时器异常退出;关键状态写入仍严格校验。
59
+
46
60
  任务状态与停止证据分开。queued/running/cancelling 仍占用资源;unknown 或 stopConfirmed=false 保留资源。failed/cancelled 也不能单凭状态释放资源;dispatching/accepted 远程回执尚未结清时继续占用。工作进程丢失标记 unknown,不推测停止。
47
61
  task cancel 只取消指定运行,保留服务。生成任务远程取消只停止本地客户端,上游停止未知如实报告,不允许清理。只读分析有 finishedAt、已知终态且工作进程已退出,无生成计划与回执时释放本地占用;云端计算与计费停止未知独立保留,不自动重发。没有完成证据的进程丢失仍保持 unknown。shutdown 阻止提交、停止关联任务、核验共享队列和进程身份后关闭本地服务,不清空共享队列;有其他任务或停止未确认时保留服务。不得广泛杀所有 Python。
48
62
 
49
63
  ### 生成与定版
50
64
 
65
+ 透明背景使用 `{type:"transparent"}`:生成任务设置 composition.background,编辑任务设置 changes 中 background 的 value。预案记录 PNG 输出处理版本并参与哈希;含完全透明区域的原生 alpha 保留,接近不透明的 alpha 噪声不视为透明背景。否则从边缘核实约定洋红底色,容许模型色偏,仅处理与外边界连通的底色及混合边缘。原图保留,候选使用处理后的 PNG;缺少合格背景或可见主体则报错,不伪称透明成功。纯色去背景可能影响与外部底色连通的同色细节,不能承诺任意半透明材质的抠图质量。
66
+
67
+ 编辑 target 是范围名称,允许 outline 等具体范围;同一范围可修改局部并保留其他特征,不能仅按标签重叠判矛盾。配置和预案仍校验字段、引用、版本及核心风格归属。
68
+
51
69
  只有生成与定版两个产品阶段。check 验证计划、执行身份、文件哈希和完成事实;不要求人工 content/style/asset 评分。candidate finalize 按资产选定候选,重复操作幂等;替换已有定版需要明确 replace,保留历史。
70
+ 候选 editable 与 accepted 分开:已停止批次中保留的有效图片可作为编辑底图,输出处理失败不阻止继续编辑;已记录的哈希不匹配、文件缺失或已删除则拒绝。job from-candidate 验证图片可解码后复制为独立编辑草稿的私有底图并记录来源,不改变原批次失败事实,也不授权定版或启动生成。
71
+ candidate favorite 使用 --value true/false 收藏或取消收藏,candidate favorites 查看工程收藏。收藏记录独立保存在工程 favorites.json,绑定源任务、批次和图片身份,不修改需求版本、执行或定版状态;可收藏有效的失败保留图。列表隐藏已删除、丢失或所属任务已归档的图片,源任务改名即时反映。
52
72
  candidate delete 先确认影响,拒绝运行中或被计划/底图引用的候选;先记删除事实,清理所属文件,并取消关联定版。定版不自动导入游戏或提交 Git。
53
73
 
54
74
  ### 验证和技能
@@ -85,7 +105,7 @@ candidate delete 先确认影响,拒绝运行中或被计划/底图引用的
85
105
 
86
106
  ## 参考资料
87
107
 
88
- 通过 `art-workshop --help` 和 `art-workshop agent docs` 查阅使用规范。 · v-cli.plugin.json
108
+ 使用说明 · 文档规范 · v-cli.plugin.json
89
109
 
90
110
  ## 许可与版权
91
111
 
package/v-cli.plugin.json CHANGED
@@ -1128,13 +1128,51 @@
1128
1128
  "查询不写入;修改验证 revision、归属和停止确认;冻结风格只读"
1129
1129
  ]
1130
1130
  },
1131
+ {
1132
+ "path": [
1133
+ "style",
1134
+ "revise"
1135
+ ],
1136
+ "usage": "art-workshop style revise",
1137
+ "description": "按用户要求修订完整规则方案;input 为 {rules,summary,note},沿用未变化的参考证据,不调用模型或自动冻结",
1138
+ "arguments": [],
1139
+ "options": [
1140
+ {
1141
+ "flags": "--project <id>",
1142
+ "description": "工程身份"
1143
+ },
1144
+ {
1145
+ "flags": "--id <id>",
1146
+ "description": "对象身份"
1147
+ },
1148
+ {
1149
+ "flags": "--revision <number>",
1150
+ "description": "预期对象版本"
1151
+ },
1152
+ {
1153
+ "flags": "--input <file>",
1154
+ "description": "JSON {rules,summary,note};rules 为完整规则数组,每条 id/scope/strength/instruction/when,avoid 可含 negative 抽象排除表达数组"
1155
+ }
1156
+ ],
1157
+ "output": {
1158
+ "format": "json",
1159
+ "description": "校验预期版本及空闲状态后更新对象"
1160
+ },
1161
+ "exitCodes": {
1162
+ "0": "成功",
1163
+ "1": "校验、版本冲突或执行失败"
1164
+ },
1165
+ "safety": [
1166
+ "查询不写入;修改验证 revision、归属和停止确认;冻结风格只读"
1167
+ ]
1168
+ },
1131
1169
  {
1132
1170
  "path": [
1133
1171
  "style",
1134
1172
  "derive"
1135
1173
  ],
1136
1174
  "usage": "art-workshop style derive",
1137
- "description": "派生独立草稿,不继承执行、报告或定版",
1175
+ "description": "派生独立草稿,保留结构化规则与独立参考;当前冻结证据标记沿用,不继承核心、执行或授权",
1138
1176
  "arguments": [],
1139
1177
  "options": [
1140
1178
  {
@@ -1360,7 +1398,7 @@
1360
1398
  "discard"
1361
1399
  ],
1362
1400
  "usage": "art-workshop job discard",
1363
- "description": "确认空闲后丢弃草稿并清理所属资源",
1401
+ "description": "归档已停止的任务,保留配置、参考、收藏、图片与执行历史;可恢复到活跃列表",
1364
1402
  "arguments": [],
1365
1403
  "options": [
1366
1404
  {
@@ -1378,14 +1416,48 @@
1378
1416
  ],
1379
1417
  "output": {
1380
1418
  "format": "json",
1381
- "description": "确认空闲后丢弃草稿并清理所属资源"
1419
+ "description": "归档已停止的任务,保留配置、参考、收藏、图片与执行历史;可恢复到活跃列表"
1382
1420
  },
1383
1421
  "exitCodes": {
1384
1422
  "0": "成功",
1385
1423
  "1": "校验、版本冲突或执行失败"
1386
1424
  },
1387
1425
  "safety": [
1388
- "查询不写入;修改验证 revision、归属和停止确认;冻结风格只读"
1426
+ "验证 revision、任务归属和停止确认;归档和恢复均保留原配置、收藏与所有历史文件,不自动执行"
1427
+ ]
1428
+ },
1429
+ {
1430
+ "path": [
1431
+ "job",
1432
+ "restore"
1433
+ ],
1434
+ "usage": "art-workshop job restore",
1435
+ "description": "恢复已归档任务到活跃列表,保留原身份、配置与历史;不重新执行",
1436
+ "arguments": [],
1437
+ "options": [
1438
+ {
1439
+ "flags": "--project <id>",
1440
+ "description": "工程身份"
1441
+ },
1442
+ {
1443
+ "flags": "--id <id>",
1444
+ "description": "对象身份"
1445
+ },
1446
+ {
1447
+ "flags": "--revision <number>",
1448
+ "description": "预期对象版本"
1449
+ }
1450
+ ],
1451
+ "output": {
1452
+ "format": "json",
1453
+ "description": "恢复已归档任务到活跃列表,保留原身份、配置与历史;不重新执行"
1454
+ },
1455
+ "exitCodes": {
1456
+ "0": "成功",
1457
+ "1": "校验、版本冲突或执行失败"
1458
+ },
1459
+ "safety": [
1460
+ "验证 revision、任务归属和停止确认;归档和恢复均保留原配置、收藏与所有历史文件,不自动执行"
1389
1461
  ]
1390
1462
  },
1391
1463
  {
@@ -1688,6 +1760,74 @@
1688
1760
  "只读;校验批次计划和候选身份"
1689
1761
  ]
1690
1762
  },
1763
+ {
1764
+ "path": [
1765
+ "candidate",
1766
+ "favorites"
1767
+ ],
1768
+ "usage": "art-workshop candidate favorites --project <id>",
1769
+ "description": "网格收藏夹的数据来源,列出工程中仍可用的收藏图片及源任务身份",
1770
+ "arguments": [],
1771
+ "options": [
1772
+ {
1773
+ "flags": "--project <id>",
1774
+ "description": "工程身份"
1775
+ }
1776
+ ],
1777
+ "output": {
1778
+ "format": "json",
1779
+ "description": "收藏图片、源任务名称、资产及批次身份"
1780
+ },
1781
+ "exitCodes": {
1782
+ "0": "成功",
1783
+ "1": "校验或读取失败"
1784
+ },
1785
+ "safety": [
1786
+ "只读;忽略已删除的图片和已归档的任务"
1787
+ ]
1788
+ },
1789
+ {
1790
+ "path": [
1791
+ "candidate",
1792
+ "favorite"
1793
+ ],
1794
+ "usage": "art-workshop candidate favorite --project <id> --job <id> --run <id> --candidate <id> --value <true|false>",
1795
+ "description": "设置图片收藏状态,不修改任务需求、版本、定版或运行状态",
1796
+ "arguments": [],
1797
+ "options": [
1798
+ {
1799
+ "flags": "--project <id>",
1800
+ "description": "工程身份"
1801
+ },
1802
+ {
1803
+ "flags": "--job <id>",
1804
+ "description": "源任务身份"
1805
+ },
1806
+ {
1807
+ "flags": "--run <id>",
1808
+ "description": "源批次身份"
1809
+ },
1810
+ {
1811
+ "flags": "--candidate <id>",
1812
+ "description": "图片候选身份"
1813
+ },
1814
+ {
1815
+ "flags": "--value <true|false>",
1816
+ "description": "true 收藏,false 取消收藏"
1817
+ }
1818
+ ],
1819
+ "output": {
1820
+ "format": "json",
1821
+ "description": "更新后的工程收藏列表"
1822
+ },
1823
+ "exitCodes": {
1824
+ "0": "成功",
1825
+ "1": "校验或写入失败"
1826
+ },
1827
+ "safety": [
1828
+ "仅修改工程收藏记录;重复操作幂等,不启动分析或生成"
1829
+ ]
1830
+ },
1691
1831
  {
1692
1832
  "path": [
1693
1833
  "candidate",
@@ -1982,7 +2122,7 @@
1982
2122
  "from-candidate"
1983
2123
  ],
1984
2124
  "usage": "v-cli art job from-candidate --project <id> --id <task> --run <id> --candidate <id>",
1985
- "description": "将完整候选导入私有底图,创建独立编辑草稿,不运行",
2125
+ "description": "将已停止批次中的可用图片导入私有底图,创建独立编辑草稿,不要求定版通过、不运行",
1986
2126
  "arguments": [],
1987
2127
  "options": [
1988
2128
  {
@@ -1999,12 +2139,12 @@
1999
2139
  },
2000
2140
  {
2001
2141
  "flags": "--candidate <id>",
2002
- "description": "完整候选身份"
2142
+ "description": "可用图片的候选身份"
2003
2143
  }
2004
2144
  ],
2005
2145
  "output": {
2006
2146
  "format": "json",
2007
- "description": "将完整候选导入私有底图,创建独立编辑草稿,不运行"
2147
+ "description": "将已停止批次中的可用图片导入私有底图,创建独立编辑草稿,不要求定版通过、不运行"
2008
2148
  },
2009
2149
  "exitCodes": {
2010
2150
  "0": "成功",
@@ -2090,6 +2230,40 @@
2090
2230
  "1": "验收或执行失败"
2091
2231
  }
2092
2232
  },
2233
+ {
2234
+ "path": [
2235
+ "environment",
2236
+ "prepare"
2237
+ ],
2238
+ "description": "自动准备兼容 Python 运行时,保留已有环境",
2239
+ "usage": "art-workshop environment prepare",
2240
+ "arguments": [],
2241
+ "options": [
2242
+ {
2243
+ "flags": "--directory <value>",
2244
+ "description": "本机环境根目录"
2245
+ },
2246
+ {
2247
+ "flags": "--endpoint <value>",
2248
+ "description": "本机 HTTP 服务根地址"
2249
+ },
2250
+ {
2251
+ "flags": "--guide <id>",
2252
+ "description": "部署指南标识;省略使用环境登记或推荐方案"
2253
+ }
2254
+ ],
2255
+ "output": {
2256
+ "format": "json",
2257
+ "description": "环境事实与验收结果"
2258
+ },
2259
+ "safety": [
2260
+ "仅在目标目录创建运行时;复用兼容 Python,不兼容虚拟环境先改名保留,不修改全局 Python"
2261
+ ],
2262
+ "exitCodes": {
2263
+ "0": "成功",
2264
+ "1": "验收或执行失败"
2265
+ }
2266
+ },
2093
2267
  {
2094
2268
  "path": [
2095
2269
  "environment",
@@ -75,7 +75,7 @@
75
75
  ],
76
76
  "seed": 123456,
77
77
  "steps": 25,
78
- "cfg": 1,
78
+ "cfg": 3,
79
79
  "sampler_name": "euler",
80
80
  "scheduler": "simple",
81
81
  "denoise": 1
@@ -455,7 +455,7 @@
455
455
  123456,
456
456
  "fixed",
457
457
  25,
458
- 1,
458
+ 3,
459
459
  "euler",
460
460
  "simple",
461
461
  1
@@ -464,7 +464,7 @@
464
464
  "seed": 123456,
465
465
  "control_after_generate": "fixed",
466
466
  "steps": 25,
467
- "cfg": 1,
467
+ "cfg": 3,
468
468
  "sampler_name": "euler",
469
469
  "scheduler": "simple",
470
470
  "denoise": 1