@petercjl/taobao-ai-ops 0.3.1 → 0.4.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 +22 -9
- package/package.json +1 -1
- package/skills/taobao-ai-operations/SKILL.md +13 -2
- package/skills/taobao-ai-operations/agents/openai.yaml +1 -1
- package/src/cli.mjs +3 -3
- package/src/runtime.mjs +13 -2
- package/suite-manifest.json +48 -2
package/README.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
## 安装与更新
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
taobao-ai-ops
|
|
10
|
-
taobao-ai-ops doctor --json
|
|
11
|
-
taobao-ai-ops update check --json
|
|
12
|
-
taobao-ai-ops update install --agent codex --yes --json
|
|
13
|
-
```
|
|
7
|
+
将提示词发送给准备使用的 Agent,安装与检查由 Agent 完成。
|
|
8
|
+
|
|
9
|
+
> 请安装 npm 包 @petercjl/taobao-ai-ops。
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
> 请更新 npm 包 @petercjl/taobao-ai-ops。
|
|
12
|
+
|
|
13
|
+
> 检查 taobao-ai-ops 的安装和组件是否可用。
|
|
14
|
+
|
|
15
|
+
支持 Codex、SealSeek 和 WorkBuddy;Agent 解析对应的实际技能目录。已有非套件管理的 Skill 会阻止覆盖;明确授权迁移后用 --adopt,保留完整备份。本地修改会阻止更新。
|
|
16
16
|
|
|
17
17
|
首次安装会获取清单中全部独立组件的正式 latest。统一更新检查套件及每个组件:套件版本不变也会更新组件。已安装组件的 Skill 同步可用 skill update;该命令只同步本地安装内容,不查询注册表。日常业务调用不更新环境,任务中保持已安装版本。
|
|
18
18
|
|
|
@@ -27,6 +27,7 @@ SealSeek 用户改用 --agent sealseek。目标有歧义时通过 SEALSEEK_SKILL
|
|
|
27
27
|
- @petercjl/commerce-ui:通用 HTML 报告 Skill、模板、渲染与校验。调用 `taobao-ai-ops component run html-report ...`;Python 依赖不足时通过该入口执行 `runtime install --yes`。
|
|
28
28
|
- @petercjl/procli:项目 SOP、任务依赖与成果归档,配套 `project-management` Skill。任务卡组织工作,项目 Wiki 积累可复用的证据与结论。
|
|
29
29
|
- @petercjl/sealseek-media-cli:生图、生视频、已有素材贴入及画板操作,配套 `sealseek-media` Skill。应用层负责素材选择与布局;接入不修改宿主的默认生图生视频路由。该组件需要 Node.js >=22。
|
|
30
|
+
- @petercjl/cloud-hug-style-transfer:抱抱云朵社品牌视觉转换,提供完整品牌素材、人物设定、摄影排版方法和效果验收流程。实际生图需要宿主参考图编辑能力。
|
|
30
31
|
- taobao-ai-operations:套件自带的管理与业务路由 Skill。
|
|
31
32
|
|
|
32
33
|
yccli 为取数时按需准备的外部工具,可用 TAOBAO_AI_OPS_YCCLI 指定;Excel 分析不需要 NAS、VPN 或平台登录。账号与授权留在包外,安装不会获得服务权限。
|
|
@@ -45,7 +46,7 @@ taobao-ai-ops component run procli knowledge index --project "项目名称" --js
|
|
|
45
46
|
|
|
46
47
|
向 Agent 明确说“用 procli”,并指定项目、任务及读取或归档目标。按当前 `project-management` Skill 解析真实名称和目标环境。项目读写需项目服务授权;发布钉钉文档还需官方 dws 与对应权限。服务不可访问时报告原目标错误并停止该操作,已有 Excel 研究可独立进行。套件不自动创建所有 SOP 任务、执行整条业务链或向项目写入研究结果;现有项目的真实 SOP 与依赖以 procli 读取结果为准。
|
|
47
48
|
|
|
48
|
-
##
|
|
49
|
+
## 开发者合同参考:调用与开发
|
|
49
50
|
|
|
50
51
|
```sh
|
|
51
52
|
taobao-ai-ops components status --json
|
|
@@ -78,3 +79,15 @@ Before every audio component invocation, the suite checks stable latest, install
|
|
|
78
79
|
- `1688-opportunity-sourcing-research`: six-category portfolio application from compatible opportunity handoffs.
|
|
79
80
|
|
|
80
81
|
Each component is an independent `@petercjl` npm package with its own canonical Skill. Use `skill source --name NAME`, `component run NAME ...`, or `tool run 1688cli ...`. The research profile includes all three and their Skill dependency closure. `components install --agent workbuddy --yes` supports the WorkBuddy managed target, alongside Codex and SealSeek; runtime QA remains host-specific.
|
|
82
|
+
|
|
83
|
+
## 抱抱云朵社品牌视觉制作
|
|
84
|
+
|
|
85
|
+
安装或更新套件时,独立组件 `@petercjl/cloud-hug-style-transfer` 纳入统一管理,仍保留独立版本和维护来源。已有套件用户更新后即可发现该节点。附上待转换图片;商品关键结构或文案不清楚时补充实拍或准确文字。
|
|
86
|
+
|
|
87
|
+
> 用抱抱云朵社风格转换处理所附图片。
|
|
88
|
+
|
|
89
|
+
只需要规划时:
|
|
90
|
+
|
|
91
|
+
> 用抱抱云朵社风格转换,为所附图片做转换规划。
|
|
92
|
+
|
|
93
|
+
套件检查组件来源与素材完整性,子 Skill 按当前品牌方法执行。Codex、SealSeek、WorkBuddy 的实际生成能力以各自宿主预检为准,安装成功不代表生成效果已验证。套件不复制该组件的品牌图片、方法或提示词;独立包的兼容更新通过显式套件更新进入。
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: taobao-ai-operations
|
|
3
|
-
description: Route Taobao research
|
|
3
|
+
description: Route Taobao research, sourcing and Cloud Hug brand visual production to independently managed tools; preserve evidence handoffs and explicit project-management authorization.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Taobao AI operations
|
|
7
7
|
|
|
8
|
-
Input: an operator's goal, supplied workbooks or authorized data sources, optional existing research and run directory. Output: the selected node's full deliverables, a versioned run plan and, when requested, an evidence-bound handoff. This suite
|
|
8
|
+
Input: an operator's goal, supplied workbooks or authorized data sources, optional existing research and run directory. Output: the selected node's full deliverables, a versioned run plan and, when requested, an evidence-bound handoff. This suite implements category/product research, sourcing and Cloud Hug brand visual production, with independently registered media/canvas tools. Other business requests require a matching registered node.
|
|
9
9
|
|
|
10
10
|
## Main line
|
|
11
11
|
|
|
12
12
|
1. Resolve the requested business result with `taobao-ai-ops nodes list --json`. A category/monthly market question uses `category-research`; a search-result workbook and concrete research object use `product-research`. Existing product scope can enter product research directly. If no supported node covers the request, report the missing node.
|
|
13
13
|
An explicit request to use `procli` for project/task information, SOP progression, knowledge reuse or result publication uses `project-management`. Preserve this child's explicit-trigger contract; offering project integration does not authorize service reads or writes. For an authorized project-backed research request, resolve the project and read its task context and compiled Wiki before selecting the business research node. Preserve the target profile, exact project/task identities, observation windows, provenance and unresolved questions in the handoff.
|
|
14
14
|
A supplied analysis or compatible ViewModel requiring a reusable HTML report uses `html-report`, whose exact Skill is `compact-commerce-ui`. It supplies reporting methods, not business conclusions; existing category/product outputs keep their own declared contracts.
|
|
15
|
+
A Cloud Hug brand conversion request for supplied detail pages, photography, main KV or SKU images uses `cloud-hug-style-transfer`; its brand-production contract is below.
|
|
15
16
|
2. Run `taobao-ai-ops doctor --node NODE --mode excel --json` for local workbooks, or `--mode nas` for live category data. Doctor checks deterministic resources; verify any listed native capabilities in the active Agent before their stage. A missing dependency ends the affected node with its exact error.
|
|
16
17
|
3. Resolve the exact child Skill with `taobao-ai-ops skill source --name SKILL --json`. Read its complete current SKILL.md, load its platform adapter, then follow only the child node's current reference routes. The logical dependencies are `yuce-category-opportunity-report` (method contract `yuce-category-opportunity@2.0`) and `taobao-search-product-form` (imported method `0.1.1`). Their returned artifacts and source hashes are the handoff; resolution or contract failure stops with CAPABILITY_UNAVAILABLE or OUTPUT_CONTRACT_FAILED. Return here at step 4 after the child completes. Naming a Skill alone is not execution.
|
|
17
18
|
4. Preserve the child's analysis, full HTML and evidence files. Use `taobao-ai-ops workflow plan --run-dir NEW_DIR --node NODE --input WORKBOOK --json` when a durable suite plan is requested; this records a plan and fixed suite/method versions, not business completion. The product node's own stage ledger remains authoritative for its detailed execution.
|
|
@@ -69,3 +70,13 @@ Before every audio component invocation, the suite checks stable latest, install
|
|
|
69
70
|
输入输出:关键词/图找货应用接收用户需求和约束,交付 HTML、完整商品 JSON 和查询视觉证据;六类应用接收兼容机会交接文件,交付类别组合报告及 sourcing-candidates.json。只有输入契约实际兼容时才串联上游研究结果,不把其他 JSON 当作机会交接文件。
|
|
70
71
|
|
|
71
72
|
调用应用用 `taobao-ai-ops component run <component> <arguments...>`,原子查询可用 `taobao-ai-ops tool run 1688cli products search "关键词"`。应用方法和模板由各自 npm 包拥有,独立升级。
|
|
73
|
+
|
|
74
|
+
## 抱抱云朵社品牌视觉制作
|
|
75
|
+
|
|
76
|
+
用户要求把旧详情页、产品摄影、主 KV 或 SKU 转为抱抱云朵社品牌视觉,或按当前模特设定延展画面时,选择 `cloud-hug-style-transfer` 节点。它由独立 npm 包 `@petercjl/cloud-hug-style-transfer` 拥有;套件只负责安装更新、精确来源解析、调用与检查。
|
|
77
|
+
|
|
78
|
+
先通过 `taobao-ai-ops skill source --name cloud-hug-style-transfer --json` 获取规范来源,完整读取当前 SKILL.md,按其中节点加载本轮参考与当前宿主适配,再回到本套件主线。执行前运行 `taobao-ai-ops doctor --node cloud-hug-style-transfer --json`:它核对组件资源、完整性及必需的 sealseek-media-cli 依赖,宿主仍须核验实际看图、命令执行及结果交付能力。组件业务 CLI 通过 `taobao-ai-ops component run cloud-hug-style-transfer ...` 调用;生图由 @petercjl/sealseek-media-cli 及其当前规范 sealseek-media Skill 统一执行,品牌判断由应用负责。
|
|
79
|
+
|
|
80
|
+
输入为当次源图、商品依据和用户目标,可补充已确认文案、比例和版式要求。输出为本轮约定数量的独立成图及简短验收说明,或仅要求的转换规划。品牌方法、人物与产品约束、素材选择、摄影与排版顺序、提示词、任务恢复及效果验收由子 Skill 的当前主线承接。遇到来源/合同不兼容、缺失资产或宿主能力不可用时,保留子层结构化错误并停止受影响阶段;满足条件后回到子层执行节点,完成后返回套件主线第 6 步交付。
|
|
81
|
+
|
|
82
|
+
独立包与素材不复制到套件。普通业务使用已安装版本;显式套件更新获取该组件的正式 latest 并同步受管 Skill。本应用依赖 sealseek-media-cli(0.6.1+)和配套 sealseek-media Skill;缺失或不兼容时暂停整个应用任务,给出“请安装 npm 包 @petercjl/sealseek-media-cli。”,安装并复查通过后恢复。模型和服务授权遵循媒体包当前合同,其他应用的生图路由保持各自合同。
|
package/src/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {spawnSync} from 'node:child_process';
|
|
|
3
3
|
import {MANIFEST,PACKAGE,nodeFor,source,nodeVersion,fileHashes,digest,fail,componentRecords,componentRecord} from './core.mjs';
|
|
4
4
|
import {checkComponents,installComponents,registerComponent,prepareComponentRun} from './components.mjs';
|
|
5
5
|
import {targetRoot,status,install} from './skill-manager.mjs';
|
|
6
|
-
import {runScript,doctor,toolEntry} from './runtime.mjs';
|
|
6
|
+
import {runScript,doctor,toolEntry,componentEnvironment} from './runtime.mjs';
|
|
7
7
|
import {plan,workflowStatus,createHandoff} from './workflow.mjs';
|
|
8
8
|
import {checkUpdate,installUpdate} from './update.mjs';
|
|
9
9
|
const print=v=>console.log(JSON.stringify(v,null,2));
|
|
@@ -15,11 +15,11 @@ export async function main(argv){
|
|
|
15
15
|
if(command==='script')return runScript(action,rest[0],rest.slice(1));
|
|
16
16
|
if(command==='component'&&action==='run'){
|
|
17
17
|
await prepareComponentRun(rest[0]);
|
|
18
|
-
const record=componentRecord(rest[0]);const r=spawnSync(process.execPath,[record.entry,...rest.slice(1)],{stdio:'inherit',env:
|
|
18
|
+
const record=componentRecord(rest[0]);const r=spawnSync(process.execPath,[record.entry,...rest.slice(1)],{stdio:'inherit',env:componentEnvironment(rest[0])});if(r.error)throw fail('EXECUTION_FAILED',r.error.message);process.exitCode=r.status??1;return;
|
|
19
19
|
}
|
|
20
20
|
if(command==='tool'&&action==='run'){
|
|
21
21
|
await prepareComponentRun(MANIFEST.tools[rest[0]]?.component);
|
|
22
|
-
const entry=toolEntry(rest[0]);const r=spawnSync(entry.command,[...entry.args,...rest.slice(1)],{stdio:'inherit',env:
|
|
22
|
+
const entry=toolEntry(rest[0]);const r=spawnSync(entry.command,[...entry.args,...rest.slice(1)],{stdio:'inherit',env:componentEnvironment(MANIFEST.tools[rest[0]]?.component)});if(r.error)throw fail('CAPABILITY_UNAVAILABLE',r.error.message);process.exitCode=r.status??1;return;
|
|
23
23
|
}
|
|
24
24
|
if(command==='nodes'&&action==='list')return print(MANIFEST.nodes);
|
|
25
25
|
if(command==='node'&&action==='show')return print(nodeFor(rest[0]));
|
package/src/runtime.mjs
CHANGED
|
@@ -3,7 +3,11 @@ import path from 'node:path';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import {spawnSync} from 'node:child_process';
|
|
5
5
|
import {createRequire} from 'node:module';
|
|
6
|
-
import {ROOT,MANIFEST,PACKAGE,nodeFor,source,componentRecord,fail} from './core.mjs';
|
|
6
|
+
import {ROOT,MANIFEST,PACKAGE,nodeFor,source,componentRecord,componentRecords,fail} from './core.mjs';
|
|
7
|
+
export function componentEnvironment(id,env=process.env){
|
|
8
|
+
const media=componentRecords()['sealseek-media'];
|
|
9
|
+
return {...env,TBCLI_UPDATE_CHECK:'0',SYCMCLI_DISABLE_AUTO_UPDATE:'1',SEEDAUDIO_AUTO_UPDATE:'0',SEALSEEK_MEDIA_AUTO_UPDATE:'0',COMPETITOR_CANVAS_AUTO_UPDATE:'0',...(id==='cloud-hug-style-transfer'&&media&&!env.CLOUD_HUG_MEDIA_ROOT?{CLOUD_HUG_MEDIA_ROOT:media.root}:{})};
|
|
10
|
+
}
|
|
7
11
|
export function pythonEnvironment(env=process.env){
|
|
8
12
|
return {...env,PYTHONUTF8:'1',PYTHONIOENCODING:'utf-8',PYTHONDONTWRITEBYTECODE:'1'};
|
|
9
13
|
}
|
|
@@ -73,6 +77,13 @@ export async function doctor(id,mode='excel'){
|
|
|
73
77
|
checks.push({id:'sealseek-media-runtime',ok:result.status===0&&version===record.version,value:version});
|
|
74
78
|
checks.push({id:'sealseek-media-contract',ok:fs.existsSync(path.join(source(n),'capabilities.json'))});
|
|
75
79
|
}
|
|
80
|
+
if(n.component==='cloud-hug-style-transfer'){
|
|
81
|
+
const record=componentRecord(n.component);
|
|
82
|
+
const result=spawnSync(process.execPath,[record.entry,'doctor','--json'],{encoding:'utf8',timeout:30000,env:componentEnvironment(n.component)});
|
|
83
|
+
let detail;try{detail=JSON.parse(result.stdout);}catch{detail={ok:false,code:'COMPONENT_DOCTOR_FAILED'};}
|
|
84
|
+
checks.push({id:'cloud-hug-node',ok:Number(process.versions.node.split('.')[0])>=22,value:process.version,minimum:22});
|
|
85
|
+
checks.push({id:'cloud-hug-component-integrity',ok:result.status===0&&detail.ok===true&&detail.package===MANIFEST.components[n.component].package&&detail.version===record.version&&detail.integrity?.ok===true,value:detail});
|
|
86
|
+
}
|
|
76
87
|
if(n.component==='competitor-visual-canvas'){
|
|
77
88
|
const record=componentRecord(n.component);
|
|
78
89
|
const result=spawnSync(process.execPath,[record.entry,'doctor','--json'],{encoding:'utf8',timeout:30000,env:{...process.env,COMPETITOR_CANVAS_AUTO_UPDATE:'0'}});
|
|
@@ -88,5 +99,5 @@ export async function doctor(id,mode='excel'){
|
|
|
88
99
|
}
|
|
89
100
|
if(!['excel','nas'].includes(mode))throw fail('USAGE','Doctor mode must be excel or nas');
|
|
90
101
|
if(mode==='nas'&&n.id==='category-research')for(const id of ['tbcli','yccli']){try{const tool=toolEntry(id);const r=spawnSync(tool.command,[...tool.args,'--version'],{encoding:'utf8',timeout:15000,env:{...process.env,TBCLI_UPDATE_CHECK:'0'}});checks.push({id,ok:r.status===0,value:r.stdout?.trim()});}catch(e){checks.push({id,ok:false,message:e.message});}}
|
|
91
|
-
return {ok:checks.every(c=>c.ok),package:PACKAGE.name,version:PACKAGE.version,node:n.id,mode,checks,native_requirements:n.native_requirements.map(id=>({id,status:'requires-active-agent-verification'})),service_access:mode==='nas'||['procli','sealseek-media','competitor-visual-canvas'].includes(n.component)||['1688cli','1688-product-sourcing','1688-opportunity-sourcing-research'].includes(n.component)?'not-probed':'not-required'};
|
|
102
|
+
return {ok:checks.every(c=>c.ok),package:PACKAGE.name,version:PACKAGE.version,node:n.id,mode,checks,native_requirements:n.native_requirements.map(id=>({id,status:'requires-active-agent-verification'})),service_access:mode==='nas'||['procli','sealseek-media','competitor-visual-canvas','cloud-hug-style-transfer'].includes(n.component)||['1688cli','1688-product-sourcing','1688-opportunity-sourcing-research'].includes(n.component)?'not-probed':'not-required'};
|
|
92
103
|
}
|
package/suite-manifest.json
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"product-sourcing",
|
|
16
16
|
"opportunity-sourcing",
|
|
17
17
|
"sealseek-media-tools",
|
|
18
|
-
"competitor-visual-canvas"
|
|
18
|
+
"competitor-visual-canvas",
|
|
19
|
+
"cloud-hug-style-transfer"
|
|
19
20
|
]
|
|
20
21
|
},
|
|
21
22
|
"nodes": [
|
|
@@ -45,7 +46,8 @@
|
|
|
45
46
|
"compact-commerce-ui",
|
|
46
47
|
"1688cli",
|
|
47
48
|
"1688-product-sourcing",
|
|
48
|
-
"1688-opportunity-sourcing-research"
|
|
49
|
+
"1688-opportunity-sourcing-research",
|
|
50
|
+
"cloud-hug-style-transfer"
|
|
49
51
|
],
|
|
50
52
|
"python_imports": [],
|
|
51
53
|
"scripts": [],
|
|
@@ -222,6 +224,38 @@
|
|
|
222
224
|
"python_imports": [],
|
|
223
225
|
"scripts": [],
|
|
224
226
|
"native_requirements": []
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"id": "cloud-hug-style-transfer",
|
|
230
|
+
"skill": "cloud-hug-style-transfer",
|
|
231
|
+
"component": "cloud-hug-style-transfer",
|
|
232
|
+
"stage": "visual-production",
|
|
233
|
+
"method_version": "cloud-hug-style-transfer@0.2",
|
|
234
|
+
"requires_skills": [
|
|
235
|
+
"sealseek-media"
|
|
236
|
+
],
|
|
237
|
+
"python_imports": [],
|
|
238
|
+
"scripts": [],
|
|
239
|
+
"native_requirements": [
|
|
240
|
+
"media.image.inspect",
|
|
241
|
+
"media.image.edit"
|
|
242
|
+
],
|
|
243
|
+
"input_contract": {
|
|
244
|
+
"required": [
|
|
245
|
+
"current source images",
|
|
246
|
+
"task intent"
|
|
247
|
+
],
|
|
248
|
+
"optional": [
|
|
249
|
+
"current product references",
|
|
250
|
+
"confirmed copy and layout constraints"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
"output_contract": {
|
|
254
|
+
"planning": "requested conversion plan",
|
|
255
|
+
"generation": "agreed number of separate raster images and acceptance summary",
|
|
256
|
+
"state": "child remains owner of generation task records and artifacts"
|
|
257
|
+
},
|
|
258
|
+
"contract_resolution": "Resolve canonical Skill and live capabilities through the component CLI; host preflight remains mandatory."
|
|
225
259
|
}
|
|
226
260
|
],
|
|
227
261
|
"tools": {
|
|
@@ -282,6 +316,11 @@
|
|
|
282
316
|
"package": "@petercjl/competitor-visual-canvas",
|
|
283
317
|
"component": "competitor-visual-canvas",
|
|
284
318
|
"role": "collect ordered product media links and arrange four regional Frames per product"
|
|
319
|
+
},
|
|
320
|
+
"cloud-hug-style-transfer": {
|
|
321
|
+
"package": "@petercjl/cloud-hug-style-transfer",
|
|
322
|
+
"component": "cloud-hug-style-transfer",
|
|
323
|
+
"role": "brand style conversion application; child owns product/reference selection, photography, prompts and acceptance"
|
|
285
324
|
}
|
|
286
325
|
},
|
|
287
326
|
"targets": {
|
|
@@ -388,6 +427,13 @@
|
|
|
388
427
|
"skills": [
|
|
389
428
|
"competitor-visual-canvas"
|
|
390
429
|
]
|
|
430
|
+
},
|
|
431
|
+
"cloud-hug-style-transfer": {
|
|
432
|
+
"package": "@petercjl/cloud-hug-style-transfer",
|
|
433
|
+
"bin": "cloud-hug-style-transfer",
|
|
434
|
+
"skills": [
|
|
435
|
+
"cloud-hug-style-transfer"
|
|
436
|
+
]
|
|
391
437
|
}
|
|
392
438
|
}
|
|
393
439
|
}
|