@petercjl/cloud-hug-style-transfer 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,13 +2,17 @@
2
2
 
3
3
  将旧详情页、产品摄影、主 KV 或 SKU 转换为抱抱云朵社品牌视觉,保留当次商品事实、文案与用途。包内包含完整 19 页定稿、品牌标识、人物设定与摄影排版方法,约 41 MB 素材。
4
4
 
5
- 支持 Codex、SealSeek、WorkBuddy 的技能目录安装。Node.js 22+ 为安装与管理前提;实际生图还需要宿主支持看图、多参考图编辑及结果交付。包不附带生成额度或服务账号。SealSeek 与 WorkBuddy 的生图适配依据当前宿主合同实现,尚待实际任务验证。WorkBuddy 需要内置 Miora 图片场景及相应能力 Skill;SealSeek 需要当前会话提供参考图生成和上传能力。
5
+ 支持 Codex、SealSeek、WorkBuddy。需要 Node.js 22+、宿主命令执行和看图能力。生图统一通过必需的 `@petercjl/sealseek-media-cli`(0.6.1+)及其配套 `sealseek-media` Skill 执行;每次任务先检查,缺失或不兼容时暂停整个任务,安装并复查通过后继续。有效 SealSeek 登录、网络及额度由使用者准备,包不附带账号或额度。宿主生图效果仍需分别实测。
6
+
7
+ 先安装生图依赖,将提示词发送给 Agent:
8
+
9
+ > 请安装 npm 包 @petercjl/sealseek-media-cli。
6
10
 
7
11
  安装:将下列提示词发送给目标 Agent。
8
12
 
9
13
  > 请安装 npm 包 @petercjl/cloud-hug-style-transfer。
10
14
 
11
- 使用:附上待转换图片;关键商品结构不清楚时补充实拍。
15
+ 使用:附上待转换图片;关键商品结构不清楚时补充实拍。开始生图前会新建按图片主题与任务自动命名的无限画板。每完成一张就插入一组对照:左边原图、右边成图,后续组向下排列,保留紧凑间距;交付包含画板链接。仅规划时不创建画板。
12
16
 
13
17
  > 用抱抱云朵社风格转换处理所附图片。
14
18
 
@@ -27,3 +31,5 @@
27
31
  安装、更新与检查由 Agent 执行包内 CLI。包的 `skill source --json` 提供规范来源;Agent 随后调用 `skill install --agent <当前宿主>`,支持 `--root` 指定实际技能目录。普通任务不联网检查或自动更新。显式更新使用 stable latest,备份旧包并同步已登记的受管 Skill,失败时恢复旧包;离线保留当前安装。已有独立安装或本地修改将停止覆盖并报告。源码或上层工具管理的包由其拥有者更新。
28
32
 
29
33
  兼容证据分别记录安装机制与生图效果。CI 覆盖 macOS、Windows、Linux 的包管理机制;宿主实际生成需使用各自账户独立验证。品牌与输入素材须具备相应使用权;公开 npm 分发不转让商标与素材的独立再分发权。
34
+
35
+ 开发者依赖合同:`doctor --json` 验证媒体包身份、0.6.1+ 版本、CLI 与规范 Skill,缺失返回非零退出码和 `DEPENDENCY_MISSING`,生成状态为 `paused`。优先发现当前 npm 安装树,再发现 PATH 的 npm 安装;自定义 Agent/套件安装可配置 `CLOUD_HUG_MEDIA_ROOT` 为媒体包根目录。使用返回的 `dependencies.media.invocation` 调用 CLI;doctor 不登录、不联网检查服务、不自动安装或提交生成。任务执行仍须加载依赖的当前 Skill 并完成 live 检查与 dry-run。
package/capabilities.json CHANGED
@@ -16,26 +16,35 @@
16
16
  "skill install",
17
17
  "skill update",
18
18
  "update check",
19
- "update install"
19
+ "update install",
20
+ "canvas row"
20
21
  ],
21
22
  "requirements": {
22
23
  "node": ">=22",
23
- "nested_skills": [],
24
- "generation": "Host-provided multi-reference image editing and inspection; credentials remain external.",
24
+ "nested_skills": [
25
+ "sealseek-media"
26
+ ],
27
+ "generation": "Required @petercjl/sealseek-media-cli >=0.6.1 and its canonical sealseek-media Skill; missing or incompatible dependency pauses all tasks before analysis or planning.",
25
28
  "host_capability_skills": {
26
29
  "codex": [],
27
- "sealseek": [
28
- "AIGC-生图 when advertised by host as its media entry"
29
- ],
30
- "workbuddy": [
31
- "miora-creative-core",
32
- "miora-image-generation"
33
- ]
34
- }
30
+ "sealseek": [],
31
+ "workbuddy": []
32
+ },
33
+ "packages": [
34
+ {
35
+ "name": "@petercjl/sealseek-media-cli",
36
+ "minimum_version": "0.6.1",
37
+ "required": true,
38
+ "missing": "pause",
39
+ "skill": "sealseek-media",
40
+ "source": "CLI skill source --json",
41
+ "contract": "media.generate with image/reference-image/dry-run/task-record/local-artifact; canvas_contract@1 create/image upload/media inspect/explicit batch/verified readback"
42
+ }
43
+ ]
35
44
  },
36
45
  "authorization": {
37
46
  "installation": "Explicit install/update request; preserve existing targets.",
38
- "generation": "Current task scope and host provider policy."
47
+ "generation": "User-authorized generation via sealseek-media-cli only; credits and credentials remain external."
39
48
  },
40
49
  "compatibility": {
41
50
  "codex": {
@@ -50,5 +59,16 @@
50
59
  "installation": "implemented",
51
60
  "generation": "implemented-not-runtime-tested"
52
61
  }
62
+ },
63
+ "canvas": {
64
+ "creation": "new-per-generation-request-before-first-submit",
65
+ "title": "application-inferred-from-current-images-and-intent",
66
+ "layout": "source-left-result-right; rows-top-to-bottom",
67
+ "column_width": 480,
68
+ "horizontal_gap": 24,
69
+ "vertical_gap": 32,
70
+ "archive": "none during generation; explicit pair batch after each success",
71
+ "planner": "canvas row --input JSON_FILE --json",
72
+ "recovery": "same canvas/task/row IDs; inspect before replay"
53
73
  }
54
74
  }
