@petercjl/taobao-ai-ops 0.4.3 → 0.4.4
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 +10 -0
- package/package.json +1 -1
- package/skills/taobao-ai-operations/SKILL.md +15 -2
- package/src/runtime.mjs +19 -4
- package/src/subscription.mjs +5 -1
- package/suite-manifest.json +53 -2
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
- @petercjl/yuce-category-opportunity-report:24个月类目数据与相对容量路线、增长分析、双视图 HTML。
|
|
24
24
|
- @petercjl/taobao-search-product-form:搜索结果数据和商品形态研究、机会判断卡及 HTML。
|
|
25
|
+
- @petercjl/dmp-product-report:商品资料、经营、推广与新老客成交结构分析,自包含HTML报告;依赖套件管理的tbcli。
|
|
25
26
|
- @petercjl/tbcli:淘宝数据与 NAS 数据库工具,含其独立 Skill。
|
|
26
27
|
- @petercjl/sycmcli:店铺经营数据工具,含其独立 Skill。
|
|
27
28
|
- @petercjl/commerce-ui:通用 HTML 报告 Skill、模板、渲染与校验。调用 `taobao-ai-ops component run html-report ...`;Python 依赖不足时通过该入口执行 `runtime install --yes`。
|
|
@@ -91,3 +92,12 @@ Each component is an independent `@petercjl` npm package with its own canonical
|
|
|
91
92
|
> 用抱抱云朵社风格转换,为所附图片做转换规划。
|
|
92
93
|
|
|
93
94
|
套件检查组件来源与素材完整性,子 Skill 按当前品牌方法执行。Codex、SealSeek、WorkBuddy 的实际生成能力以各自宿主预检为准,安装成功不代表生成效果已验证。套件不复制该组件的品牌图片、方法或提示词;独立包的兼容更新通过显式套件更新进入。
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## 达摩盘商品经营报告
|
|
98
|
+
|
|
99
|
+
> 用dmp-product-report分析商品【商品ID】,生成完整HTML报告。
|
|
100
|
+
|
|
101
|
+
当前Agent通过 `dmp-product-report` 节点加载独立报告Skill,按需确认本店锚点。商品资料从橙色淘宝买家浏览器读取,DMP统计从蓝色商家电商浏览器读取;报告包含5张主图、店铺与页面指标,以及经营、推广、人群的四周期对比和8周趋势。子应用负责分析方法、独立模板、原始证据与最终校验。套件统一管理报告包和tbcli,保留独立包的升级边界。
|
|
102
|
+
|
|
103
|
+
开发者入口:`taobao-ai-ops doctor --node dmp-product-report --json`、`taobao-ai-ops component run dmp-product-report ...`。
|
package/package.json
CHANGED
|
@@ -5,11 +5,11 @@ description: Route Taobao research, sourcing and Cloud Hug brand visual producti
|
|
|
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 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.
|
|
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, DMP product operating reports 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
|
-
1. Resolve
|
|
12
|
+
1. For a Taobao/Tmall item ID requiring operating, promotion and new/returning-customer analysis, select `dmp-product-report`; its method and standalone report contract are below. Resolve other requested business results 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
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.
|
|
@@ -91,3 +91,16 @@ Before every audio component invocation, the suite checks stable latest, install
|
|
|
91
91
|
## Boardmix operations
|
|
92
92
|
|
|
93
93
|
For explicit Boardmix file, media or object operations, select `boardmix-tools`. Resolve `taobao-ai-ops skill source --name boardmixcli --json`, load the complete current Skill and discover live capabilities through `taobao-ai-ops component run boardmixcli capabilities --json`. Invoke its exact operations through that component entry. Inputs are the user-authorized file/media/object targets and placement; outputs are verified identifiers and readback evidence or structured recovery errors. Installation does not authorize service access. Collection and layout decisions remain with the competitor-visual application. Return to main-line step 6 after the capability completes.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## DMP 商品经营报告
|
|
97
|
+
|
|
98
|
+
用户提供淘宝/天猫商品ID,希望查看竞品经营趋势、推广方式/力度/效果、新老客成交结构或完整商品经营HTML报告时,选择 `dmp-product-report` 节点。独立拥有包为 `@petercjl/dmp-product-report`,逻辑Skill为 `dmp-product-report`;所需能力是 `@petercjl/tbcli` 的 DMP snapshot v1 与 itemSummary v1。兼容起点分别为报告包0.1.2、tbcli 0.11.3。
|
|
99
|
+
|
|
100
|
+
先运行 `taobao-ai-ops skill source --name dmp-product-report --json`,完整读取返回的当前Skill,按该Skill按需加载知识、适配与tbcli依赖,再运行 `taobao-ai-ops doctor --node dmp-product-report --json`。Doctor检查套件所选报告组件、Python与tbcli合同,不查询经营数据或证明账号权限。缺失/不兼容时保留结构化错误,恢复后回到预检;不借用另一全局tbcli来掩盖依赖问题。
|
|
101
|
+
|
|
102
|
+
通过 `taobao-ai-ops component run dmp-product-report ...` 执行子CLI主线。套件将其已注册tbcli入口传入应用;宿主能力集合的子Skill回执也包含同一依赖入口,任务内保留该版本集合。商品名称、链接、5张主图、店铺、已售、入口价和评价数由橙色淘宝买家浏览器读取;DMP统计由蓝色商家电商浏览器读取,两个角色的会话参数分别保留。登录和验证码由用户在对应窗口处理。
|
|
103
|
+
|
|
104
|
+
输入为目标商品ID,可补充已选本店锚点、报告日与新输出目录;已有证据可按子合同离线build/finalize。锚点未选时由子Skill列出本店商品供用户选择。输出包括自包含HTML、商品资料、近7天/前7天、近30天/前30天及8个完整自然周证据、CSV、ViewModel、分析和校验。run产生draft后继续按子Skill完成分析和finalize;一句结论与编号证据、经营策略解读及最终概览均由子应用的当前知识方法承接。返回套件主线第4步保留成果或第6步交付。
|
|
105
|
+
|
|
106
|
+
报告模板和分析知识继续由独立报告包维护,运行不依赖commerce-ui。套件负责注册、安装更新、精确Skill来源解析、依赖传递和预检。商品资料的页面展示口径与DMP分期统计分别解释;本次可用范围以平台实际返回为准。
|
package/src/runtime.mjs
CHANGED
|
@@ -4,10 +4,12 @@ import os from 'node:os';
|
|
|
4
4
|
import {spawnSync} from 'node:child_process';
|
|
5
5
|
import {createRequire} from 'node:module';
|
|
6
6
|
import {ROOT,MANIFEST,PACKAGE,nodeFor,source,componentRecord,componentRecords,fail} from './core.mjs';
|
|
7
|
-
export function componentEnvironment(id,env=process.env){
|
|
8
|
-
const
|
|
7
|
+
export function componentEnvironment(id,env=process.env,records=componentRecords()){
|
|
8
|
+
const media=records['sealseek-media'];
|
|
9
|
+
let reportEntries={};
|
|
10
|
+
if(id==='dmp-product-report'){if(!records.tbcli?.entry)throw fail('COMPONENT_NOT_INSTALLED','DMP report requires the registered tbcli component');reportEntries={DMP_REPORT_TBCLI_ENTRY:records.tbcli.entry,AGENT_PACKAGE_UPDATE_CHECK:'0'};}
|
|
9
11
|
const canvasEntries=id==='competitor-visual-canvas'?Object.fromEntries([['tbcli','TBCLI_ENTRY'],['sealseek-media','SEALSEEK_MEDIA_ENTRY'],['boardmixcli','BOARDMIXCLI_ENTRY']].filter(([key])=>records[key]?.entry).map(([key,variable])=>[variable,records[key].entry])):{};
|
|
10
|
-
return {...env,...canvasEntries,BOARDMIXCLI_UPDATE_CHECK:'0',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}:{})};
|
|
12
|
+
return {...env,...canvasEntries,...reportEntries,BOARDMIXCLI_UPDATE_CHECK:'0',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}:{})};
|
|
11
13
|
}
|
|
12
14
|
export function pythonEnvironment(env=process.env){
|
|
13
15
|
return {...env,PYTHONUTF8:'1',PYTHONIOENCODING:'utf-8',PYTHONDONTWRITEBYTECODE:'1'};
|
|
@@ -93,6 +95,19 @@ export async function doctor(id,mode='excel'){
|
|
|
93
95
|
checks.push({id:'boardmix-runtime',ok:result.status===0&&version===record.version,value:version});
|
|
94
96
|
checks.push({id:'boardmix-contract',ok:fs.existsSync(path.join(record.root,'capabilities.json'))});
|
|
95
97
|
}
|
|
98
|
+
if(n.component==='dmp-product-report'){
|
|
99
|
+
const record=componentRecord(n.component),records=componentRecords();
|
|
100
|
+
const atLeast=(value,min)=>{if(!/^\d+\.\d+\.\d+$/.test(value??''))return false;const a=value.split('.').map(Number),b=min.split('.').map(Number);for(let i=0;i<3;i++)if(a[i]!==b[i])return a[i]>b[i];return true;};
|
|
101
|
+
checks.push({id:'dmp-report-version',ok:atLeast(record.version,'0.1.2'),value:record.version,minimum:'0.1.2'});
|
|
102
|
+
checks.push({id:'dmp-report-tbcli',ok:atLeast(records.tbcli?.version,'0.11.3'),value:records.tbcli?.version??null,minimum:'0.11.3'});
|
|
103
|
+
try{
|
|
104
|
+
const environment=componentEnvironment(n.component);
|
|
105
|
+
const versionRun=spawnSync(process.execPath,[record.entry,'version','--json'],{encoding:'utf8',timeout:15000,env:environment});let version;try{version=JSON.parse(versionRun.stdout);}catch{}
|
|
106
|
+
checks.push({id:'dmp-report-runtime',ok:versionRun.status===0&&version?.package===MANIFEST.components[n.component].package&&version?.version===record.version,value:version?.version??null});
|
|
107
|
+
const result=spawnSync(process.execPath,[record.entry,'doctor','--json'],{encoding:'utf8',timeout:90000,env:environment});let detail;try{detail=JSON.parse(result.stdout||result.stderr);}catch{detail={ok:false,code:'COMPONENT_DOCTOR_FAILED'};}
|
|
108
|
+
checks.push({id:'dmp-report-capabilities',ok:result.status===0&&detail.ok===true&&detail.tbcliSnapshot===1&&detail.tbcliItemSummary===1,value:detail});
|
|
109
|
+
}catch(e){checks.push({id:'dmp-report-dependencies',ok:false,code:e.code??'CAPABILITY_UNAVAILABLE',message:e.message});}
|
|
110
|
+
}
|
|
96
111
|
if(n.component==='competitor-visual-canvas'){
|
|
97
112
|
const record=componentRecord(n.component);
|
|
98
113
|
const result=spawnSync(process.execPath,[record.entry,'doctor','--json'],{encoding:'utf8',timeout:30000,env:componentEnvironment(n.component)});
|
|
@@ -108,5 +123,5 @@ export async function doctor(id,mode='excel'){
|
|
|
108
123
|
}
|
|
109
124
|
if(!['excel','nas'].includes(mode))throw fail('USAGE','Doctor mode must be excel or nas');
|
|
110
125
|
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});}}
|
|
111
|
-
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','boardmixcli','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'};
|
|
126
|
+
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'||n.component==='dmp-product-report'||['procli','sealseek-media','boardmixcli','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'};
|
|
112
127
|
}
|
package/src/subscription.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import {spawn} from 'node:child_process';
|
|
4
|
+
import {componentEnvironment} from './runtime.mjs';
|
|
4
5
|
import {ROOT,PACKAGE,MANIFEST,fail,stat,fileHashes} from './core.mjs';
|
|
5
6
|
|
|
6
7
|
const stable=v=>typeof v==='string'&&/^\d+\.\d+\.\d+$/.test(v);
|
|
@@ -97,7 +98,10 @@ export async function collectionPrepare(opts,services={}){
|
|
|
97
98
|
const state=path.join(directory,'state');await fs.mkdir(state);
|
|
98
99
|
await fs.writeFile(path.join(state,'components.json'),JSON.stringify({schema_version:1,components:records}),{flag:'wx',mode:0o600});
|
|
99
100
|
const receipt={...plan,skillsDirectory:skills,skills:installed,environment:{TAOBAO_AI_OPS_STATE_DIR:state,TAOBAO_AI_OPS_AUTO_UPDATE:'0',AGENT_PACKAGE_UPDATE_CHECK:'0'}};
|
|
100
|
-
for(const skill of installed)
|
|
101
|
+
for(const skill of installed){
|
|
102
|
+
const environment=skill.package===MANIFEST.components['dmp-product-report']?.package?componentEnvironment('dmp-product-report',receipt.environment,records):receipt.environment;
|
|
103
|
+
await fs.writeFile(path.join(skill.directory,'.collection-runtime.json'),JSON.stringify({runtimeEntry:skill.runtimeEntry,environment,package:skill.package,version:skill.version}),{flag:'wx',mode:0o600});
|
|
104
|
+
}
|
|
101
105
|
await fs.writeFile(path.join(directory,'collection.json'),JSON.stringify(receipt,null,2),{flag:'wx',mode:0o600});
|
|
102
106
|
await fs.writeFile(path.join(directory,'integrity.json'),JSON.stringify(await fileHashes(skills)),{flag:'wx',mode:0o600});
|
|
103
107
|
return receipt;
|
package/suite-manifest.json
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"sealseek-media-tools",
|
|
18
18
|
"competitor-visual-canvas",
|
|
19
19
|
"cloud-hug-style-transfer",
|
|
20
|
-
"boardmix-tools"
|
|
20
|
+
"boardmix-tools",
|
|
21
|
+
"dmp-product-report"
|
|
21
22
|
]
|
|
22
23
|
},
|
|
23
24
|
"nodes": [
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
"1688cli",
|
|
49
50
|
"1688-product-sourcing",
|
|
50
51
|
"1688-opportunity-sourcing-research",
|
|
51
|
-
"cloud-hug-style-transfer"
|
|
52
|
+
"cloud-hug-style-transfer",
|
|
53
|
+
"dmp-product-report"
|
|
52
54
|
],
|
|
53
55
|
"python_imports": [],
|
|
54
56
|
"scripts": [],
|
|
@@ -269,6 +271,43 @@
|
|
|
269
271
|
"python_imports": [],
|
|
270
272
|
"scripts": [],
|
|
271
273
|
"native_requirements": []
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "dmp-product-report",
|
|
277
|
+
"skill": "dmp-product-report",
|
|
278
|
+
"component": "dmp-product-report",
|
|
279
|
+
"stage": "competitor-performance-research",
|
|
280
|
+
"method_version": "dmp-product-report@1",
|
|
281
|
+
"requires_skills": [
|
|
282
|
+
"tbcli"
|
|
283
|
+
],
|
|
284
|
+
"python_imports": [],
|
|
285
|
+
"scripts": [],
|
|
286
|
+
"native_requirements": [
|
|
287
|
+
"browser.report.inspect"
|
|
288
|
+
],
|
|
289
|
+
"input_contract": {
|
|
290
|
+
"required": [
|
|
291
|
+
"Taobao/Tmall item ID",
|
|
292
|
+
"authorized merchant and buyer browser sessions"
|
|
293
|
+
],
|
|
294
|
+
"optional": [
|
|
295
|
+
"explicit owned anchor ID",
|
|
296
|
+
"report date",
|
|
297
|
+
"new output directory",
|
|
298
|
+
"previous collected run for offline build/finalize"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"output_contract": {
|
|
302
|
+
"report": "standalone HTML with product identity, five main images, overview, operating metrics, promotion and customer composition",
|
|
303
|
+
"evidence": "12-period source snapshots, CSV, ViewModel, analyses and validation results",
|
|
304
|
+
"state": "child owns collection checkpoints, browser-role guards and report artifacts"
|
|
305
|
+
},
|
|
306
|
+
"required_component_contracts": {
|
|
307
|
+
"dmp-product-report": "0.1.2+; bundled renderer and finalization contract",
|
|
308
|
+
"tbcli": "0.11.3+; dmp snapshot version 1 and itemSummary version 1"
|
|
309
|
+
},
|
|
310
|
+
"contract_resolution": "Resolve current exact child Skill and CLI capabilities; preserve the selected merchant/buyer endpoints and returned data availability."
|
|
272
311
|
}
|
|
273
312
|
],
|
|
274
313
|
"tools": {
|
|
@@ -339,6 +378,11 @@
|
|
|
339
378
|
"package": "@petercjl/boardmixcli",
|
|
340
379
|
"component": "boardmixcli",
|
|
341
380
|
"role": "Boardmix browser/login recovery, files, images, native videos and explicit object operations"
|
|
381
|
+
},
|
|
382
|
+
"dmp-product-report": {
|
|
383
|
+
"package": "@petercjl/dmp-product-report",
|
|
384
|
+
"component": "dmp-product-report",
|
|
385
|
+
"role": "DMP product performance, promotion and customer composition report with buyer-page product identity"
|
|
342
386
|
}
|
|
343
387
|
},
|
|
344
388
|
"targets": {
|
|
@@ -459,6 +503,13 @@
|
|
|
459
503
|
"skills": [
|
|
460
504
|
"boardmixcli"
|
|
461
505
|
]
|
|
506
|
+
},
|
|
507
|
+
"dmp-product-report": {
|
|
508
|
+
"package": "@petercjl/dmp-product-report",
|
|
509
|
+
"bin": "dmp-product-report",
|
|
510
|
+
"skills": [
|
|
511
|
+
"dmp-product-report"
|
|
512
|
+
]
|
|
462
513
|
}
|
|
463
514
|
}
|
|
464
515
|
}
|