@petercjl/cloud-hug-style-transfer 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/INSTALL.md ADDED
@@ -0,0 +1,16 @@
1
+ # Install for the current Agent
2
+
3
+ User prompt:
4
+
5
+ > 请安装 npm 包 @petercjl/cloud-hug-style-transfer。
6
+
7
+ The current Agent checks Node.js 22+, command execution, file access, its own supported Skill discovery directory and its registration/refresh mechanism. The Agent resolves an exact destination; the package never chooses a host directory. npm success completes the bootstrap CLI phase only, including installations with scripts disabled.
8
+
9
+ Agent execution contract:
10
+
11
+ 1. Resolve the installed CLI and verify `version`; run `skill source --json` and read the canonical Skill and `installationLifecycle`.
12
+ 2. Run `skill install --agent AGENT --path EXACT_SKILL_DIR --json`. A valid unnamed Agent uses the generic adapter. The destination contains physical copies of all resources, a `.runtime` with the package and its dependencies, and `scripts/run.mjs`. Node.js and declared external services remain prerequisites.
13
+ 3. Invoke `node EXACT_SKILL_DIR/scripts/run.mjs version --json`; inspect `skill status` with the same explicit path. Ownership, hashes, version and independent runtime must be current.
14
+ 4. Reload/register the Skill using the current host's mechanism and confirm native discovery. The CLI reports `hostDiscovery: pending`; it cannot attest host registration. Report full completion only after that verification.
15
+
16
+ Existing user-owned targets and local edits are preserved. Managed legacy links are backed up and migrated to physical copies. A missing destination stops before package replacement. On partial failure inspect `update operation --path EXACT_SKILL_DIR --json`, then follow UPDATE.md. Service login and paid generation require their own authorization.
package/README.md CHANGED
@@ -1,43 +1,31 @@
1
- # 抱抱云朵社风格转换
1
+ # @petercjl/cloud-hug-style-transfer
2
2
 
3
- 将旧详情页、产品摄影、主 KV 或 SKU 转换为抱抱云朵社品牌视觉,保留当次商品事实、文案与用途。包内包含完整 19 页定稿、品牌标识、人物设定与摄影排版方法,约 41 MB 素材。
3
+ 把已有商品图片转换为抱抱云朵社的品牌风格,内置品牌、模特和排版素材。
4
4
 
5
- 支持 Codex、SealSeek、WorkBuddy。需要 Node.js 22+、宿主命令执行和看图能力。生图统一通过必需的 `@petercjl/sealseek-media-cli`(0.6.1+)及其配套 `sealseek-media` Skill 执行;每次业务任务先检查,缺失或不兼容时暂停整个任务,安装并复查通过后继续。有效 SealSeek 登录、网络及额度由使用者准备,包不附带账号或额度。宿主生图效果仍需分别实测。
5
+ 面向具备所需执行能力的任意 Agent;Node.js 22+。当前 Agent 识别自己的 Skill 目录、能力与注册方式。
6
6
 
7
- 先安装生图依赖,将提示词发送给 Agent:
7
+ ## 安装
8
8
 
9
- > 请安装 npm 包 @petercjl/sealseek-media-cli。
10
-
11
- 安装:将下列提示词发送给目标 Agent。
9
+ 把下面这句话发送给当前 Agent:
12
10
 
13
11
  > 请安装 npm 包 @petercjl/cloud-hug-style-transfer。
14
12
 
15
- 使用:附上待转换图片;关键商品结构不清楚时补充实拍。开始生图前会新建按图片主题与任务自动命名的无限画板。每完成一张就插入一组对照:左边原图、右边成图,后续组向下排列,保留紧凑间距;交付包含画板链接。仅规划时不创建画板。
16
-
17
- > 用抱抱云朵社风格转换处理所附图片。
13
+ 安装同时包含工具、完整 Skill 和独立运行依赖。Agent 核验本地入口、文件与版本,再确认宿主能发现 Skill。
18
14
 
19
- 更新:
15
+ ## 更新
20
16
 
21
17
  > 请更新 npm 包 @petercjl/cloud-hug-style-transfer。
22
18
 
23
- 启用自动更新:
24
-
25
- > 请为 cloud-hug-style-transfer 开启兼容稳定版本的自动更新。
26
-
27
- 关闭自动更新:
28
-
29
- > 请关闭 cloud-hug-style-transfer 的自动更新与自动检测。
30
-
31
- 检查:
19
+ 每次更新只处理明确选中的当前 Agent,保留自定义元数据与更新前备份。同版本也会检查和修复 Skill。自动检测默认提示;自动安装需要单独授权。
32
20
 
33
- > 检查 cloud-hug-style-transfer 的安装与生图能力是否可用。
21
+ ## 使用
34
22
 
35
- 故障处理:
23
+ 附上图片并说明本次用途、输出数量和特殊要求。
36
24
 
37
- > 请诊断并修复 cloud-hug-style-transfer 的这次报错:粘贴报错内容。
25
+ > 请使用 cloud-hug-style-transfer,按所附图片和本次要求完成处理。
38
26
 