@@ -0,0 +1,30 @@
1
+ import { fail } from './runtime.mjs';
2
+
3
+ // Application layout only: service calls, uploads and verified writes belong
4
+ // to sealseek-media-cli. The original fits the result's row without cropping.
5
+ export function comparisonRow(input) {
6
+ if(!input || typeof input!=='object' || Array.isArray(input)) throw fail('INVALID_INPUT','Expected a comparison row object.');
7
+ const {run_id,row_index,top=0,source,result}=input;
8
+ if(typeof run_id!=='string'||!/^[a-zA-Z0-9_-]{1,80}$/.test(run_id)) throw fail('INVALID_INPUT','run_id must be a stable 1-80 character ASCII operation key.');
9
+ if(!Number.isSafeInteger(row_index)||row_index<1||row_index>10000||!Number.isFinite(top)||top<0||top>1e9) throw fail('INVALID_INPUT','Invalid row index or top coordinate.');
10
+ for(const asset of [source,result]) {
11
+ if(!asset||![asset.width,asset.height].every(v=>Number.isSafeInteger(v)&&v>0)) throw fail('INVALID_INPUT','Both assets need measured positive integer dimensions.');
12
+ let url;try{url=new URL(asset.url);}catch{throw fail('INVALID_INPUT','Both assets need uploaded HTTP(S) URLs.');}
13
+ if(!['https:','http:'].includes(url.protocol)||url.username||url.password) throw fail('INVALID_INPUT','Asset URLs must use HTTP(S) without embedded credentials.');
14
+ }
15
+ const width=480,horizontalGap=24,verticalGap=32;
16
+ const height=width*result.height/result.width;
17
+ const scale=Math.min(width/source.width,height/source.height);
18
+ const sourceWidth=source.width*scale,sourceHeight=source.height*scale;
19
+ if(![height,sourceWidth,sourceHeight].every(n=>Number.isFinite(n)&&n>0&&n<=100000)||top+height+verticalGap>1e9) throw fail('LAYOUT_UNSUPPORTED','Image geometry exceeds the canvas contract.');
20
+ const rects=[{x:(width-sourceWidth)/2,y:top,width:sourceWidth,height:sourceHeight},{x:width+horizontalGap,y:top,width,height}];
21
+ const media=[source,result].map((asset,index)=>({
22
+ id:`${run_id}-row-${row_index}-${index===0?'source':'result'}`,kind:'image',urls:[asset.url],
23
+ placement:{mode:'explicit',positions:[rects[index]]}
24
+ }));
25
+ if(result.generationParams!==undefined) {
26
+ if(!result.generationParams||typeof result.generationParams!=='object'||Array.isArray(result.generationParams)) throw fail('INVALID_INPUT','generationParams must be an object accepted by the media CLI.');
27
+ media[1].generationParams=result.generationParams;
28
+ }
29
+ return {ok:true,row_index,top,next_top:top+height+verticalGap,layout:{column_width:width,horizontal_gap:horizontalGap,vertical_gap:verticalGap},batch:{frames:[],media}};
30
+ }
package/npm/cli.mjs CHANGED
@@ -4,12 +4,18 @@ import path from 'node:path';
4
4
  import { root, pkg, fail } from './runtime.mjs';
5
5
  import { source, targetPath, status, install, inventory } from './skills.mjs';
6
6
  import { checkUpdate, installUpdate } from './update.mjs';
7
+ import { mediaDependency } from './media-dependency.mjs';
8
+ import { comparisonRow } from './canvas-layout.mjs';
7
9
  const args=process.argv.slice(2);
8
10
  const option=name=>{const i=args.indexOf(name);if(i<0)return undefined;if(!args[i+1]||args[i+1].startsWith('--'))throw fail('INVALID_ARGUMENT',`${name} needs a value.`);return args[i+1];};
9
11
  const out=value=>console.log(JSON.stringify(value,null,2));
