siluzan-tso-cli 1.1.52 → 1.1.53-beta.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/README.md +2 -1
- package/dist/index.js +2378 -1046
- package/dist/skill/SKILL.md +6 -5
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/assets/google-quarterly-report.schema.json +46 -0
- package/dist/skill/references/README.md +2 -0
- package/dist/skill/references/accounts/accounts-balance-stats.md +9 -5
- 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/account-analytics.md +1 -0
- package/dist/skill/references/analytics/rag.md +1 -1
- package/dist/skill/references/analytics/reporting.md +5 -5
- package/dist/skill/references/core/agent-conventions.md +1 -1
- package/dist/skill/references/core/cli-enums.md +9 -0
- package/dist/skill/references/core/intent-routing.md +14 -7
- package/dist/skill/references/core/playbooks.md +28 -6
- package/dist/skill/references/core/setup.md +5 -5
- package/dist/skill/references/core/tips.md +9 -5
- package/dist/skill/references/misc/tso-home.md +2 -2
- package/dist/skill/references/report-templates/README.md +1 -0
- package/dist/skill/references/report-templates/google-quarterly-report.md +100 -0
- package/dist/skill/report-templates/README.md +1 -0
- package/dist/skill/report-templates/google-quarterly-report.html +585 -0
- package/dist/skill/report-templates/google-quarterly-report.md +100 -0
- package/dist/skill/scripts/install.ps1 +3 -3
- package/dist/skill/scripts/install.sh +3 -3
- package/eval/cases/ir-p10-dazu-client-not-p4.scenario.json +27 -0
- package/eval/cases/ir-p10-monthly-plan-not-p4.scenario.json +27 -0
- package/eval/cases/ir-p10-quarterly-client-report.scenario.json +27 -0
- package/eval/cases/ir-p10-quarterly-not-p4.scenario.json +27 -0
- package/eval/cases/ir-p4-period-not-diagnosis.scenario.json +4 -1
- package/eval/cases/p10-quarterly-report.scenario.json +28 -0
- package/eval/cases/p3-cpa-scan-max-cpa.scenario.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Google 季度经营报告
|
|
2
|
+
|
|
3
|
+
> collect 只出事实;Agent 只写 `narrative`;`render` 注入 `google-quarterly-report.html`(大族版式 + ECharts)。
|
|
4
|
+
> **禁止** Read HTML 模板。行业数据不做。专项广告无量则整章隐藏。
|
|
5
|
+
>
|
|
6
|
+
> **触发(命中即 P10,勿改 P4/P9)**:月度报告、月总结与规划、季度报告、Q3 汇总、Q4 规划、季度汇报、投放季报、客户版、大族模板、下月规划;或「效率 + 区域询盘 + 国家明细 + 规划」。用户说月度则 `--start/--end` 用该月(默认上一完整自然月)。
|
|
7
|
+
|
|
8
|
+
## 询盘入场(硬规则)
|
|
9
|
+
|
|
10
|
+
CLI **不读** xlsx / csv / 截图。流程固定三步:
|
|
11
|
+
|
|
12
|
+
1. 用户给询盘载体(xlsx / csv / 截图 / 粘贴表,格式不限)。
|
|
13
|
+
2. **Agent** 抽行、归一后落盘 `./snap-p10/inquiries.json`,再 `--inquiries` 传给 collect。
|
|
14
|
+
3. collect → 只写 `narrative` → `render` 出 HTML。
|
|
15
|
+
|
|
16
|
+
**禁止**把原始 `.xlsx` / `.csv` 传给 `--inquiries`(会 `JSON.parse` 失败)。没有载体:可 `--inquiry-conversion <转化动作名>`;再没有则询盘位留空并脚注。**禁止编造询盘行。**
|
|
17
|
+
|
|
18
|
+
落盘 JSON:根为数组或 `{ "items": [...] }`。每行至少有国家 +(月份或日期):
|
|
19
|
+
|
|
20
|
+
| 用途 | 接受的键 | 归一 |
|
|
21
|
+
| ---- | -------- | ---- |
|
|
22
|
+
| 国家 | `国家` / `国家(中文)` / `country` / `countryZh` | 英文/缩写先译中文,与 geographic `countryNameZh` 对齐 |
|
|
23
|
+
| 月份 | `月份` / `month` / `ym` | `2026-04` 或 `4月份`(有日期则用日期年) |
|
|
24
|
+
| 日期 | `时间` / `date` / `time` | `YYYY-MM-DD`;Excel 序列号由 Agent 转好 |
|
|
25
|
+
| 产品 | `产品` / `product` | 可选 |
|
|
26
|
+
| 来源 | `客户来源` / `来源` / `source` | 可选 |
|
|
27
|
+
|
|
28
|
+
样例(字段名任选上表别名):
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
[
|
|
32
|
+
{ "月份": "4月份", "国家(中文)": "印度", "时间": "2026-04-12", "产品": "协作机器人", "客户来源": "WhatsApp" }
|
|
33
|
+
]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
e2e 对照:`src/commands/google-quarterly/test-fixtures/inquiries-q2-2026.xlsx`(给人看的样表)+ 同目录 `.json`(collect 真入口)。
|
|
37
|
+
|
|
38
|
+
## CLI
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
siluzan-tso google-quarterly collect \
|
|
42
|
+
-a <mediaCustomerId> --start 2023-07-01 --end 2023-09-30 \
|
|
43
|
+
--json-out ./snap-p10 \
|
|
44
|
+
--account-name "客户名" \
|
|
45
|
+
--inquiries ./inquiries.json # 可选;必须是上节 JSON,禁止传 xlsx
|
|
46
|
+
# --inquiry-conversion "表单提交" # 无询盘载体时用转化动作名称兜底
|
|
47
|
+
|
|
48
|
+
# Agent 撰写 ./snap-p10/google-quarterly.json(只含 narrative,勿改 kpis)
|
|
49
|
+
|
|
50
|
+
siluzan-tso google-quarterly render \
|
|
51
|
+
--data ./snap-p10/google-quarterly.json \
|
|
52
|
+
--collect ./snap-p10/google-quarterly-collect.json \
|
|
53
|
+
--out ./snap-p10/google-quarterly-report.html
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
省略 `--start/--end` 时 collect 用上一完整自然季(上海日历)。
|
|
57
|
+
|
|
58
|
+
可选:`--keyword-seeds "a,b"` 走 Keyword Planner(标注数据源,禁止写成行业指数)。**不做**频道订阅总数、订阅来源饼、视频类型(要 YouTube Analytics / 人工分类)。YouTube 广告能拿到的曝光 / TrueView / 完播 / CPV / 频道 ID /(若已关联)广告带来订阅,collect 会写入 `specialAds` + `videosSummary`,render 直接展示。
|
|
59
|
+
|
|
60
|
+
Agent JSON Schema:`assets/google-quarterly-report.schema.json`。
|
|
61
|
+
|
|
62
|
+
## Spike(网关)
|
|
63
|
+
|
|
64
|
+
| 能力 | 官方 | Sammamish | CLI |
|
|
65
|
+
| ---- | ---- | --------- | --- |
|
|
66
|
+
| 消耗最高国一级行政区 | `geographic_view` + `geo_target_state` / `province` / `region` | `GET …/reports/geo/subdivisions`(可带 `countryCriterionId`) | collect 自动选本期花费最高国家;未发布或该国无分段则国家级回退 |
|
|
67
|
+
| YouTube 广告层 | `video` 资源:title / channel_id / TrueView / 四分位完播 / CPV | 已有 `GetVideoReport` | 专项章 KPI + 视频表;无量则隐藏整章 |
|
|
68
|
+
| 广告带来订阅 | Ads 转化动作名含 subscribe/订阅 | 已有 `conversion-actions` | 有则展示;**不是**频道粉数 |
|
|
69
|
+
|
|
70
|
+
## 事实字段(collect,禁止改)
|
|
71
|
+
|
|
72
|
+
| 字段 | 来源 |
|
|
73
|
+
| ---- | ---- |
|
|
74
|
+
| `kpis` / `monthly` | 系列加总;月度来自各月 `campaigns`,不是 daily-metrics |
|
|
75
|
+
| `inquiries` | Agent 转好的 JSON(`--inquiries`)优先;否则 `--inquiry-conversion`;再否则空,页脚注明口径 |
|
|
76
|
+
| `regions` / `countries` | 询盘按国家归并(印度/印尼单独成桶)+ 花费来自 geographic |
|
|
77
|
+
| `usStates` / `meta.drillCountry` | 下钻对象=本期花费最高国家;Sammamish `GET …/reports/geo/subdivisions`(`geo_target_state` / `province` / `region`);无分段则回退该国国家行,**不写死美国** |
|
|
78
|
+
| `specialAds` / `videosSummary` | YouTube 视频名 + Ads 视频指标 → PMax 系列名 → 其他非搜索 → `none`(HTML 隐藏整章)。不做订阅总数 / 来源饼 / 视频类型 |
|
|
79
|
+
| `planDefaults` | 花费 ×1.3~×1.5;**不**自动给 CPA/询盘目标 |
|
|
80
|
+
|
|
81
|
+
频道订阅总数、订阅来源、视频类型本报告不拉。
|
|
82
|
+
|
|
83
|
+
## Agent 只写 `narrative`
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"narrative": {
|
|
88
|
+
"executiveSummary": ["本期花费…", "询盘…"],
|
|
89
|
+
"sections": {
|
|
90
|
+
"efficiency": { "analysis": ["…"] },
|
|
91
|
+
"adType": { "analysis": ["…"] },
|
|
92
|
+
"region": { "analysis": ["…"] },
|
|
93
|
+
"summary": { "analysis": ["…"] }
|
|
94
|
+
},
|
|
95
|
+
"plan": { "analysis": ["下期花费目标取 collect.planDefaults.spendLow~spendHigh", "动作…"] }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
缺 `executiveSummary` / `sections.*.analysis` / `plan` 时 render 失败。
|
|
@@ -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.
|
|
12
|
+
$PKG_VERSION = '1.1.53-beta.2'
|
|
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.siluzan.com'
|
|
15
|
+
$INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
|
|
16
|
+
$WEB_BASE = 'https://www-ci.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.
|
|
12
|
+
readonly PKG_VERSION="1.1.53-beta.2"
|
|
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.siluzan.com"
|
|
15
|
+
readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
|
|
16
|
+
readonly WEB_BASE="https://www-ci.siluzan.com"
|
|
17
17
|
|
|
18
18
|
# -- Constants ----------------------------------------------------------------
|
|
19
19
|
readonly NODE_MAJOR_MIN=18
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ir-p10-dazu-client-not-p4",
|
|
3
|
+
"description": "大族模板 Q3 汇总 & Q4 规划客户版 — P10",
|
|
4
|
+
"turns": [
|
|
5
|
+
"按大族模板给 Google 账户 {{EVAL_ACCOUNT_READ}} 生成一份 Google Ads Q3 汇总 & Q4 规划客户版报告,按 SKILL 做。"
|
|
6
|
+
],
|
|
7
|
+
"judgeExpectation": "路径:大族模板 / 客户版 / Q3 汇总 & Q4 规划 → P10 google-quarterly,不是 P4 周期表,不是 P9。\n输出:collect → 写 narrative → render;不做行业数据。",
|
|
8
|
+
"skillMapping": "references/core/intent-routing.md · P10 vs P4",
|
|
9
|
+
"judgeReferencePaths": [
|
|
10
|
+
"references/core/intent-routing.md",
|
|
11
|
+
"references/core/playbooks.md",
|
|
12
|
+
"report-templates/google-quarterly-report.md"
|
|
13
|
+
],
|
|
14
|
+
"commandMustInclude": [
|
|
15
|
+
[
|
|
16
|
+
"google-quarterly"
|
|
17
|
+
]
|
|
18
|
+
],
|
|
19
|
+
"commandMustNotInclude": [
|
|
20
|
+
[
|
|
21
|
+
"google-ads-diagnosis"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"market-analysis"
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ir-p10-monthly-plan-not-p4",
|
|
3
|
+
"description": "谷歌广告月度报告+下月规划 — P10,不是 P4",
|
|
4
|
+
"turns": [
|
|
5
|
+
"帮我给 Google 账户 {{EVAL_ACCOUNT_READ}} 出一份谷歌广告月度报告,含效率、区域询盘、国家明细和 下月规划。按 SKILL 做。"
|
|
6
|
+
],
|
|
7
|
+
"judgeExpectation": "路径:月度报告且含效率/区域询盘/国家明细/下月规划 → P10 google-quarterly,不是「只要花费转化」的 P4。\n输出:collect 区间用该月或上一完整月;再写 narrative → render。",
|
|
8
|
+
"skillMapping": "references/core/intent-routing.md · P10 vs P4",
|
|
9
|
+
"judgeReferencePaths": [
|
|
10
|
+
"references/core/intent-routing.md",
|
|
11
|
+
"references/core/playbooks.md",
|
|
12
|
+
"report-templates/google-quarterly-report.md"
|
|
13
|
+
],
|
|
14
|
+
"commandMustInclude": [
|
|
15
|
+
[
|
|
16
|
+
"google-quarterly"
|
|
17
|
+
]
|
|
18
|
+
],
|
|
19
|
+
"commandMustNotInclude": [
|
|
20
|
+
[
|
|
21
|
+
"google-ads-diagnosis"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"market-analysis"
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ir-p10-quarterly-client-report",
|
|
3
|
+
"description": "谷歌广告季度客户报告 — P10",
|
|
4
|
+
"turns": [
|
|
5
|
+
"帮我给 Google 账户 {{EVAL_ACCOUNT_READ}} 做一份谷歌广告季度客户报告,按 SKILL 做。"
|
|
6
|
+
],
|
|
7
|
+
"judgeExpectation": "路径:季度客户报告 / 季度汇报 / 投放季报 → P10 google-quarterly。\n输出:collect → narrative → render HTML。",
|
|
8
|
+
"skillMapping": "references/core/intent-routing.md · P10",
|
|
9
|
+
"judgeReferencePaths": [
|
|
10
|
+
"references/core/intent-routing.md",
|
|
11
|
+
"references/core/playbooks.md",
|
|
12
|
+
"report-templates/google-quarterly-report.md"
|
|
13
|
+
],
|
|
14
|
+
"commandMustInclude": [
|
|
15
|
+
[
|
|
16
|
+
"google-quarterly"
|
|
17
|
+
]
|
|
18
|
+
],
|
|
19
|
+
"commandMustNotInclude": [
|
|
20
|
+
[
|
|
21
|
+
"google-ads-diagnosis"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"market-analysis"
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ir-p10-quarterly-not-p4",
|
|
3
|
+
"description": "季度经营报告+下期规划 — P10,不是 P4 周期表",
|
|
4
|
+
"turns": [
|
|
5
|
+
"Google 账户 {{EVAL_ACCOUNT_READ}} 出一份 Q2 季度经营报告,要汇总和 Q3 规划,按 SKILL 做。"
|
|
6
|
+
],
|
|
7
|
+
"judgeExpectation": "路径:用户要季度经营报告 / Q 汇总 & 下季规划 → P10 google-quarterly,不是 google-ads-diagnosis,也不是普通 google-analysis 周期 HTML。\n输出:说明 collect → 写 narrative → render;默认花费 +30%~+50%。",
|
|
8
|
+
"skillMapping": "references/core/intent-routing.md · P10 vs P4",
|
|
9
|
+
"judgeReferencePaths": [
|
|
10
|
+
"references/core/intent-routing.md",
|
|
11
|
+
"references/core/playbooks.md",
|
|
12
|
+
"report-templates/google-quarterly-report.md"
|
|
13
|
+
],
|
|
14
|
+
"commandMustInclude": [
|
|
15
|
+
[
|
|
16
|
+
"google-quarterly"
|
|
17
|
+
]
|
|
18
|
+
],
|
|
19
|
+
"commandMustNotInclude": [
|
|
20
|
+
[
|
|
21
|
+
"google-ads-diagnosis"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"market-analysis"
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"turns": [
|
|
5
5
|
"Google 账户 {{EVAL_ACCOUNT_READ}} 出一份 5 月份的月度投放报告,汇总花费和转化就行。"
|
|
6
6
|
],
|
|
7
|
-
"judgeExpectation": "
|
|
7
|
+
"judgeExpectation": "路径:用户只要某月花费/转化数据汇总、没有规划/客户版/大族结构 → P4(google-analysis 等拉数),不是 google-ads-diagnosis,也不是 google-quarterly。\n输出:说明周期报告与账户诊断区别;列出将用的拉数步骤。",
|
|
8
8
|
"skillMapping": "references/core/intent-routing.md · P4 vs P1",
|
|
9
9
|
"judgeReferencePaths": [
|
|
10
10
|
"references/core/intent-routing.md",
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
"commandMustNotInclude": [
|
|
22
22
|
[
|
|
23
23
|
"google-ads-diagnosis"
|
|
24
|
+
],
|
|
25
|
+
[
|
|
26
|
+
"google-quarterly"
|
|
24
27
|
]
|
|
25
28
|
]
|
|
26
29
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "p10-quarterly-report",
|
|
3
|
+
"description": "P10: 季度经营报告 — google-quarterly collect",
|
|
4
|
+
"turns": [
|
|
5
|
+
"请给 Google 账户 {{EVAL_ACCOUNT_READ}} 出一份 2026-04-01 至 2026-06-30 的季度经营报告,要 Q2 汇总和 Q3 规划。\n按 SKILL P10 用 siluzan-tso google-quarterly collect,加 --json-out。"
|
|
6
|
+
],
|
|
7
|
+
"judgeExpectation": "路径:季度经营复盘 + 下期规划应走 google-quarterly collect(可带 --json-out),不是 google-ads-diagnosis,也不是普通 google-analysis render。\n输出:应说明 collect → 写 narrative → render HTML;规划默认花费 +30%~+50%。",
|
|
8
|
+
"skillMapping": "Playbook P10 · Google 季度经营报告",
|
|
9
|
+
"commandMustInclude": [
|
|
10
|
+
[
|
|
11
|
+
"google-quarterly"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"collect"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"--json-out"
|
|
18
|
+
]
|
|
19
|
+
],
|
|
20
|
+
"commandMustNotInclude": [
|
|
21
|
+
[
|
|
22
|
+
"google-ads-diagnosis"
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"market-analysis"
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"turns": [
|
|
5
5
|
"请筛 Google 媒体下 2026-04-01 至 2026-04-15 CPA 高于 500 的账户。\n用 siluzan-tso accounts-digest,加 --max-cpa 500 与 --json-out ./snap-cpa;不要逐账户 stats。"
|
|
6
6
|
],
|
|
7
|
-
"judgeExpectation": "路径:多账户 CPA 筛查应使用 accounts-digest,并带 --max-cpa(或等价过滤)与 --json-out;可用 --start/--end 或 --start-date/--end-date。\n输出:交付高 CPA
|
|
7
|
+
"judgeExpectation": "路径:多账户 CPA 筛查应使用 accounts-digest,并带 --max-cpa(或等价过滤)与 --json-out;可用 --start/--end 或 --start-date/--end-date。\n输出:交付高 CPA 命中表(零转化仅当消耗已超阈值)或「无命中」/全部正常句;优先贴 agentBrief.userDelivery;禁止只落盘不说明。",
|
|
8
8
|
"skillMapping": "Playbook P3 · §零·D 转化成本巡检",
|
|
9
9
|
"commandMustInclude": [
|
|
10
10
|
[
|