39
- 安装、更新与检查由 Agent 执行包内 CLI。包的 `skill source --json` 提供规范来源;Agent 随后调用 `skill install --agent <当前宿主>`,支持 `--root` 指定实际技能目录。业务入口自动检测更新,默认每24小时一次、2秒超时,并返回提示。可让 Agent 启用自动安装模式;兼容稳定版会在任务开始前备份、更新并同步受管 Skill,离线或本地修改时保留当前安装。0.x 自动更新限同 minor,1.x 起限同 major;其他版本由 Agent 提示处理。显式更新使用 stable latest,备份旧包并同步已登记的受管 Skill;npm 已是最新版时仍修复旧 Skill 与兼容元数据,返回安装位置、来源、校验、备份和耗时。包升级失败时恢复旧包;离线保留当前安装。已有独立安装或本地修改将停止覆盖并报告。源码或上层工具管理的包由其拥有者更新。
27
+ 账号、服务访问与付费生成按各自授权执行。安装不授予服务权限。
40
28
 
41
- 兼容证据分别记录安装机制与生图效果。CI 覆盖 macOS、Windows、Linux 的包管理机制;宿主实际生成需使用各自账户独立验证。品牌与输入素材须具备相应使用权;公开 npm 分发不转让商标与素材的独立再分发权。
29
+ ## Agent 执行合同
42
30
 
43
- 开发者依赖合同:`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。
31
+ [安装合同](INSTALL.md) · [更新与恢复合同](UPDATE.md)。CLI 通过 `skill source --json` 返回规范来源。安装后的 Skill 使用自身 `scripts/run.mjs`,运行代码与依赖位于自身 `.runtime`。宿主适配记录能力差异与实际测试证据,不作为支持白名单。
package/UPDATE.md ADDED
@@ -0,0 +1,29 @@
1
+ # Update for the current Agent
2
+
3
+ User prompt:
4
+
5
+ > 请更新 npm 包 @petercjl/cloud-hug-style-transfer。
6
+
7
+ Resolve the current Agent's exact Skill destination before replacement. Use its local `scripts/run.mjs` as the maintained execution entry. Run `update install --yes --agent AGENT --path EXACT_SKILL_DIR --json`. Only that selected target is touched. The bootstrap npm package is provenance, not the running target's dependency. Source checkouts are Git-owned; parent-managed installations follow their owner.
8
+
9
+ The operation saves the true pre-replacement package, Skill and metadata snapshot, acquires a candidate with real npm into a target-scoped operation directory, verifies identity and dependencies, then activates the selected copy. Same-version updates repair stale or missing resources and receipts; fully current state is verified no-op. Host UI metadata is preserved separately. The Agent verifies the returned local entry, managed hashes and version, reloads the Skill, then confirms host-native discovery.
10
+
11
+ On timeout, disconnect or failure, inspect `update operation --path EXACT_SKILL_DIR --json` before attempting another install. Use `update resume --path EXACT_SKILL_DIR --operation UUID --yes --json` to reuse an acquired candidate and original backup. New installation is refused while a previous update is unresolved. Acquisition failure without a candidate requires explicit inspection; preserve the operation and snapshot. Never discard local edits to force recovery.
12
+
13
+ Automatic checks run at ordinary task entry, default to notification, have a two-second network deadline, a persistent 24-hour cache, offline backoff, a lock and opt-out. `update policy --mode off|notify|auto --yes --path EXACT_SKILL_DIR` controls policy. Automatic installation requires explicit standing authorization, a resolved target, and the same major version (same minor for 0.x). Help, version, source and task-following operations do not check the registry.
14
+
15
+ ## Historical migration
16
+
17
+ Legacy `--root PARENT` and explicit `--home AGENT_HOME` resolve only the supplied path. A historical `--mode link` with an explicit destination translates to physical-copy migration. Requests containing only a named Agent cannot safely determine a directory: they stop with TARGET_PATH_REQUIRED. For such older callers, first preserve their true old installation, acquire the new bootstrap package, and explicitly synchronize the resolved current target. An old parent's actions before handoff cannot be retroactively secured by the new receiver; see the package's historical compatibility evidence before claiming that updater path supported.
18
+
19
+ ## Verified historical support contract
20
+
21
+ The regression entry `npm run verify:historical` uses immutable published baseline bytes and real npm. Baselines are sealseek-media-cli 0.6.8, cloud-hug-style-transfer 0.5.0, and nano-product-replacement 0.2.1. Media and cloud support explicit-target old updater handoff. Nano 0.2.1 uses a new bootstrap with an explicit destination and explicit legacy package source; its published updater scans named hosts before handoff, so that old automatic route is excluded. Earlier installations use the same explicit migration contract after ownership verification; their original automatic updater behavior is not claimed tested.
22
+
23
+ `skill update --path EXACT_SKILL_DIR --legacy-source OLD_PACKAGE_ROOT --json` verifies the declared owning package and preserves the original installation before copying. `update rollback --path EXACT_SKILL_DIR --operation UUID --yes --json` restores a verified snapshot when the current target has no local edits. Host discovery is checked separately after recovery or rollback.
24
+
25
+ Legacy links require a verifiable owning-package integrity manifest; business edits made through a link are preserved and block replacement. If that old release has no integrity record, verify its exact published archive before choosing an explicit migration source.
26
+
27
+ ## Machine consumer contract
28
+
29
+ `skill source --json` and packaged capabilities expose `maintenanceContract` version 1: typed result-field mappings and explicit target option semantics. `--path` and `--target-directory` select the exact Skill directory; the supported legacy `--root` selects its parent and appends the canonical Skill name. Verify the returned target. Status retains boolean `current`/`edited` fields and exposes `up_to_date`, `editedFiles`, integrity verification and recovery actions. A matching current managed receipt can be reused within the same operation; host-native Skill loading completes the separately owned discovery phase. A fully current installation needs no reinstall or duplicate registry/tree checks.