10
12
  try {
11
13
  if(args[0]==='version'||args[0]==='--version') out({ok:true,name:pkg.name,version:pkg.version});
12
14
  else if(args[0]==='capabilities') out({...JSON.parse(fs.readFileSync(path.join(root,'capabilities.json'),'utf8')),version:pkg.version});
15
+ else if(args[0]==='canvas'&&args[1]==='row') {
16
+ const input=option('--input');if(!input)throw fail('INVALID_ARGUMENT','canvas row requires --input JSON_FILE.');
17
+ out(comparisonRow(JSON.parse(fs.readFileSync(input,'utf8'))));
18
+ }
13
19
  else if(args[0]==='skill') {
14
20
  const action=args[1];
15
21
  if(action==='source')out({ok:true,package:pkg.name,version:pkg.version,source});
@@ -23,7 +29,9 @@ try {
23
29
  const files=inventory(source), expected=JSON.parse(fs.readFileSync(path.join(root,'npm','integrity.json'),'utf8'));
24
30
  const problems=Object.entries(expected).filter(([name,hash])=>files[name]!==hash).map(([name])=>name);
25
31
  const capabilities=JSON.parse(fs.readFileSync(path.join(root,'capabilities.json'),'utf8'));
26
- const result={ok:Number(process.versions.node.split('.')[0])>=22&&problems.length===0,package:pkg.name,version:pkg.version,node:process.versions.node,source,files:Object.keys(files).length,integrity:{ok:problems.length===0,problems},installationReady:problems.length===0,hostCapabilityDependencies:capabilities.requirements.host_capability_skills,generation:{state:'requires-host-preflight',runtimeTested:false,requiredFeatures:['image-inspection','multiple-reference-edit','local-reference-input','viewable-output']}};
32
+ const media=mediaDependency();
33
+ const result={ok:Number(process.versions.node.split('.')[0])>=22&&problems.length===0&&media.ok,package:pkg.name,version:pkg.version,node:process.versions.node,source,files:Object.keys(files).length,integrity:{ok:problems.length===0,problems},installationReady:problems.length===0,dependencies:{media},hostCapabilityDependencies:capabilities.requirements.host_capability_skills,generation:{provider:'@petercjl/sealseek-media-cli',state:media.ok?'requires-live-preflight':'paused',runtimeTested:false,requiredFeatures:['image-inspection','multiple-reference-edit','local-reference-input','viewable-output']}};
34
+ if(!media.ok){result.code=media.code;result.action='pause';result.installPrompt=media.installPrompt;}
27
35
  if(option('--agent'))result.installation={...status(targetPath(option('--agent'),option('--root'))),record:undefined};
28
36
  out(result);if(!result.ok)process.exitCode=1;
29
37
  } else if(args[0]==='update') {
@@ -32,6 +40,6 @@ try {
32
40
  const check=await checkUpdate();
33
41
  if(args[1]==='check'){out(check);if(!check.ok)process.exitCode=1;}
34
42
  else {if(!check.ok)throw fail(check.code,'Registry unavailable; installed version retained.');out(check.updateAvailable?installUpdate(check):{ok:true,changed:false,version:pkg.version});}
35
- } else if(!args.length||['--help','help','-h'].includes(args[0])) console.log('cloud-hug-style-transfer\nversion | capabilities --json | doctor --json [--agent AGENT]\nskill source/status/install/update [--agent codex|sealseek|workbuddy] [--root SKILLS_DIRECTORY]\nupdate check | update install --yes\nNode.js 22+. Updates are explicit; business calls never auto-update.');
43
+ } else if(!args.length||['--help','help','-h'].includes(args[0])) console.log('cloud-hug-style-transfer\nversion | capabilities --json | doctor --json [--agent AGENT]\ncanvas row --input JSON_FILE --json (read-only comparison layout)\nskill source/status/install/update [--agent codex|sealseek|workbuddy] [--root SKILLS_DIRECTORY]\nupdate check | update install --yes\nNode.js 22+. Updates are explicit; business calls never auto-update.');
36
44
  else throw fail('INVALID_COMMAND','Unknown command; use --help.');
37
45
  } catch(e){out({ok:false,code:e.code||'COMMAND_FAILED',message:e.message});process.exitCode=1;}
@@ -1,7 +1,8 @@
1
1
  {
2
- "adapters/codex.json": "c5e52102befd0bb47e114f2534ee3a2fb9a66f7338396202319aea73a3ea924a",
3
- "adapters/sealseek.json": "d50e4d9f910c664c026ffa9e92ac8901776d19d2f1c8062a046af534a7cdf2ce",
4
- "adapters/workbuddy.json": "4d0e1a62deb866dc6bd4c6bb7915cce20725d16863258345e93c817e7b8bdbd0",
2
+ "SKILL.md": "7d7e8c42e4ace458fc92ba9aa544fd9688047136ae991ef10bd1633264a7cdda",
3
+ "adapters/codex.json": "bea8d59e6e0dafae7439693b33356825023516a6f52be02a64c976d7ce47ce76",
4
+ "adapters/sealseek.json": "04ef053762fd4cfc2309573ec87425afad14b2df85a1ea8ef0aa06d98fee1aee",
5
+ "adapters/workbuddy.json": "cd0a1d8d5b9fcebc5a709b8c7523911f41973adb95f71af2c0f644473a43a6b4",
5
6
  "agents/openai.yaml": "8afeabba706e83f2f20d616579e8d79b6509fe93427acdc2b650ef6387049983",
6
7
  "assets/approved/all-colors-user-finish.webp": "539c77de8ec0dd46a29793befecf813e97ce6ae66f7cbe69486846383b2ae936",
7
8
  "assets/approved/brand-kv-user-finish-20261012.png": "cb09198481e779444696864b265c689f467207bf7de9610f7adc2b850f0be7b4",
@@ -54,9 +55,10 @@
54
55
  "assets/rejected/brand-kv-c2-20261012.webp": "88ed2de0d950ea4a34519661481877ee0899743a6dfce203a2033c0dab6a73f7",
55
56
  "assets/rejected/overhead-rest-b.webp": "16e5e6fabdc665868ac244d556f3a8a93db826a34425fdee042e4f7a8ebf64c3",
56
57
  "assets/rejected/prone-pile-a.webp": "d07f38bbb69fc23b30dca4ed27faa3d7ae58e2e81840a1c3d46101911c28a7a2",
57
- "capabilities.json": "00a871a640cb26d1072a27318f1e99ca4d58c046917e353dc7b1d31600375751",
58
+ "capabilities.json": "5d40595bf64402acf700cbaea63065d104547b12e59c275bca59cc9b4658de85",
58
59
  "references/assets.md": "5675ee6b395caca641e8ce56e200cd4391ad67e7afceb44fc6732f253a126926",
59
60
  "references/brand-layout.md": "5668190c1e618a903aa1b5e859405fa43a004da2082dc7040e83ef8cfc0aae86",
61
+ "references/canvas-comparison.md": "df85594c92de3e87daa85ee7cd9cc92df4be9049a5d42c32904542faf329a6c7",
60
62
  "references/cases.md": "9d0d2d3d210e367411d5a291fc78ef6c9c733afd79c9da76451c580fcbcd4d3e",
61
63
  "references/detail-final-20261016.md": "14acdc2f991b9db1c7d9ada32a35782603ac0aa310dcbe75f9693796a06cad83",
62
64
  "references/kv-layout-case-20261012.md": "845b287cfc57912aabedc48e558ca661cf86bf136304ea841030205a806ef06f",
@@ -64,6 +66,5 @@
64
66
  "references/model.md": "c4da688e22e2ada3f251fe0dc87effcaf5cb6ed6176f9d9c20a9661414bffab5",
65
67
  "references/page-patterns.md": "3c126c75e9ccd5fc0b8860efcf2a0e27e9d3ba31e5cdeb407a0a683d8861a978",
66
68
  "references/photography-method.md": "86ed457fc78112c1a2ad9bf9fdb9bcdf92aed71066bac2b3d4255159e3ee5c1c",
67
- "references/products.md": "642795ae16803669b169531240723bf72a388cb6351679a2787e67e181dca9cd",
68
- "SKILL.md": "7b3c63cf7a8a48815fbd773c27c14eae60d1fbb7f97ef80ee398e3f7f6a43fc0"
69
+ "references/products.md": "642795ae16803669b169531240723bf72a388cb6351679a2787e67e181dca9cd"
69
70
  }
@@ -0,0 +1,49 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { createRequire } from 'node:module';
4
+ import { spawnSync } from 'node:child_process';
5
+
6
+ const name = '@petercjl/sealseek-media-cli';
7
+ const prompt = `请安装 npm 包 ${name}。`;
8
+
9
+ // Invoke the verified package entry with the active Node runtime, including on
10
+ // Windows where an npm .cmd shim is not a directly executable program.
11
+ export function mediaDependency({ env = process.env, packageRoot } = {}) {
12
+ const missing = (code, message) => ({ok:false,code,package:name,message,installPrompt:prompt,action:'pause'});
13
+ const roots=[];
14
+ if(packageRoot || env.CLOUD_HUG_MEDIA_ROOT) roots.push(packageRoot || env.CLOUD_HUG_MEDIA_ROOT);
15
+ else {
16
+ try { roots.push(path.dirname(createRequire(import.meta.url).resolve(`${name}/package.json`))); } catch {}
17
+ for(const dir of (env.PATH || '').split(path.delimiter).filter(Boolean)) {
18
+ roots.push(path.join(dir,'node_modules',...name.split('/')),path.join(dir,'..','lib','node_modules',...name.split('/')));
19
+ try {
20
+ const entry=fs.realpathSync(path.join(dir,'sealseek-media'));
21
+ roots.push(path.resolve(path.dirname(entry),'..'));
22
+ } catch {}
23
+ }
24
+ }
25
+ for(const candidate of [...new Set(roots)]) {
26
+ if(!fs.existsSync(path.join(candidate,'package.json'))) continue;
27
+ try {
28
+ const root=fs.realpathSync(candidate),pkg=JSON.parse(fs.readFileSync(path.join(root,'package.json'),'utf8'));
29
+ if(pkg.name!==name) continue;
30
+ const parts=pkg.version?.split('.').map(Number);
31
+ if(!/^\d+\.\d+\.\d+$/.test(pkg.version)||!(parts[0]>0||parts[1]>6||(parts[1]===6&&parts[2]>=1))) return missing('DEPENDENCY_INCOMPATIBLE','sealseek-media-cli >=0.6.1 is required; update the package.');
32
+ if(typeof pkg.bin?.['sealseek-media']!=='string') return missing('DEPENDENCY_INVALID','Media CLI entry is missing.');
33
+ const entry=fs.realpathSync(path.resolve(root,pkg.bin['sealseek-media']));
34
+ if(!entry.startsWith(root+path.sep)) return missing('DEPENDENCY_INVALID','Media CLI entry must belong to its package.');
35
+ const result=spawnSync(process.execPath,[entry,'skill','source','--json'],{encoding:'utf8',timeout:15000,maxBuffer:1024*1024,env:{...env,SEALSEEK_MEDIA_AUTO_UPDATE:'0'}});
36
+ const data=JSON.parse(result.stdout||'null');
37
+ if(result.status!==0||data?.ok!==true||data.name!=='sealseek-media'||data.version!==pkg.version||typeof data.source!=='string') return missing('DEPENDENCY_INVALID','Media CLI canonical Skill discovery failed.');
38
+ const source=fs.realpathSync(data.source);
39
+ if(!source.startsWith(root+path.sep)||!/^name: sealseek-media\s*$/m.test(fs.readFileSync(path.join(source,'SKILL.md'),'utf8'))) return missing('DEPENDENCY_INVALID','Media companion Skill identity is invalid.');
40
+ const contract=JSON.parse(fs.readFileSync(path.join(source,'capabilities.json'),'utf8'));
41
+ const generate=contract.capabilities?.find(c=>c.id==='media.generate');
42
+ if(!['image','reference-image','dry-run','task-record','local-artifact'].every(f=>generate?.required_features?.includes(f))) return missing('DEPENDENCY_INCOMPATIBLE','Media generation contract is incomplete.');
43
+ const canvas=contract.canvas_contract;
44
+ if(canvas?.version!==1||!['explicit-placement','frame-batch','media-inspect'].every(f=>canvas.features?.includes(f))||!canvas.operations?.create||!canvas.operations?.upload?.some(c=>c.startsWith('image upload '))||!canvas.generation_options?.archive?.enum?.includes('none')) return missing('DEPENDENCY_INCOMPATIBLE','Media canvas creation, upload, inspection and explicit batch placement are required.');
45
+ return {ok:true,package:name,version:pkg.version,entry,source,invocation:{command:process.execPath,args:[entry]},serviceAccess:'requires-live-preflight',generationTested:false};
46
+ } catch { return missing('DEPENDENCY_INVALID','Media package, CLI or canonical Skill could not be verified.'); }
47
+ }
48
+ return missing('DEPENDENCY_MISSING','Required sealseek-media-cli package was not detected. Pause the Skill until it is installed and verified.');
49
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercjl/cloud-hug-style-transfer",
3
- "version": "0.1.2",
3
+ "version": "0.3.0",
4
4
  "description": "抱抱云朵社品牌风格转换 Skill,支持 Codex、SealSeek 与 WorkBuddy",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,19 +1,27 @@
1
1
  ---
2
2
  name: cloud-hug-style-transfer
3
- description: 独立把旧详情页、产品摄影、主KV或SKU转换为抱抱云朵社的品牌视觉与同一模特。保留当次商品、有效文案参数及页面用途,产品款式与材料随新资料变化。内置完整19页定稿、LOGO、人物和摄影排版方法;无需其他个人技能、历史会话或私人素材库。用于“抱抱云朵社风格转换”、旧页品牌化、同模特延展与图文设计。
3
+ description: 独立把旧详情页、产品摄影、主KV或SKU转换为抱抱云朵社的品牌视觉与同一模特。保留当次商品、有效文案参数及页面用途,产品款式与材料随新资料变化。内置完整19页定稿、LOGO、人物和摄影排版方法;生图必需 @petercjl/sealseek-media-cli 及其配套 sealseek-media Skill,未检测到即暂停;品牌资料无需私人素材库。用于“抱抱云朵社风格转换”、旧页品牌化、同模特延展与图文设计。
4
4
  ---
5
5
 
6
6
  # 抱抱云朵社风格转换
7
7
 
8
- 使用中文展示名 **抱抱云朵社风格转换**。用本目录内的方法和素材独立完成品牌转换,以当前使用者的明确要求为准;不读取其他个人技能,不依赖创建者的历史会话或私人文件权限。
8
+ 使用中文展示名 **抱抱云朵社风格转换**。用本目录内的方法和素材独立完成品牌转换,以当前使用者的明确要求为准;生成能力由必需的 `@petercjl/sealseek-media-cli` 及其规范配套 `sealseek-media` Skill 提供,品牌资料不依赖创建者的历史会话或私人文件权限。
9
9
 
10
10
  ## 运行合同与平台入口
11
11
 
12
- 输入是当前源页、商品资料和本次目标;输出是约定数量的独立成图及简短验收说明,或用户仅要求的规划。品牌方法与全部资产由本 Skill 提供,宿主负责图像查看、参考图编辑与结果交付,安装包仅管理来源和更新。
12
+ 输入是当前源页、商品资料和本次目标;输出是约定数量的独立成图、原图与成图逐行对照的无限画板及简短验收说明,或用户仅要求的规划。本 Skill 负责品牌方法、素材选择、提示词、版式和业务验收;`@petercjl/sealseek-media-cli` 负责生图服务、认证、参考图传输、任务恢复和结果下载;宿主负责命令执行、实际看图和交付。
13
13
 
14
- 在首次查看或生成节点,读取 [能力合同](capabilities.json) 和当前宿主对应的适配: [Codex](adapters/codex.json)、[SealSeek](adapters/sealseek.json)、[WorkBuddy](adapters/workbuddy.json)。只加载当前宿主适配,通过其工具目录核验所需特性;规划仅需读取和看图。生成须支持多参考图编辑、实际传入本地资产并交付可查看结果。缺少能力时返回 `CAPABILITY_UNAVAILABLE` 或 `FEATURE_UNSUPPORTED`,说明影响与已完成内容;能力满足后回到第 5 节。适配状态和真实生成效果分别验收。
14
+ ### 入口:必需依赖检查
15
15
 
16
- 按第 1–4 节理解任务与选取依据,第 5 节执行,第 6 节实际验收;局部失败回到对应设计或执行节点。包管理采用 `cloud-hug-style-transfer` CLI 的当前 `skill source/status/install/update` 合同;源文件与素材随 npm 包提供,账户及生成服务由宿主配置。
16
+ **每次任务先检查依赖,通过后才进入第 1 节;规划任务也遵守此入口。** 执行 `cloud-hug-style-transfer doctor --json`,核对 `dependencies.media.ok`。检查支持当前 npm 安装树、PATH 安装及显式配置的 `CLOUD_HUG_MEDIA_ROOT`;返回的 `dependencies.media.invocation` 是经过包身份核验的 CLI 调用入口,使用宿主当前 Node 运行时,可用于 Agent 管理的运行时或套件组件。
17
+
18
+ 未检测到 `@petercjl/sealseek-media-cli` 时返回 `DEPENDENCY_MISSING` 并**暂停整个任务**,保留输入和进度,给出最简安装提示词:“请安装 npm 包 @petercjl/sealseek-media-cli。”等待安装并重新检查通过后,从本入口恢复。版本低于 0.6.1、CLI 无法执行、规范 Skill 缺失或合同不兼容同样暂停,按诊断修复后复查。不得以宿主内置生图、其他提供商或继续规划代替依赖通过;本入口不自动安装软件或提交生成。
19
+
20
+ 通过检查后,使用返回的 CLI 入口执行 `skill source --json`,以逻辑名 **sealseek-media** 核对来源,并完整读取其当前 `SKILL.md`;相对资源从该目录解析,更新后重新加载。需要其 0.6.1+ 的当前合同:`version`、`doctor --live --json`、`capabilities --live --json`、模型查询、参考图生成 dry-run、任务提交/跟踪/恢复和本地交付。依赖输入是本 Skill 选定的提示词、有序参考图及职责、数量、画幅和授权;输出是任务 ID、状态、模型、可验证文件与错误。认证或服务不可用时暂停,由配套 Skill 处理其恢复分支;恢复后回到此入口或既有任务跟踪节点,保留任务 ID,不自动重提。
21
+
22
+ 读取 [能力合同](capabilities.json) 和当前宿主适配:[Codex](adapters/codex.json)、[SealSeek](adapters/sealseek.json)、[WorkBuddy](adapters/workbuddy.json)。三者的 `media.image.edit` 统一通过上述 CLI,`media.image.inspect` 使用宿主实际看图能力;只加载当前宿主适配。缺少命令执行、看图或当前模型所需的参考图特性时,返回 `CAPABILITY_UNAVAILABLE` 或 `FEATURE_UNSUPPORTED` 并暂停。安装通过不等于已登录、拥有额度或实际生成效果合格。
23
+
24
+ 按第 1–4 节理解任务与选取依据,第 5 节调用依赖执行,第 6 节实际验收;局部失败回到对应设计或执行节点。包管理采用 `cloud-hug-style-transfer` CLI 的当前 `skill source/status/install/update` 合同;两个包各自维护来源和更新,账户与凭据保存在媒体包的私有配置中。
17
25
 
18
26
  ## 1. 识别当次商品与页面任务
19
27
 
@@ -98,7 +106,9 @@ description: 独立把旧详情页、产品摄影、主KV或SKU转换为抱抱
98
106
 
99
107
  查实际说明有无相反要求:无字却夹带标题;安睡却强求笑容露全脸;亲密近景却一律缩小主体;尺寸展示却遮挡关键轮廓;柔软品牌却全套粗圆字。修正具体冲突,不靠末尾追加“自然、高级、有呼吸感”抵消。
100
108
 
101
- 调用已核验的 `media.image.edit` 能力直接制作;工具不可用时如实说明,只完成可做的规划,不伪称出图,不擅换外部模型或程序合成。保留精简实际调用记录,使用当前可用路径,不向使用者倾倒完整日志。
109
+ **生成执行先读取 [无限画板对照归档](references/canvas-comparison.md)。每个新生图任务在首张实际生图前,新建按用户图片与用途自动命名的画板。每张成功后立即插入左原图、右成图的一对独立元素,后续行向下紧凑排列;归档核验通过后再处理下一张。规划任务不创建画板。**
110
+
111
+ 调用当前适配中由 `sealseek-media-cli` 实现的 `media.image.edit`。按已加载的 `sealseek-media` 主线读取当前模型能力,用其参考图生成/编辑合同传入真实原图与精简提示词,先 `--dry-run --json`,通过后在已有生成授权范围内用 `--canvas 本轮画板ID --archive none --via sealseek --submit` 提交,成功后按对照归档合同把原图与成图实际成对插入本轮画板。模型采用媒体包当前默认值,用户明确指定时保留指定值;模型不支持本轮要求时暂停并报告,不自动换模型。保存任务 ID,按依赖合同查询、恢复、下载;提交结果不明先核对同一任务,不自动重提或增加付费生成。执行中依赖丢失或服务不可用时暂停,恢复后回到既有任务或本执行节点。保留精简实际调用记录,不向使用者倾倒完整日志。
102
112
 
103
113
  分别要三张就交三张独立成稿,已授权数量连续完成,不自行拼成方案墙。创意备选应有真实观看或图文关系差异;比较型延展可保留同一骨架。一大两小、同构与否取决于页面,而非出图张数。
104
114
 
@@ -113,3 +123,5 @@ description: 独立把旧详情页、产品摄影、主KV或SKU转换为抱抱
113
123
  5. **连续阅读与备选**:比较段的重复是否帮助比较,跨段变化是否推进内容;三案是否真正提供选择。摄影变清晰或产品基本准确,不能替代整体设计成立。
114
124
 
115
125
  整体成立时定向修局部;空间、状态或设计关系失败时调整对应关系,不锁住失败构图只修部件。遵守允许修改范围和数量,不默认额外跑多轮。交付如实说明仍有的关键问题;规则和规划检查不能证明实际生成效果已达标。
126
+
127
+ 交付还须按画板归档合同核对名称、真实链接、左右源图关系、逐行顺序与紧凑间距;每张都已实际成对写入并核验,才报告画板归档完成。
@@ -13,7 +13,7 @@
13
13
  "implementation": {
14
14
  "type": "agent-native",
15
15
  "discovery": "Inspect the current host tool catalog and schemas; verify reference input and result delivery before invoking.",
16
- "invocation": "Use native image viewing. Use the built-in image generation tool with referenced_image_paths for local references; inspect files before editing. Follow current host schema. API keys are not the default route.",
16
+ "invocation": "Use the current host image-viewing tool to inspect actual local source, reference and output pixels; require a vision-capable model.",
17
17
  "configuration": "Host-managed account and provider authorization; no credentials bundled."
18
18
  },
19
19
  "normalization": "Success: {ok:true,artifacts:[],metadata:{},task_id:null,cost:null,warnings:[]}; failure: {ok:false,code,message,capability_id}.",
@@ -29,18 +29,45 @@
29
29
  "viewable-output"
30
30
  ],
31
31
  "implementation": {
32
- "type": "agent-native",
33
- "discovery": "Inspect the current host tool catalog and schemas; verify reference input and result delivery before invoking.",
34
- "invocation": "Use native image viewing. Use the built-in image generation tool with referenced_image_paths for local references; inspect files before editing. Follow current host schema. API keys are not the default route.",
35
- "configuration": "Host-managed account and provider authorization; no credentials bundled."
32
+ "type": "cli",
33
+ "discovery": "Run cloud-hug-style-transfer doctor --json; require dependencies.media.ok and use its verified invocation. Resolve sealseek-media via that CLI skill source --json and load the complete current SKILL.md plus its current host adapter.",
34
+ "invocation": "Follow the current sealseek-media Discover/Prepare/Validate/Submit/Follow/Deliver contract. Pass application-owned prompt and ordered local references, dry-run first, submit authorized generation via --via sealseek --submit, preserve task IDs and verify local output.",
35
+ "configuration": "Required @petercjl/sealseek-media-cli >=0.6.1; private media-package authentication, network and credits. Optional CLOUD_HUG_MEDIA_ROOT points to its installed package root.",
36
+ "failure": "Missing or incompatible package/Skill pauses the entire task before section 1; offer the minimal install prompt and resume only after verification. Service/feature failures pause without native-generation fallback."
36
37
  },
37
38
  "normalization": "Success: {ok:true,artifacts:[],metadata:{},task_id:null,cost:null,warnings:[]}; failure: {ok:false,code,message,capability_id}.",
38
- "evidence": []
39
+ "evidence": [
40
+ "Canonical sealseek-media 0.6.1 CLI/Skill and live capabilities inspected; paid generation and full host flow not tested."
41
+ ]
42
+ },
43
+ {
44
+ "capability_id": "media.canvas.compare",
45
+ "status": "implemented",
46
+ "features": [
47
+ "new-canvas",
48
+ "source-upload",
49
+ "actual-dimensions",
50
+ "explicit-placement",
51
+ "idempotent-pair-import",
52
+ "verified-save"
53
+ ],
54
+ "implementation": {
55
+ "type": "cli",
56
+ "discovery": "Use the verified media invocation from doctor; load canonical sealseek-media Skill and its current canvas creation, upload, inspection and explicit batch contract.",
57
+ "invocation": "Follow references/canvas-comparison.md for application naming, pairing, row state and layout; use media CLI canvas create, image upload, media inspect, canvas batch and canvas get. Pass an explicit canvas ID and archive none during generation; archive each pair after completion.",
58
+ "configuration": "Existing media-package private authentication and network. canvas_contract version 1; no new provider integration.",
59
+ "failure": "Pause on missing canvas contract, failed/uncertain creation, upload or pair write. Preserve IDs and original batch; inspect the same canvas before recovery."
60
+ },
61
+ "normalization": "Success includes canvas_id, canvas_url and verified pair positions; failure retains code, task/canvas IDs and recovery state.",
62
+ "evidence": [
63
+ "Current media CLI contract inspected; deterministic geometry and batch dry-run tested separately from real canvas writes."
64
+ ]
39
65
  }
