siluzan-tso-cli 1.1.62-beta.3 → 1.1.62
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 +1 -2
- package/dist/index.js +52 -7
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/assets/website-diagnosis-rules.md +34 -0
- package/dist/skill/references/accounts/accounts-list.md +1 -1
- package/dist/skill/references/accounts/accounts-permissions.md +2 -2
- package/dist/skill/references/accounts/finance.md +1 -1
- package/dist/skill/references/accounts/open-account-by-media.md +1 -1
- package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
- package/dist/skill/references/analytics/rag.md +1 -1
- package/dist/skill/references/analytics/reporting.md +5 -5
- package/dist/skill/references/analytics/website-diagnosis-guide.md +20 -3
- package/dist/skill/references/core/playbooks.md +1 -1
- package/dist/skill/references/core/setup.md +5 -5
- package/dist/skill/references/misc/tso-home.md +2 -2
- package/dist/skill/references/report-templates/website-diagnosis-report.md +4 -3
- package/dist/skill/report-templates/website-diagnosis-report.html +67 -102
- package/dist/skill/report-templates/website-diagnosis-report.md +4 -3
- package/dist/skill/scripts/install.ps1 +3 -3
- package/dist/skill/scripts/install.sh +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ HTML 报告模板外部资源:**ECharts** 统一使用 `https://staticpn.siluz
|
|
|
43
43
|
在**用户的目标项目根目录**执行(根据用户使用的助手选择 `--ai`):
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npm install -g siluzan-tso-cli
|
|
46
|
+
npm install -g siluzan-tso-cli
|
|
47
47
|
siluzan-tso init --ai cursor # 写入 Cursor(默认)
|
|
48
48
|
siluzan-tso init --ai cursor,claude # 同时写入多个平台
|
|
49
49
|
siluzan-tso init --ai all # 写入所有支持的平台
|
|
@@ -51,7 +51,6 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
|
|
|
51
51
|
siluzan-tso init --force # 强制覆盖已存在文件
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
> **注意**:当前为测试版(1.1.62-beta.3),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
54
|
|
|
56
55
|
| 助手 | 建议 `--ai` |
|
|
57
56
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -4051,7 +4051,7 @@ var DEFAULT_API_BASE;
|
|
|
4051
4051
|
var init_defaults = __esm({
|
|
4052
4052
|
"src/config/defaults.ts"() {
|
|
4053
4053
|
"use strict";
|
|
4054
|
-
DEFAULT_API_BASE = "https://tso-api
|
|
4054
|
+
DEFAULT_API_BASE = "https://tso-api.siluzan.com";
|
|
4055
4055
|
}
|
|
4056
4056
|
});
|
|
4057
4057
|
|
|
@@ -7570,6 +7570,7 @@ var init_phrases_en = __esm({
|
|
|
7570
7570
|
"\u5C0F\u5E45\u4F18\u5316\u540E\u53EF\u76F4\u63A5\u6295\u653E\u5E7F\u544A": "Ready for ads after a few fixes",
|
|
7571
7571
|
"\u53EF\u76F4\u63A5\u6295\u653E\u5E7F\u544A": "Ready for ads",
|
|
7572
7572
|
"\u6025\u9700\u4F18\u5316\uFF01": "Needs urgent work",
|
|
7573
|
+
"\u672C\u6B21\u8BCA\u65AD\u672A\u5199\u5165\u884C\u52A8\u8BA1\u5212\u3002\u8BF7\u5728 diagnosis.json \u7684 priorityPlan \u4E2D\u6309\u672C\u7AD9\u672A\u6EE1\u5206\u9879\u7F16\u5199\u540E\u518D\u751F\u6210\u62A5\u544A\u3002": "This report has no action plan. Fill priorityPlan from this site's unfinished items, then render again.",
|
|
7573
7574
|
"\u9700\u8981\u91CD\u70B9\u4F18\u5316": "Needs focused work",
|
|
7574
7575
|
"\u7F51\u7AD9\u8868\u73B0\u4F18\u79C0\uFF0C\u8FDC\u9AD8\u4E8E\u884C\u4E1A\u5E73\u5747\u503C\uFF0C\u53EF\u653E\u5FC3\u5F00\u542F\u5E7F\u544A\u6295\u653E": "The site is well above the industry average and is ready for ads",
|
|
7575
7576
|
"\u7F51\u7AD9\u52A0\u8F7D\u901F\u5EA6\u5FEB\uFF0C\u9875\u9762\u54CD\u5E94\u53CA\u65F6\uFF0C\u8FBE\u5230\u884C\u4E1A\u9886\u5148\u6C34\u5E73": "The site loads quickly and is ahead of the industry",
|
|
@@ -121499,9 +121500,9 @@ function buildCampaignCreateStatusMarkdown(result, lang = "zh") {
|
|
|
121499
121500
|
``
|
|
121500
121501
|
);
|
|
121501
121502
|
}
|
|
121502
|
-
const
|
|
121503
|
+
const planItems2 = result.items.length > 0 ? result.items : result.missing.map((m) => ({ ...m, status: "missing" }));
|
|
121503
121504
|
for (const layer of LAYER_ORDER) {
|
|
121504
|
-
const layerItems =
|
|
121505
|
+
const layerItems = planItems2.filter((i) => i.layer === layer);
|
|
121505
121506
|
if (layerItems.length === 0) continue;
|
|
121506
121507
|
if (layer === "keyword" || layer === "ad") {
|
|
121507
121508
|
const byGroup = /* @__PURE__ */ new Map();
|
|
@@ -121630,11 +121631,11 @@ function formatBatchDiffGrouped(result) {
|
|
|
121630
121631
|
` \u9010\u9879\uFF1A\u2705 ${sc.ok} | \u274C ${sc.missing} | \u23ED ${sc.skipped}\uFF08\u7236\u7EA7\u7F3A\u5931\u8DF3\u8FC7\uFF09 | \u5408\u8BA1 ${result.items.length}`
|
|
121631
121632
|
);
|
|
121632
121633
|
console.log();
|
|
121633
|
-
const
|
|
121634
|
-
console.log(`\u2500\u2500 \u8BA1\u5212\u660E\u7EC6\uFF08\u5171 ${
|
|
121634
|
+
const planItems2 = result.items.length > 0 ? result.items : result.missing.map((m) => ({ ...m, status: "missing" }));
|
|
121635
|
+
console.log(`\u2500\u2500 \u8BA1\u5212\u660E\u7EC6\uFF08\u5171 ${planItems2.length} \u6761\uFF09\u2500\u2500`);
|
|
121635
121636
|
const configFile = result.configFile;
|
|
121636
121637
|
for (const layer of LAYER_ORDER) {
|
|
121637
|
-
const layerItems =
|
|
121638
|
+
const layerItems = planItems2.filter((m) => m.layer === layer);
|
|
121638
121639
|
if (layerItems.length === 0) continue;
|
|
121639
121640
|
if (layer === "keyword" || layer === "ad") {
|
|
121640
121641
|
printPlanItemsByAdGroup(configFile, layer, layerItems);
|
|
@@ -134765,12 +134766,13 @@ function buildDiagnosisScaffold(signals) {
|
|
|
134765
134766
|
};
|
|
134766
134767
|
}
|
|
134767
134768
|
);
|
|
134768
|
-
const agentHint = `\u811A\u624B\u67B6\u5DF2\u9884\u586B\u6570\u636E\u4E0D\u53EF\u7528\u9879\uFF08needsAgent=false \u52FF\u6539\u6210\u865A\u6784\u5206\uFF09\u3002\u8BF7\u4EC5\u8865\u5168 needsAgent=true \u7684\u6761\u76EE\uFF1A\u4F9D\u636E signals \u5199 issue/suggestion/score/status\uFF1B\u8865\u5168\u540E\u5220\u6389\u5404 item \u7684 needsAgent/_scaffold \u5B57\u6BB5\uFF08\u6216\u4FDD\u7559\u4EA6\u53EF\uFF0Crender \u5FFD\u7565\u672A\u77E5\u5B57\u6BB5\uFF09\uFF0C\u8BBE\u7F6E ratingId \u4E0E coreIssuesIds\uFF0C\u518D\u6267\u884C website-diagnosis render\u3002 ${signals.dataAvailability.agentHint}`;
|
|
134769
|
+
const agentHint = `\u811A\u624B\u67B6\u5DF2\u9884\u586B\u6570\u636E\u4E0D\u53EF\u7528\u9879\uFF08needsAgent=false \u52FF\u6539\u6210\u865A\u6784\u5206\uFF09\u3002\u8BF7\u4EC5\u8865\u5168 needsAgent=true \u7684\u6761\u76EE\uFF1A\u4F9D\u636E signals \u5199 issue/suggestion/score/status\uFF1B\u8865\u5168\u540E\u5220\u6389\u5404 item \u7684 needsAgent/_scaffold \u5B57\u6BB5\uFF08\u6216\u4FDD\u7559\u4EA6\u53EF\uFF0Crender \u5FFD\u7565\u672A\u77E5\u5B57\u6BB5\uFF09\uFF0C\u8BBE\u7F6E ratingId \u4E0E coreIssuesIds\u3002priorityPlan \u5FC5\u987B\u6309\u672C\u7AD9\u672A\u6EE1\u5206\u9879\u548C coreIssuesIds \u5199\u6210\u9AD8/\u4E2D/\u4F4E\u4E09\u6863\uFF08\u53EF\u7F3A\u6863\uFF09\uFF0C\u6BCF\u6761\u542B direction\u3001task\u3001adImpact\uFF0C\u7981\u6B62\u5957\u7528\u901A\u7528\u884C\u52A8\u6E05\u5355\uFF1B\u4E3A\u7A7A\u65F6 render \u4F1A\u5931\u8D25\u3002\u7136\u540E\u518D\u6267\u884C website-diagnosis render\u3002 ${signals.dataAvailability.agentHint}`;
|
|
134769
134770
|
return {
|
|
134770
134771
|
url: signals.url,
|
|
134771
134772
|
analyzedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
134772
134773
|
ratingId: "s3",
|
|
134773
134774
|
coreIssuesIds: [],
|
|
134775
|
+
priorityPlan: [],
|
|
134774
134776
|
modules,
|
|
134775
134777
|
signals,
|
|
134776
134778
|
...warn ? { lighthouseWarning: warn } : {},
|
|
@@ -135226,6 +135228,42 @@ function mergeCollectLighthouse(data, collect) {
|
|
|
135226
135228
|
...collect.lighthouseWarning && !data.lighthouseWarning ? { lighthouseWarning: collect.lighthouseWarning } : {}
|
|
135227
135229
|
};
|
|
135228
135230
|
}
|
|
135231
|
+
var PRIORITY_RANKS = /* @__PURE__ */ new Set(["\u9AD8", "\u4E2D", "\u4F4E", "High", "Medium", "Low", "high", "medium", "low"]);
|
|
135232
|
+
function planItems(group) {
|
|
135233
|
+
const items3 = group.items ?? group["\u4F18\u5316\u9879"];
|
|
135234
|
+
return Array.isArray(items3) ? items3 : [];
|
|
135235
|
+
}
|
|
135236
|
+
function priorityPlanError(data) {
|
|
135237
|
+
const raw = data.priorityPlan ?? data["\u4F18\u5316\u4F18\u5148\u7EA7"];
|
|
135238
|
+
if (!Array.isArray(raw) || raw.length === 0) {
|
|
135239
|
+
return "diagnosis.json \u7F3A\u5C11 priorityPlan\u3002\u7B2C\u56DB\u8282\u6309\u672C\u7AD9\u60C5\u51B5\u7531 Agent \u7F16\u5199\uFF0C\u4E0D\u80FD\u7559\u7A7A\u3002\u53EA\u6536\u5F55\u672A\u6EE1\u5206\u9879\u548C coreIssuesIds\uFF1A\u9AD8 / \u4E2D / \u4F4E \u53EF\u7F3A\u6863\uFF0C\u6BCF\u6761\u5199 direction\u3001task\u3001adImpact\u3002";
|
|
135240
|
+
}
|
|
135241
|
+
let itemCount2 = 0;
|
|
135242
|
+
for (const group of raw) {
|
|
135243
|
+
if (!group || typeof group !== "object" || Array.isArray(group)) {
|
|
135244
|
+
return "priorityPlan \u7684\u6BCF\u4E00\u6863\u5FC5\u987B\u662F\u5BF9\u8C61\uFF0C\u542B priority \u4E0E items\u3002";
|
|
135245
|
+
}
|
|
135246
|
+
const row = group;
|
|
135247
|
+
const priority = String(row.priority ?? row["\u4F18\u5148\u7EA7"] ?? "").trim();
|
|
135248
|
+
if (!PRIORITY_RANKS.has(priority)) {
|
|
135249
|
+
return `priorityPlan.priority \u53EA\u63A5\u53D7 \u9AD8|\u4E2D|\u4F4E\uFF0C\u6536\u5230\u300C${priority || "(\u7A7A)"}\u300D\u3002`;
|
|
135250
|
+
}
|
|
135251
|
+
const items3 = planItems(row);
|
|
135252
|
+
if (items3.length === 0) return `priorityPlan \u91CC\u300C${priority}\u300D\u4E00\u6863\u6CA1\u6709 items\uFF0C\u7A7A\u6863\u4E0D\u8981\u8F93\u51FA\u3002`;
|
|
135253
|
+
for (const item of items3) {
|
|
135254
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
135255
|
+
return "priorityPlan.items \u7684\u6BCF\u4E00\u6761\u5FC5\u987B\u542B direction \u4E0E task\u3002";
|
|
135256
|
+
}
|
|
135257
|
+
const card = item;
|
|
135258
|
+
const direction = String(card.direction ?? card["\u4F18\u5316\u65B9\u5411"] ?? "").trim();
|
|
135259
|
+
const task = String(card.task ?? card["\u5177\u4F53\u4EFB\u52A1"] ?? "").trim();
|
|
135260
|
+
if (!direction || !task) return "priorityPlan \u6BCF\u6761\u90FD\u8981\u5199 direction \u548C task\uFF0C\u4E14\u4E0D\u80FD\u662F\u7A7A\u5B57\u7B26\u4E32\u3002";
|
|
135261
|
+
itemCount2 += 1;
|
|
135262
|
+
}
|
|
135263
|
+
}
|
|
135264
|
+
if (itemCount2 === 0) return "priorityPlan \u6CA1\u6709\u4EFB\u4F55\u884C\u52A8\u9879\u3002";
|
|
135265
|
+
return null;
|
|
135266
|
+
}
|
|
135229
135267
|
function injectReportData(html, payload, lang) {
|
|
135230
135268
|
const localized = localizeReportHtml(html, lang);
|
|
135231
135269
|
const json = JSON.stringify(stampMetaLang(payload, lang)).replace(/</g, "\\u003c");
|
|
@@ -135243,6 +135281,13 @@ async function runWebsiteDiagnosisRender(opts) {
|
|
|
135243
135281
|
const collectRaw = await readJsonFile(path21.resolve(opts.collectFile));
|
|
135244
135282
|
data = mergeCollectLighthouse(data, asRecord5(collectRaw));
|
|
135245
135283
|
}
|
|
135284
|
+
const planError = priorityPlanError(data);
|
|
135285
|
+
if (planError) {
|
|
135286
|
+
console.error(`
|
|
135287
|
+
\u274C ${planError}
|
|
135288
|
+
`);
|
|
135289
|
+
process.exit(1);
|
|
135290
|
+
}
|
|
135246
135291
|
const lang = readReportLangOrExit({ flag: opts.lang, meta: data.meta });
|
|
135247
135292
|
const templatePath = websiteDiagnosisReportTemplatePath();
|
|
135248
135293
|
let html;
|
package/dist/skill/_meta.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- `url`:被诊断 URL
|
|
8
8
|
- `ratingId`:`s1`–`s5`
|
|
9
9
|
- `coreIssuesIds`:`ci1`–`ci10` 子集
|
|
10
|
+
- `priorityPlan[]`:第四节行动计划,**必填**。按本站未满分项编写,禁止套用固定清单
|
|
10
11
|
- `modules[]`:`{ id, score, items[] }`
|
|
11
12
|
- `items[]`:`{ id, score, status, issue, suggestion }`
|
|
12
13
|
- `status` 枚举:`Excellent` | `Good` | `Normal` | `Poor` | `Full` | `NeedImprove` | `Absent`
|
|
@@ -37,6 +38,39 @@
|
|
|
37
38
|
| ci9 | 缺少社媒分享入口 |
|
|
38
39
|
| ci10 | 品牌风格不统一 |
|
|
39
40
|
|
|
41
|
+
## priorityPlan(第四节行动计划,必写)
|
|
42
|
+
|
|
43
|
+
`website-diagnosis render` 在 `priorityPlan` 为空时直接失败,不会再用固定的「核心 Banner / 转化跟踪 / 移动端适配」清单。
|
|
44
|
+
|
|
45
|
+
只收录本站 `status` 为 `Poor` / `NeedImprove` / `Absent` / `Normal` 且未满分的子项,以及已勾选的 `coreIssuesIds`。满分项不要写进去。没有未满分项时,只写一档 `低`,说明保持现状,不要编造问题。
|
|
46
|
+
|
|
47
|
+
| `priority` | 放什么 | `period` |
|
|
48
|
+
| ---------- | ------------------------------ | -------- |
|
|
49
|
+
| `高` | Poor / Absent,或影响转化、广告 | `1-2周` |
|
|
50
|
+
| `中` | NeedImprove,或未满分的结构问题 | `2-4周` |
|
|
51
|
+
| `低` | 其余未满分的体验、品牌项 | `1-3个月` |
|
|
52
|
+
|
|
53
|
+
空档不要输出。每一档:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"priority": "高",
|
|
58
|
+
"period": "1-2周",
|
|
59
|
+
"impact": "首页没有表单,广告点击无法变成询盘",
|
|
60
|
+
"items": [
|
|
61
|
+
{
|
|
62
|
+
"itemId": "m1i8",
|
|
63
|
+
"direction": "首页补上询盘表单",
|
|
64
|
+
"task": "signals.hasForm=false。在首页首屏下增加不超过 4 个必填项的表单,并接到现有联系邮箱。",
|
|
65
|
+
"adImpact": "没有表单时,落地页点击无法计成转化,自动出价没有信号。"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- `direction` / `task` / `adImpact` 必须写本站事实(页面、signals 字段或第三节的 issue),禁止「优化体验」「提升质量分」这类空话。
|
|
72
|
+
- `meta.lang=en` 时这三个字段用英文。`priority` 仍用 `高` / `中` / `低`。
|
|
73
|
+
|
|
40
74
|
## m1 · 网站内容及结构(9 项)
|
|
41
75
|
|
|
42
76
|
| ID | 诊断项 | 满分 |
|
|
@@ -170,7 +170,7 @@ siluzan-tso account-history --start 2026-03-01 --end 2026-03-31 --json-out ./sna
|
|
|
170
170
|
| 状态 | 含义 | 下一步操作 |
|
|
171
171
|
| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
172
172
|
| `Pending` | 审核中 | 等待,可反复运行此命令轮询;审核周期因媒体而异 |
|
|
173
|
-
| `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www
|
|
173
|
+
| `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Yandex 当前没有对应充值界面) |
|
|
174
174
|
| `Rejected` | 被拒 | 查看 `--json-out` 落盘中的 `reason` 字段了解拒绝原因;修改资料后重新提交;若原因不明,引导用户联系丝路赞客服 |
|
|
175
175
|
|
|
176
176
|
---
|
|
@@ -490,7 +490,7 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
|
|
|
490
490
|
|
|
491
491
|
| 功能 | 媒体 | 网页路径 |
|
|
492
492
|
| --------------------------------------- | ------ | ------------------------------------------------- |
|
|
493
|
-
| **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www
|
|
493
|
+
| **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
|
|
494
494
|
|
|
495
495
|
**Agent 建议话术**:
|
|
496
496
|
|
|
@@ -499,5 +499,5 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
|
|
|
499
499
|
siluzan-tso config show # 查看 webUrl 字段
|
|
500
500
|
|
|
501
501
|
# 账户激活(Google)→ 引导至账户管理页
|
|
502
|
-
# https://www
|
|
502
|
+
# https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts
|
|
503
503
|
```
|
|
@@ -126,7 +126,7 @@ siluzan-tso config show
|
|
|
126
126
|
|
|
127
127
|
### 充值页链接(按媒体 × 类型)
|
|
128
128
|
|
|
129
|
-
链接模式:`https://www
|
|
129
|
+
链接模式:`https://www.siluzan.com/v3/foreign_trade/tso/recharge/<page>?mediaType=<mediaType>`;丝路赞钱包:`https://www.siluzan.com/v3/foreign_trade/tso/recharge/siluzanWallet`(无媒体参数)。
|
|
130
130
|
|
|
131
131
|
| 充值类型 | `<page>` | 支持媒体(`mediaType` 参数) |
|
|
132
132
|
| ------------------------- | --------------------- | ------------------------------------------- |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 各媒体开户
|
|
2
2
|
|
|
3
|
-
> 网页链接:`https://www
|
|
3
|
+
> 网页链接:`https://www.siluzan.com/v3/foreign_trade/tso/accountOpeningHistory?tso=%2Fv3umijs%2Ftso%2FaccountOpeningHistory`
|
|
4
4
|
> 多命令串联见 `references/core/workflows.md` § 流程一。
|
|
5
5
|
|
|
6
6
|
## Contents
|
|
@@ -65,7 +65,7 @@ siluzan-tso open-account google-wizard
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
siluzan-tso account-history -m Google
|
|
68
|
-
# 审核通过后:config show → https://www
|
|
68
|
+
# 审核通过后:config show → https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -190,9 +190,9 @@ siluzan-tso report push receive-emails -m Google [--json-out ./snap]
|
|
|
190
190
|
|
|
191
191
|
| 媒体 | 报告类型 | URL 模板 |
|
|
192
192
|
| ------ | ---------------- | ----------------------------------------------------------- |
|
|
193
|
-
| Google | 日报(Daily) | `https://www
|
|
194
|
-
| Google | 小时报(Hourly) | `https://www
|
|
195
|
-
| TikTok | 日报 | `https://www
|
|
193
|
+
| Google | 日报(Daily) | `https://www.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
|
|
194
|
+
| Google | 小时报(Hourly) | `https://www.siluzan.com/media-report/hour/{entityId}?culture=zh-CN` |
|
|
195
|
+
| TikTok | 日报 | `https://www.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
|
|
196
196
|
|
|
197
197
|
`entityId` 来自 `siluzan-tso report list --json-out ./snap` 中每条记录的 `entityId` 字段。
|
|
198
198
|
|
|
@@ -205,8 +205,8 @@ siluzan-tso report list -m Google --json-out ./snap
|
|
|
205
205
|
|
|
206
206
|
# 第二步:查看 webUrl
|
|
207
207
|
siluzan-tso config show
|
|
208
|
-
# webUrl: https://www
|
|
208
|
+
# webUrl: https://www.siluzan.com
|
|
209
209
|
|
|
210
210
|
# 第三步:拼接链接(Google 日报)
|
|
211
|
-
# https://www
|
|
211
|
+
# https://www.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
|
|
212
212
|
```
|
|
@@ -51,12 +51,13 @@ siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-we
|
|
|
51
51
|
3. 读落盘 `signals` / `dataAvailability`(CLI 已抽好:HTTPS、表单、CTA、GTM、社媒、Lighthouse 分数等)。
|
|
52
52
|
4. `website-diagnosis prepare --collect <collect.json>` → `diagnosis.scaffold.json`(**推荐**)。
|
|
53
53
|
5. Read `assets/website-diagnosis-rules.md`;**只补全**脚手架里 `needsAgent=true` 的子项(依据 `signals` 写 issue/suggestion/score);`needsAgent=false`(含 Lighthouse 不可用项)**禁止**改成虚构分。
|
|
54
|
-
6.
|
|
54
|
+
6. 写 `priorityPlan`:按本站未满分项和 `coreIssuesIds` 分高/中/低(规则见 `website-diagnosis-rules.md`)。禁止套用固定行动清单,禁止留空。
|
|
55
|
+
7. 落盘完整 `diagnosis.json` 后:
|
|
55
56
|
```bash
|
|
56
57
|
siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-web/<collect>.json --out ./snap-web/website-diagnosis-report.html
|
|
57
58
|
```
|
|
58
|
-
**禁止** Agent 手写/拼接 HTML;**禁止**只给 Markdown 或纯 JSON
|
|
59
|
-
|
|
59
|
+
**禁止** Agent 手写/拼接 HTML;**禁止**只给 Markdown 或纯 JSON 充当终稿。`priorityPlan` 为空时 render 失败,先补再跑。
|
|
60
|
+
8. **禁止编造**未在 `signals` / HTML / Lighthouse 中出现的指标。见下节「数据缺失降级」。
|
|
60
61
|
|
|
61
62
|
**在 TSO Copilot 网页内**:工具返回 `rendered: true` 时,前端已渲染卡片 +「查看详情」全页 HTML,Agent 只需简短确认,**勿重复贴报告正文**(见 tso_agent `prompt.py`)。
|
|
62
63
|
|
|
@@ -95,6 +96,21 @@ siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-we
|
|
|
95
96
|
"url": "https://www.example.com",
|
|
96
97
|
"ratingId": "s1",
|
|
97
98
|
"coreIssuesIds": ["ci1", "ci2"],
|
|
99
|
+
"priorityPlan": [
|
|
100
|
+
{
|
|
101
|
+
"priority": "高",
|
|
102
|
+
"period": "1-2周",
|
|
103
|
+
"impact": "本站这项对转化的影响",
|
|
104
|
+
"items": [
|
|
105
|
+
{
|
|
106
|
+
"itemId": "m4i2",
|
|
107
|
+
"direction": "本站现象的短标题",
|
|
108
|
+
"task": "依据 signals 或第三节 issue 写的具体动作",
|
|
109
|
+
"adImpact": "对这个站广告的影响"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
],
|
|
98
114
|
"modules": [
|
|
99
115
|
{
|
|
100
116
|
"id": "m1",
|
|
@@ -118,6 +134,7 @@ siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-we
|
|
|
118
134
|
| -------------------- | ------------------------------------------------------------------------------ |
|
|
119
135
|
| `ratingId` | `s1` 优秀 … `s5` 不建议投放(见规则文档评分等级) |
|
|
120
136
|
| `coreIssuesIds` | 从 `ci1`–`ci10` 选取适用项 |
|
|
137
|
+
| `priorityPlan` | 第四节。按本站未满分项写,空数组时 render 失败 |
|
|
121
138
|
| `modules[].id` | `m1`–`m6` 六板块均须出现 |
|
|
122
139
|
| `items[].suggestion` | 较差/需优化/缺失类 status → **「强烈建议:」** 开头;其余 → **「推荐优化:」** |
|
|
123
140
|
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
1. 确认完整 URL(`https://` 可省略,CLI 自动补全)。
|
|
177
177
|
2. 采集:`website-diagnosis collect --url <url> --json-out ./snap-web`(落盘含 `signals` / `dataAvailability`;`--include-html` 仅增大落盘,不改 signals)。
|
|
178
178
|
3. 脚手架:`website-diagnosis prepare --collect ./snap-web/<collect>.json`(Lighthouse 失败时 m2i1/m5i1 预填 Absent)。
|
|
179
|
-
4. 按 `signals` + `website-diagnosis-rules.md` 补全 `needsAgent=true`
|
|
179
|
+
4. 按 `signals` + `website-diagnosis-rules.md` 补全 `needsAgent=true` 项,并写 `priorityPlan`(只根据本站未满分项,禁止套用固定行动清单)→ 落盘 `diagnosis.json`。
|
|
180
180
|
5. 出 HTML:`website-diagnosis render --data ./diagnosis.json --collect ./snap-web/<collect>.json --out ./snap-web/website-diagnosis-report.html --lang <zh|en>`。
|
|
181
181
|
- **产物**:交付 HTML 路径;Lighthouse 缺失时性能项标「未测到」、禁止编造分;仅需历史 ARIT 分时用 `website-diagnosis search --ids <websiteDiagnoseId>`。
|
|
182
182
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
## 安装 CLI
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install -g siluzan-tso-cli
|
|
13
|
+
npm install -g siluzan-tso-cli
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
---
|
|
@@ -64,7 +64,7 @@ siluzan-tso config set --api-key <Key> # 或 config 直接写入
|
|
|
64
64
|
siluzan-tso config set --token <Token> # 备用:设置 JWT Token
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
API Key 获取入口:`https://www
|
|
67
|
+
API Key 获取入口:`https://www.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
# 第 1 步:让用户报出手机号后,立刻发码(命令立即返回,不会等待输入)
|
|
@@ -127,9 +127,9 @@ siluzan-tso config show
|
|
|
127
127
|
|
|
128
128
|
```
|
|
129
129
|
构建环境 : production
|
|
130
|
-
apiBaseUrl : https://tso-api
|
|
131
|
-
googleApiUrl : https://googleapi
|
|
132
|
-
webUrl : https://www
|
|
130
|
+
apiBaseUrl : https://tso-api.siluzan.com
|
|
131
|
+
googleApiUrl : https://googleapi.mysiluzan.com
|
|
132
|
+
webUrl : https://www.siluzan.com
|
|
133
133
|
apiKey : abcd****1234
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
siluzan-tso config show # 取 webUrl
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
首页地址:`https://www
|
|
9
|
+
首页地址:`https://www.siluzan.com/v3/foreign_trade/tso/home`
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ siluzan-tso config show # 取 webUrl
|
|
|
25
25
|
|
|
26
26
|
## 推荐话术
|
|
27
27
|
|
|
28
|
-
1. **「和首页一样的总览」** → 打开 `https://www
|
|
28
|
+
1. **「和首页一样的总览」** → 打开 `https://www.siluzan.com/v3/foreign_trade/tso/home`。
|
|
29
29
|
2. **「某个 Google 账户昨天花了多少」** → `list-accounts -m Google` + `stats -m Google -a <id>`。
|
|
30
30
|
3. **「有待充值账户」** → 说明聚合数据在首页;CLI 可 `list-accounts` + `balance` 逐户排查,或引导充值页。
|
|
31
31
|
|
|
@@ -23,7 +23,7 @@ siluzan-tso website-diagnosis collect --url <网站URL> --json-out ./out
|
|
|
23
23
|
siluzan-tso website-diagnosis prepare --collect ./out/<collect>.json --out ./out/diagnosis.scaffold.json
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
3. **补全诊断 JSON**:Agent 依据 `signals` + `assets/website-diagnosis-rules.md`,只改脚手架中 `needsAgent=true`
|
|
26
|
+
3. **补全诊断 JSON**:Agent 依据 `signals` + `assets/website-diagnosis-rules.md`,只改脚手架中 `needsAgent=true` 的项,并按本站未满分项写 `priorityPlan`,落盘 `./out/diagnosis.json`。**此步只能输出 JSON,不能输出 HTML。** `priorityPlan` 为空时下一步 render 会失败。
|
|
27
27
|
|
|
28
28
|
4. **用 JSON 调用 render 生成 HTML**(唯一允许产出 HTML 的方式):
|
|
29
29
|
|
|
@@ -48,7 +48,7 @@ siluzan-tso website-diagnosis render --data ./out/diagnosis.json [--collect ./ou
|
|
|
48
48
|
| `HealthOverview` | 总分、行业对比文案、`ratingId` 说明、**ECharts 雷达图** + 得分环 |
|
|
49
49
|
| `RiskMap` | `coreIssuesIds` 列表 + **模块得分横向条形图**(对齐前端 RiskMap) |
|
|
50
50
|
| `ModuleDetail` | 6 模块 × 子项:得分、status、issue、suggestion(表格或卡片) |
|
|
51
|
-
| `PriorityPlan` |
|
|
51
|
+
| `PriorityPlan` | 高/中/低行动计划,**只渲染** `priorityPlan`(Agent 按本站未满分项写) |
|
|
52
52
|
| `LoadingSpeed` | **Lighthouse 柱状对比图** + desktop/mobile 指标表;缺失时 callout 说明 |
|
|
53
53
|
| `LongtermValue` | 投放建议、长期优化价值(与 s1–s5 评级一致) |
|
|
54
54
|
|
|
@@ -75,7 +75,8 @@ siluzan-tso website-diagnosis render --data ./out/diagnosis.json [--collect ./ou
|
|
|
75
75
|
| `analyzedAt` | 诊断时间 |
|
|
76
76
|
| `ratingId` | 等级徽章(s1–s5 → 优秀…不建议投放) |
|
|
77
77
|
| `score` | 总分(可由 modules 汇总) |
|
|
78
|
-
| `coreIssuesIds` |
|
|
78
|
+
| `coreIssuesIds` | 已勾选的核心问题 id |
|
|
79
|
+
| `priorityPlan` | 第四节三列卡片:`priority` / `period` / `impact` / `items[]` |
|
|
79
80
|
| `modules[].id` | m1–m6 分节标题 |
|
|
80
81
|
| `modules[].items[]` | 子项行:诊断项名、得分/满分、issue、suggestion |
|
|
81
82
|
| `lighthouse` / `lighthouseResult` | LoadingSpeed 节(collect payload 为 `lighthouse`) |
|
|
@@ -696,6 +696,12 @@
|
|
|
696
696
|
gap: 24px;
|
|
697
697
|
}
|
|
698
698
|
|
|
699
|
+
.priority-empty {
|
|
700
|
+
grid-column: 1 / -1;
|
|
701
|
+
margin: 0;
|
|
702
|
+
color: var(--text-secondary, #4e5969);
|
|
703
|
+
}
|
|
704
|
+
|
|
699
705
|
.priority-column {
|
|
700
706
|
display: flex;
|
|
701
707
|
flex-direction: column;
|
|
@@ -1334,80 +1340,6 @@
|
|
|
1334
1340
|
{ id: "ci10", issue: "品牌风格不统一", impact: "品牌可信度低", priority: "低" },
|
|
1335
1341
|
];
|
|
1336
1342
|
|
|
1337
|
-
const PRIORITY_GROUP_DATA = [
|
|
1338
|
-
{
|
|
1339
|
-
优先级: "高",
|
|
1340
|
-
执行周期: "1-2周",
|
|
1341
|
-
影响内容: "影响转化和广告投放",
|
|
1342
|
-
优化项: [
|
|
1343
|
-
{
|
|
1344
|
-
优化方向: "核心Banner与首屏CTA",
|
|
1345
|
-
具体任务: "优化Banner图片清晰度、风格统一;突出首屏核心CTA和价值主张",
|
|
1346
|
-
广告影响说明: "提升Landing Page Experience评分,降低跳出率,直接影响Quality Score",
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
优化方向: "转化跟踪部署",
|
|
1350
|
-
具体任务: "部署GA4、GTM、Facebook Pixe等;设置表单提交、电话点击事件",
|
|
1351
|
-
广告影响说明: "完整数据采集,支持自动出价和再营销,提高广告ROI",
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
优化方向: "移动端适配优化",
|
|
1355
|
-
具体任务: "响应式布局优化;按钮触控目标≥44px;检查移动端首屏加载",
|
|
1356
|
-
广告影响说明: "移动端体验直接影响广告质量分和移动端转化率",
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
优化方向: "页面加载速度优化",
|
|
1360
|
-
具体任务: "压缩图片、JS/CSS;使用缓存/CDN;优化首屏加载",
|
|
1361
|
-
广告影响说明: "提升Google Ads速度评分,降低CPC成本,提高广告排名",
|
|
1362
|
-
},
|
|
1363
|
-
],
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
优先级: "中",
|
|
1367
|
-
执行周期: "2-4周",
|
|
1368
|
-
影响内容: "影响用户体验",
|
|
1369
|
-
优化项: [
|
|
1370
|
-
{
|
|
1371
|
-
优化方向: "导航栏与页面布局调整",
|
|
1372
|
-
具体任务: "栏目精简,导航层级≤3;首屏信息层级清晰",
|
|
1373
|
-
广告影响说明: "提升用户体验,降低跳出率,增加表单提交概率",
|
|
1374
|
-
},
|
|
1375
|
-
{
|
|
1376
|
-
优化方向: "表单优化",
|
|
1377
|
-
具体任务: "字段≤6个,必填≤4个;自动校验和清晰错误提示",
|
|
1378
|
-
广告影响说明: "提升表单提交率,增加转化量,优化广告ROI",
|
|
1379
|
-
},
|
|
1380
|
-
{
|
|
1381
|
-
优化方向: "产品类目页与详情页内容优化",
|
|
1382
|
-
具体任务: "每页英文说明≥200词;每产品≥3张高清图;规格参数齐全",
|
|
1383
|
-
广告影响说明: "提高Ad Relevance和转化率,降低广告质量分惩罚",
|
|
1384
|
-
},
|
|
1385
|
-
],
|
|
1386
|
-
},
|
|
1387
|
-
{
|
|
1388
|
-
优先级: "低",
|
|
1389
|
-
执行周期: "1-3个月",
|
|
1390
|
-
影响内容: "优化细节提高美观或品牌感",
|
|
1391
|
-
优化项: [
|
|
1392
|
-
{
|
|
1393
|
-
优化方向: "全站语言统一",
|
|
1394
|
-
具体任务: "全站英文(除语言切换外)",
|
|
1395
|
-
广告影响说明: "保证广告与落地页语言一致,提升Ad Relevance",
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
优化方向: "品牌视觉统一",
|
|
1399
|
-
具体任务: "图片、Banner风格统一;字体、Logo、配色一致",
|
|
1400
|
-
广告影响说明: "提升品牌认知度和广告可信度,间接增加转化",
|
|
1401
|
-
},
|
|
1402
|
-
{
|
|
1403
|
-
优化方向: "社媒分享功能完善",
|
|
1404
|
-
具体任务: "添加OG标签、社交媒体Card;配置社媒分享按钮",
|
|
1405
|
-
广告影响说明: "提升社交可分享性,辅助再营销和广告推广",
|
|
1406
|
-
},
|
|
1407
|
-
],
|
|
1408
|
-
},
|
|
1409
|
-
];
|
|
1410
|
-
|
|
1411
1343
|
/** 对齐 useWebsiteGuide/config allModuleConfigs(仅渲染所需字段) */
|
|
1412
1344
|
const ALL_MODULE_CONFIGS = [
|
|
1413
1345
|
{
|
|
@@ -1782,46 +1714,79 @@
|
|
|
1782
1714
|
</div>`;
|
|
1783
1715
|
}
|
|
1784
1716
|
|
|
1785
|
-
function
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1717
|
+
function priorityRank(priority) {
|
|
1718
|
+
const p = String(priority || "").trim();
|
|
1719
|
+
if (p === "高" || p.toLowerCase() === "high") return "高";
|
|
1720
|
+
if (p === "低" || p.toLowerCase() === "low") return "低";
|
|
1721
|
+
if (p === "中" || p.toLowerCase() === "medium") return "中";
|
|
1722
|
+
return "";
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
/** 第四节只渲染 Agent 写入的 priorityPlan,不使用固定清单。 */
|
|
1726
|
+
function readPriorityPlan(data) {
|
|
1727
|
+
const raw = data && (data.priorityPlan || data["优化优先级"]);
|
|
1728
|
+
if (!Array.isArray(raw)) return [];
|
|
1729
|
+
return raw
|
|
1730
|
+
.map((group) => {
|
|
1731
|
+
const rank = priorityRank(group.priority || group["优先级"]);
|
|
1732
|
+
const items = (group.items || group["优化项"] || [])
|
|
1733
|
+
.map((item) => ({
|
|
1734
|
+
direction: String(item.direction || item["优化方向"] || "").trim(),
|
|
1735
|
+
task: String(item.task || item["具体任务"] || "").trim(),
|
|
1736
|
+
adImpact: String(item.adImpact || item["广告影响说明"] || "").trim(),
|
|
1737
|
+
}))
|
|
1738
|
+
.filter((item) => item.direction || item.task);
|
|
1739
|
+
return {
|
|
1740
|
+
rank,
|
|
1741
|
+
period: String(group.period || group["执行周期"] || "").trim(),
|
|
1742
|
+
impact: String(group.impact || group["影响内容"] || "").trim(),
|
|
1743
|
+
items,
|
|
1744
|
+
};
|
|
1745
|
+
})
|
|
1746
|
+
.filter((group) => group.rank && group.items.length > 0);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
function renderPriorityPlan(groups) {
|
|
1750
|
+
if (!groups.length) {
|
|
1751
|
+
return `<p class="priority-empty">本次诊断未写入行动计划。请在 diagnosis.json 的 priorityPlan 中按本站未满分项编写后再生成报告。</p>`;
|
|
1752
|
+
}
|
|
1753
|
+
return groups
|
|
1754
|
+
.map((group) => {
|
|
1755
|
+
const cls =
|
|
1756
|
+
group.rank === "高"
|
|
1757
|
+
? "priority-high"
|
|
1758
|
+
: group.rank === "中"
|
|
1759
|
+
? "priority-medium"
|
|
1760
|
+
: "priority-low";
|
|
1761
|
+
const title =
|
|
1762
|
+
group.rank === "高" ? "急需优化!" : group.rank === "中" ? "建议优化" : "推荐优化";
|
|
1763
|
+
const icon = group.rank === "高" ? "🔥" : group.rank === "中" ? "💡" : "🚩";
|
|
1764
|
+
const items = group.items
|
|
1765
|
+
.map(
|
|
1766
|
+
(item) => `
|
|
1803
1767
|
<div class="priority-item-card">
|
|
1804
|
-
<div class="item-header"><span class="item-bullet">•</span><h4 class="item-title-text">${escapeHtml(item
|
|
1805
|
-
<p class="item-description">${escapeHtml(item
|
|
1806
|
-
<div class="item-impact"><span class="impact-icon">↑</span><span class="impact-text">${escapeHtml(item
|
|
1768
|
+
<div class="item-header"><span class="item-bullet">•</span><h4 class="item-title-text">${escapeHtml(item.direction)}</h4></div>
|
|
1769
|
+
<p class="item-description">${escapeHtml(item.task)}</p>
|
|
1770
|
+
<div class="item-impact"><span class="impact-icon">↑</span><span class="impact-text">${escapeHtml(item.adImpact)}</span></div>
|
|
1807
1771
|
</div>`,
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1772
|
+
)
|
|
1773
|
+
.join("");
|
|
1774
|
+
return `
|
|
1811
1775
|
<div class="priority-column ${cls}">
|
|
1812
1776
|
<div class="priority-header">
|
|
1813
1777
|
<div class="priority-header-top">
|
|
1814
1778
|
<div class="priority-icon-wrapper"><span class="priority-icon">${icon}</span></div>
|
|
1815
1779
|
<div class="priority-info">
|
|
1816
1780
|
<h3 class="priority-title">${title}</h3>
|
|
1817
|
-
<div class="priority-badge">${escapeHtml(group
|
|
1781
|
+
<div class="priority-badge">${escapeHtml(group.period)}</div>
|
|
1818
1782
|
</div>
|
|
1819
1783
|
</div>
|
|
1820
|
-
<p class="priority-subtitle">${escapeHtml(group
|
|
1784
|
+
<p class="priority-subtitle">${escapeHtml(group.impact)}</p>
|
|
1821
1785
|
</div>
|
|
1822
1786
|
<div class="priority-items">${items}</div>
|
|
1823
1787
|
</div>`;
|
|
1824
|
-
|
|
1788
|
+
})
|
|
1789
|
+
.join("");
|
|
1825
1790
|
}
|
|
1826
1791
|
|
|
1827
1792
|
function renderLongtermValue() {
|
|
@@ -2050,7 +2015,7 @@
|
|
|
2050
2015
|
<p>行动计划以任务化方式呈现,您可以直接分配给团队执行。</p>
|
|
2051
2016
|
<p>高优先级任务可优先完成,快速释放广告投放价值!</p>
|
|
2052
2017
|
</div>
|
|
2053
|
-
<div class="priority-columns">${renderPriorityPlan()}</div>
|
|
2018
|
+
<div class="priority-columns">${renderPriorityPlan(readPriorityPlan(data))}</div>
|
|
2054
2019
|
</div>
|
|
2055
2020
|
|
|
2056
2021
|
<div class="report-section">
|
|
@@ -23,7 +23,7 @@ siluzan-tso website-diagnosis collect --url <网站URL> --json-out ./out
|
|
|
23
23
|
siluzan-tso website-diagnosis prepare --collect ./out/<collect>.json --out ./out/diagnosis.scaffold.json
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
3. **补全诊断 JSON**:Agent 依据 `signals` + `assets/website-diagnosis-rules.md`,只改脚手架中 `needsAgent=true`
|
|
26
|
+
3. **补全诊断 JSON**:Agent 依据 `signals` + `assets/website-diagnosis-rules.md`,只改脚手架中 `needsAgent=true` 的项,并按本站未满分项写 `priorityPlan`,落盘 `./out/diagnosis.json`。**此步只能输出 JSON,不能输出 HTML。** `priorityPlan` 为空时下一步 render 会失败。
|
|
27
27
|
|
|
28
28
|
4. **用 JSON 调用 render 生成 HTML**(唯一允许产出 HTML 的方式):
|
|
29
29
|
|
|
@@ -48,7 +48,7 @@ siluzan-tso website-diagnosis render --data ./out/diagnosis.json [--collect ./ou
|
|
|
48
48
|
| `HealthOverview` | 总分、行业对比文案、`ratingId` 说明、**ECharts 雷达图** + 得分环 |
|
|
49
49
|
| `RiskMap` | `coreIssuesIds` 列表 + **模块得分横向条形图**(对齐前端 RiskMap) |
|
|
50
50
|
| `ModuleDetail` | 6 模块 × 子项:得分、status、issue、suggestion(表格或卡片) |
|
|
51
|
-
| `PriorityPlan` |
|
|
51
|
+
| `PriorityPlan` | 高/中/低行动计划,**只渲染** `priorityPlan`(Agent 按本站未满分项写) |
|
|
52
52
|
| `LoadingSpeed` | **Lighthouse 柱状对比图** + desktop/mobile 指标表;缺失时 callout 说明 |
|
|
53
53
|
| `LongtermValue` | 投放建议、长期优化价值(与 s1–s5 评级一致) |
|
|
54
54
|
|
|
@@ -75,7 +75,8 @@ siluzan-tso website-diagnosis render --data ./out/diagnosis.json [--collect ./ou
|
|
|
75
75
|
| `analyzedAt` | 诊断时间 |
|
|
76
76
|
| `ratingId` | 等级徽章(s1–s5 → 优秀…不建议投放) |
|
|
77
77
|
| `score` | 总分(可由 modules 汇总) |
|
|
78
|
-
| `coreIssuesIds` |
|
|
78
|
+
| `coreIssuesIds` | 已勾选的核心问题 id |
|
|
79
|
+
| `priorityPlan` | 第四节三列卡片:`priority` / `period` / `impact` / `items[]` |
|
|
79
80
|
| `modules[].id` | m1–m6 分节标题 |
|
|
80
81
|
| `modules[].items[]` | 子项行:诊断项名、得分/满分、issue、suggestion |
|
|
81
82
|
| `lighthouse` / `lighthouseResult` | LoadingSpeed 节(collect payload 为 `lighthouse`) |
|
|
@@ -9,11 +9,11 @@ $ErrorActionPreference = 'Stop'
|
|
|
9
9
|
# -- Package info (injected at build time) ------------------------------------
|
|
10
10
|
$PKG_NAME = 'siluzan-tso-cli'
|
|
11
11
|
# PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
|
|
12
|
-
$PKG_VERSION = '1.1.62
|
|
12
|
+
$PKG_VERSION = '1.1.62'
|
|
13
13
|
$CLI_BIN = 'siluzan-tso'
|
|
14
14
|
$SKILL_LABEL = 'Siluzan TSO'
|
|
15
|
-
$INSTALL_CMD = 'npm install -g siluzan-tso-cli
|
|
16
|
-
$WEB_BASE = 'https://www
|
|
15
|
+
$INSTALL_CMD = 'npm install -g siluzan-tso-cli'
|
|
16
|
+
$WEB_BASE = 'https://www.siluzan.com'
|
|
17
17
|
|
|
18
18
|
# -- Constants ----------------------------------------------------------------
|
|
19
19
|
$NODE_MAJOR_MIN = 18
|
|
@@ -9,11 +9,11 @@ set -euo pipefail
|
|
|
9
9
|
# -- Package info (injected at build time) ------------------------------------
|
|
10
10
|
readonly PKG_NAME="siluzan-tso-cli"
|
|
11
11
|
# PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
|
|
12
|
-
readonly PKG_VERSION="1.1.62
|
|
12
|
+
readonly PKG_VERSION="1.1.62"
|
|
13
13
|
readonly CLI_BIN="siluzan-tso"
|
|
14
14
|
readonly SKILL_LABEL="Siluzan TSO"
|
|
15
|
-
readonly INSTALL_CMD="npm install -g siluzan-tso-cli
|
|
16
|
-
readonly WEB_BASE="https://www
|
|
15
|
+
readonly INSTALL_CMD="npm install -g siluzan-tso-cli"
|
|
16
|
+
readonly WEB_BASE="https://www.siluzan.com"
|
|
17
17
|
|
|
18
18
|
# -- Constants ----------------------------------------------------------------
|
|
19
19
|
readonly NODE_MAJOR_MIN=18
|