40
66
  ],
41
67
  "operating_systems": {
42
68
  "macos": "implemented",
43
69
  "windows": "implemented"
44
70
  },
45
- "notes": "Installer support and host generation capability are independent. Unresolved native capabilities must be verified on the executing host before generation."
71
+ "notes": "Image generation uses the same required sealseek-media-cli on every host. Native viewing and command execution still require host verification. Missing media dependency pauses all tasks.",
72
+ "host_generation_tested": false
46
73
  }
@@ -13,7 +13,7 @@
13
13
  "implementation": {
14
14
  "type": "agent-native",
15
15
  "discovery": "Inspect the current host tool catalog and schemas; verify reference input and result delivery before invoking.",
16
- "invocation": "Use the current host image-viewing tool with absolute local paths; require a vision-capable model and inspect actual pixels, including generated output.",
16
+ "invocation": "Use the current host image-viewing tool to inspect actual local source, reference and output pixels; require a vision-capable model.",
17
17
  "configuration": "Host-managed account and provider authorization; no credentials bundled."
18
18
  },
19
19
  "normalization": "Success: {ok:true,artifacts:[],metadata:{},task_id:null,cost:null,warnings:[]}; failure: {ok:false,code,message,capability_id}.",
@@ -31,15 +31,38 @@
31
31
  "viewable-output"
32
32
  ],
33
33
  "implementation": {
34
- "type": "agent-native",
35
- "discovery": "Inspect currently advertised sealseek-canvas tool schemas. If the host provides its AIGC-生图 capability Skill, resolve that exact logical name, read its current complete SKILL.md and follow its live input/output contract for this operation. Do not bundle or duplicate that Skill.",
36
- "invocation": "Use sealseek-canvas reference-image generation only after inspecting its current reference format. Local file upload must use the host-provided upload operation and returned format; never pass local file paths to URL-only fields. Preserve selected model and reference order. Retrieve and inspect the resulting local images using the host delivery contract.",
37
- "configuration": "Current SealSeek session account and advertised native media capability. No external CLI or provider installation is implied.",
38
- "failure": "If the current tool, local-reference transport or image delivery is unavailable, return CAPABILITY_UNAVAILABLE or FEATURE_UNSUPPORTED and resume the core at section 5 only after resolution."
34
+ "type": "cli",
35
+ "discovery": "Run cloud-hug-style-transfer doctor --json; require dependencies.media.ok and use its verified invocation. Resolve sealseek-media via that CLI skill source --json and load the complete current SKILL.md plus its current host adapter.",
36
+ "invocation": "Follow the current sealseek-media Discover/Prepare/Validate/Submit/Follow/Deliver contract. Pass application-owned prompt and ordered local references, dry-run first, submit authorized generation via --via sealseek --submit, preserve task IDs and verify local output.",
37
+ "configuration": "Required @petercjl/sealseek-media-cli >=0.6.1; private media-package authentication, network and credits. Optional CLOUD_HUG_MEDIA_ROOT points to its installed package root.",
38
+ "failure": "Missing or incompatible package/Skill pauses the entire task before section 1; offer the minimal install prompt and resume only after verification. Service/feature failures pause without native-generation fallback."
39
39
  },
40
40
  "normalization": "Success: {ok:true,artifacts:[],metadata:{},task_id:null,cost:null,warnings:[]}; failure: {ok:false,code,message,capability_id}.",
41
41
  "evidence": [
42
- "Adapter implementation follows inspected host capability descriptions; generation has not been exercised."
42
+ "Canonical sealseek-media 0.6.1 CLI/Skill and live capabilities inspected; paid generation and full host flow not tested."
43
+ ]
44
+ },
45
+ {
46
+ "capability_id": "media.canvas.compare",
47
+ "status": "implemented",
48
+ "features": [
49
+ "new-canvas",
50
+ "source-upload",
51
+ "actual-dimensions",
52
+ "explicit-placement",
53
+ "idempotent-pair-import",
54
+ "verified-save"
55
+ ],
56
+ "implementation": {
57
+ "type": "cli",
58
+ "discovery": "Use the verified media invocation from doctor; load canonical sealseek-media Skill and its current canvas creation, upload, inspection and explicit batch contract.",
59
+ "invocation": "Follow references/canvas-comparison.md for application naming, pairing, row state and layout; use media CLI canvas create, image upload, media inspect, canvas batch and canvas get. Pass an explicit canvas ID and archive none during generation; archive each pair after completion.",
60
+ "configuration": "Existing media-package private authentication and network. canvas_contract version 1; no new provider integration.",
61
+ "failure": "Pause on missing canvas contract, failed/uncertain creation, upload or pair write. Preserve IDs and original batch; inspect the same canvas before recovery."
62
+ },
63
+ "normalization": "Success includes canvas_id, canvas_url and verified pair positions; failure retains code, task/canvas IDs and recovery state.",
64
+ "evidence": [
65
+ "Current media CLI contract inspected; deterministic geometry and batch dry-run tested separately from real canvas writes."
43
66
  ]
44
67
  }
45
68
  ],
@@ -47,6 +70,6 @@
47
70
  "macos": "implemented",
48
71
  "windows": "implemented"
49
72
  },
50
- "notes": "Installer support and host generation capability are independent. Unresolved native capabilities must be verified on the executing host before generation.",
73
+ "notes": "Image generation uses the same required sealseek-media-cli on every host. Native viewing and command execution still require host verification. Missing media dependency pauses all tasks.",
51
74
  "host_generation_tested": false
52
75
  }
@@ -13,7 +13,7 @@
13
13
  "implementation": {
14
14
  "type": "agent-native",
15
15
  "discovery": "Inspect the current host tool catalog and schemas; verify reference input and result delivery before invoking.",
16
- "invocation": "Use the current host image-viewing tool with absolute local paths; require a vision-capable model and inspect actual pixels, including generated output.",
16
+ "invocation": "Use the current host image-viewing tool to inspect actual local source, reference and output pixels; require a vision-capable model.",
17
17
  "configuration": "Host-managed account and provider authorization; no credentials bundled."
18
18
  },
19
19
  "normalization": "Success: {ok:true,artifacts:[],metadata:{},task_id:null,cost:null,warnings:[]}; failure: {ok:false,code,message,capability_id}.",
@@ -31,15 +31,38 @@
31
31
  "viewable-output"
32
32
  ],
33
33
  "implementation": {
34
- "type": "agent-native",
35
- "discovery": "Inspect current Miora tool schemas and scenario availability in the WorkBuddy host. Resolve built-in miora-creative-core and miora-image-generation by exact logical names from the host catalog, load their current complete SKILL.md and only task-required references. This is a host capability dependency, not a copied business workflow.",
36
- "invocation": "Activate the authorized host multimodal image scenario, observe host batch authorization, use connect_cloud_service and miora_edit_image with actual references in images[]. Follow the current host delivery contract: miora_write_canvas then present_files using copied_assets and miora_open_canvas; individual final images remain separate artifacts. Preserve source frame and explicit user model decisions.",
37
- "configuration": "WorkBuddy built-in Miora image scenario and current-user service access. Authentication stays in host tools.",
38
- "failure": "If the required scenario, built-in capability Skill, multi-reference editing or delivery operation is absent, return CAPABILITY_UNAVAILABLE. Do not invoke Miora outside its allowed scenario or substitute SVG/HTML for raster output."
34
+ "type": "cli",
35
+ "discovery": "Run cloud-hug-style-transfer doctor --json; require dependencies.media.ok and use its verified invocation. Resolve sealseek-media via that CLI skill source --json and load the complete current SKILL.md plus its current host adapter.",
36
+ "invocation": "Follow the current sealseek-media Discover/Prepare/Validate/Submit/Follow/Deliver contract. Pass application-owned prompt and ordered local references, dry-run first, submit authorized generation via --via sealseek --submit, preserve task IDs and verify local output.",
37
+ "configuration": "Required @petercjl/sealseek-media-cli >=0.6.1; private media-package authentication, network and credits. Optional CLOUD_HUG_MEDIA_ROOT points to its installed package root.",
38
+ "failure": "Missing or incompatible package/Skill pauses the entire task before section 1; offer the minimal install prompt and resume only after verification. Service/feature failures pause without native-generation fallback."
39
39
  },
40
40
  "normalization": "Success: {ok:true,artifacts:[],metadata:{},task_id:null,cost:null,warnings:[]}; failure: {ok:false,code,message,capability_id}.",
41
41
  "evidence": [
42
- "Adapter implementation follows inspected host capability descriptions; generation has not been exercised."
42
+ "Canonical sealseek-media 0.6.1 CLI/Skill and live capabilities inspected; paid generation and full host flow not tested."
43
+ ]
44
+ },
45
+ {
46
+ "capability_id": "media.canvas.compare",
47
+ "status": "implemented",
48
+ "features": [
49
+ "new-canvas",
50
+ "source-upload",
51
+ "actual-dimensions",
52
+ "explicit-placement",
53
+ "idempotent-pair-import",
54
+ "verified-save"
55
+ ],
56
+ "implementation": {
57
+ "type": "cli",
58
+ "discovery": "Use the verified media invocation from doctor; load canonical sealseek-media Skill and its current canvas creation, upload, inspection and explicit batch contract.",
59
+ "invocation": "Follow references/canvas-comparison.md for application naming, pairing, row state and layout; use media CLI canvas create, image upload, media inspect, canvas batch and canvas get. Pass an explicit canvas ID and archive none during generation; archive each pair after completion.",
60
+ "configuration": "Existing media-package private authentication and network. canvas_contract version 1; no new provider integration.",
61
+ "failure": "Pause on missing canvas contract, failed/uncertain creation, upload or pair write. Preserve IDs and original batch; inspect the same canvas before recovery."
62
+ },
63
+ "normalization": "Success includes canvas_id, canvas_url and verified pair positions; failure retains code, task/canvas IDs and recovery state.",
64
+ "evidence": [
65
+ "Current media CLI contract inspected; deterministic geometry and batch dry-run tested separately from real canvas writes."
43
66
  ]
44
67
  }
45
68
  ],
@@ -47,6 +70,6 @@
47
70
  "macos": "implemented",
48
71
  "windows": "implemented"
49
72
  },
50
- "notes": "Installer support and host generation capability are independent. Unresolved native capabilities must be verified on the executing host before generation.",
73
+ "notes": "Image generation uses the same required sealseek-media-cli on every host. Native viewing and command execution still require host verification. Missing media dependency pauses all tasks.",
51
74
  "host_generation_tested": false
52
75
  }
@@ -36,7 +36,10 @@
36
36
  "AUTH_REQUIRED",
37
37
  "PERMISSION_REQUIRED",
38
38
  "PROVIDER_FAILURE",
39
- "OUTPUT_CONTRACT_FAILED"
39
+ "OUTPUT_CONTRACT_FAILED",
40
+ "DEPENDENCY_MISSING",
41
+ "DEPENDENCY_INVALID",
42
+ "DEPENDENCY_INCOMPATIBLE"
40
43
  ]
41
44
  },
42
45
  {
@@ -70,8 +73,66 @@
70
73
  "AUTH_REQUIRED",
71
74
  "PERMISSION_REQUIRED",
72
75
  "PROVIDER_FAILURE",
76
+ "OUTPUT_CONTRACT_FAILED",
77
+ "DEPENDENCY_MISSING",
78
+ "DEPENDENCY_INVALID",
79
+ "DEPENDENCY_INCOMPATIBLE"
80
+ ],
81
+ "provider": "@petercjl/sealseek-media-cli"
82
+ },
83
+ {
84
+ "id": "media.canvas.compare",
85
+ "purpose": "首张生图前新建命名画板,逐张成对插入左原图右成图并验证紧凑逐行布局",
86
+ "required": true,
87
+ "required_features": [
88
+ "new-canvas",
89
+ "source-upload",
90
+ "actual-dimensions",
91
+ "explicit-placement",
92
+ "idempotent-pair-import",
93
+ "verified-save"
94
+ ],
95
+ "input_fields": [
96
+ "title",
97
+ "canvas_id",
98
+ "images",
99
+ "row_layout",
100
+ "authorization"
101
+ ],
102
+ "output_fields": [
103
+ "ok",
104
+ "artifacts",
105
+ "metadata",
106
+ "canvas_id",
107
+ "canvas_url",
108
+ "verified",
109
+ "warnings"
110
+ ],
111
+ "side_effects": {
112
+ "external_mutation": true,
113
+ "may_cost_money": false,
114
+ "authorization": "Authorized image task includes its new canvas, source uploads and result archival; generation remains separately authorized."
115
+ },
116
+ "errors": [
117
+ "DEPENDENCY_MISSING",
118
+ "DEPENDENCY_INCOMPATIBLE",
119
+ "AUTH_REQUIRED",
120
+ "CAPABILITY_UNAVAILABLE",
121
+ "FEATURE_UNSUPPORTED",
122
+ "SUBMISSION_UNCERTAIN",
123
+ "IDEMPOTENCY_CONFLICT",
73
124
  "OUTPUT_CONTRACT_FAILED"
74
125
  ]
75
126
  }
127
+ ],
128
+ "dependencies": [
129
+ {
130
+ "package": "@petercjl/sealseek-media-cli",
131
+ "minimum_version": "0.6.1",
132
+ "skill": "sealseek-media",
133
+ "required": true,
134
+ "preflight": "cloud-hug-style-transfer doctor --json",
135
+ "on_missing": "pause-entire-task"
136
+ }
76
137
  ]
77
138
  }
@@ -0,0 +1,50 @@
1
+ # 无限画板:逐图左右对照
2
+
3
+ 仅进入生成执行节点时读取。输入是本轮商品/用途、源图与生成计划;输出是一个新建且贴切命名的无限画板文件,每张成图一行,原图在左、成图在右,后续行紧凑向下排列。这里决定命名、图片职责、布局和进度;服务操作由当前 `sealseek-media` Skill 承接。
4
+
5
+ ## 1. 准备本轮画板
6
+
7
+ 先通过入口依赖、登录和模型能力检查,完成本轮生成参数 dry-run,再创建画板。用户只要求看图或规划时不创建;明确开始生成或批准生成后,每个新的生图任务新建一个画板,同一任务的多张图片共用它。恢复中断、查询旧任务及继续本轮时沿用已记录的画板,不重复创建。
8
+
9
+ 实际看用户图片,按“商品或视觉主题+本次用途/特点”取一个好记的简短中文名称,例如“蓝兔抱枕·柔光详情页”“云朵沙发·主图焕新”。使用能确认的内容,资料不足时用任务用途命名,不编造品牌或型号。用户指定标题时使用指定值;同名任务可加短日期或简短序号区分,不用原始文件乱码或长任务 ID 作标题。
10
+
11
+ 通过已核验的媒体 CLI 读取当前 `references/cli.md` 中 Canvas operations and placement、Native Frames, explicit batches and existing-media metadata 合同。调用 `canvas create --title 名称 --submit --json`,保存真实 `canvas_id`、名称和链接,使用 `canvas get ID --json` 核对后才开始实际生图。画板创建失败或结果不明时暂停;检查已有记录及 `canvas list`,确认同一次创建的结果,不盲目再建一个。
12
+
13
+ 在当前任务的本地项目目录保存进度:稳定的 `run_id`、画板 ID/名称/链接、源图路径及对应关系、有序行清单、任务 ID、上传 URL、实际尺寸、批次 JSON、每行写入状态和下一行 top。敏感参数与私人路径仅留本地;写前检查路径,已有进度读取恢复,已有用户文件保留。新任务用独立目录和新的 run_id。
14
+
15
+ ## 2. 每生成一张,插入一对图片
16
+
17
+ 按用户约定顺序逐张执行,每个任务请求一张图片。生成命令明确传入本轮 `--canvas ID --archive none`,先 dry-run,通过后按已授权范围提交。`none` 用于在结果实际尺寸确定后成对归档,服务生成历史仍属于该画板;后续步骤会实际插入成图。每张保存并跟踪其任务 ID,成功后获取可用 URL、本地文件及实际尺寸。
18
+
19
+ 左侧原图是这一张成图对应的用户待转换源图,不是内置品牌案例或人物卡。同一原图生成多张方案时,每一行各插入该原图与对应成图。多张源图按既定配对关系逐行处理;确需多张源图共同生成且无法确定主要对照图时,先明确主要源图。
20
+
21
+ 使用媒体 CLI 的 `image upload FILE --submit --json` 上传左侧原图,并通过其当前的实际尺寸检查合同取得原图及成图宽高。已成功上传且文件哈希未变的同一原图复用 URL,画板上仍按每行分别显示。成图使用同一任务已返回的 URL,不为排版重新生成或重新压缩图片。
22
+
23
+ 每完成一张立即计算这一行并成对插入,再处理下一张:
24
+
25
+ - 左、右各预留宽 480 个画板单位,列间距 24;右图显示宽 480,高度按其实际比例计算。
26
+ - 原图等比完整放入左侧的 480 × 右图显示高度范围,顶部对齐并在左列水平居中。由画板显示缩放保持原图完整与成图紧邻,不拉伸、裁切或拼成一张图。
27
+ - 第一行 top 为 0;下一行 top = 本行 top + 右图显示高度 + 32。这样每张成图紧接上一张成图下方,原图也不会侵入下一行。
28
+ - 左右两图始终是两个独立图片元素,保持原始 URL 和分辨率。生成详情以媒体包支持的隐藏 generationParams 保存,不往图片里添加文字。
29
+
30
+ 使用本应用 CLI 的确定性布局命令 `cloud-hug-style-transfer canvas row --input ROW.json --json`,套件安装可经其 `component run cloud-hug-style-transfer` 入口调用。它只读输入并返回布局,不创建画板、不上传或生图。输入示例:
31
+
32
+ ```json
33
+ {
34
+ "run_id": "stable-run-key",
35
+ "row_index": 1,
36
+ "top": 0,
37
+ "source": {"url": "https://example.com/source.png", "width": 1200, "height": 1800},
38
+ "result": {"url": "https://example.com/result.png", "width": 1200, "height": 1800}
39
+ }
40
+ ```
41
+
42
+ 实际输入使用上传和任务返回的真实 URL 及实测尺寸。成图可提供 `generationParams`,仅选用媒体包当前支持的提示词、模型、画幅、参数及参考 URL 等生成详情字段,不复制凭据、请求头、私人路径或完整任务内部记录。
43
+
44
+ 把返回的 `batch` 单独保存成批次 JSON,先执行媒体 CLI `canvas batch ID --file BATCH.json --json` 验证,再加 `--submit` 写入。稳定元素 ID 包含 run_id、row_index 及 source/result,重复执行同一批次具有幂等性。要求写入结果 verified,并回读同一画板核对这一对的 URL、位置、比例和两图数量;确认后才记录 next_top 并进入下一行。
45
+
46
+ ## 3. 恢复与验收
47
+
48
+ 单张失败保留前面已完成的对照行及当前任务 ID;后续恢复从该行继续,顺序不变。归档失败或写入结果不明时,保存结果文件和原批次,先 `canvas get` 核对稳定元素 ID,再依据媒体包恢复合同修复同一批次;不要以新元素 ID 绕过冲突,不用默认网格重排,也不通过 `task sync` 的默认追加另插一份成图。已有人为移动、删除或并发改动时暂停并报告差异,不自动恢复被删元素或移动旧行。
49
+
50
+ 完成标准:画板名称与当前主题/用途匹配,全部约定成图按顺序形成左右对照,每行左原图、右成图,成图上下间距 32、左右列间距 24,比例正确、无重叠和重复项,实际写入已核验。交付独立图片与验收说明时同时给出画板名称和真实链接;未成功成对归档时明确报告未完成部分。