siluzan-tso-cli 1.1.18 → 1.1.19-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 +8 -7
- package/assets/siluzan-ads/references/hosted-automation-user-catalog.md +17 -19
- package/dist/index.js +1112 -874
- package/dist/skill/SKILL.md +66 -38
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/account-analytics.md +95 -88
- package/dist/skill/references/accounts.md +10 -9
- package/dist/skill/references/finance.md +5 -5
- package/dist/skill/references/google-ads-rules/google-ads-account-audit.md +1 -0
- package/dist/skill/references/google-ads-rules/google-ads-keyword-optimization.md +1 -1
- package/dist/skill/references/google-ads-rules/google-ads-landing-page-discovery-via-webfetch.md +72 -0
- package/dist/skill/references/google-ads-rules/google-ads-launch-plan-template.md +25 -16
- package/dist/skill/references/google-ads.md +236 -1025
- package/dist/skill/references/google-analysis-batch.md +53 -46
- package/dist/skill/references/hosted-automation-monitoring-json.md +10 -10
- package/dist/skill/references/hosted-automation-optimize-ab-winner.md +3 -3
- package/dist/skill/references/hosted-automation-optimize-index.md +5 -5
- package/dist/skill/references/hosted-automation-optimize-scale.md +2 -2
- package/dist/skill/references/hosted-automation-optimize-weak-downbid.md +5 -5
- package/dist/skill/references/hosted-automation-scenarios.md +5 -5
- package/dist/skill/references/hosted-automation-self-control.md +24 -23
- package/dist/skill/references/hosted-automation-user-catalog.md +17 -19
- package/dist/skill/references/keyword-planner-workflows.md +104 -0
- package/dist/skill/references/open-account-google-ui.md +0 -1
- package/dist/skill/references/reporting.md +2 -2
- package/dist/skill/references/setup.md +21 -22
- package/dist/skill/references/tips.md +2 -1
- package/dist/skill/references/tso-home.md +1 -1
- package/dist/skill/references/workflows.md +10 -4
- package/dist/skill/references/write-audit-restore.md +39 -6
- package/dist/skill/report-templates/README.md +1 -0
- package/dist/skill/report-templates/REPORT-WORKFLOW.md +4 -0
- package/dist/skill/report-templates/google-period-report.md +16 -16
- package/dist/skill/report-templates/okki-weekly-google-client.md +105 -0
- package/dist/skill/scripts/install.ps1 +2 -2
- package/dist/skill/scripts/install.sh +2 -2
- package/eval/cases/accounts-entityid-vs-mediaccustomerid.scenario.json +2 -14
- package/eval/cases/accounts-mcc-bind-inquiry.scenario.json +1 -3
- package/eval/cases/accounts-single-balance-not-bulk.scenario.json +3 -14
- package/eval/cases/budget-display-not-raw-micros.scenario.json +1 -8
- package/eval/cases/clue-meta-leads-json.scenario.json +2 -14
- package/eval/cases/clue-tiktok-leads-json.scenario.json +2 -11
- package/eval/cases/destructive-account-delink-needs-confirm.scenario.json +3 -9
- package/eval/cases/destructive-forewarning-delete-needs-confirm.scenario.json +3 -9
- package/eval/cases/destructive-invoice-apply-needs-confirm.scenario.json +3 -9
- package/eval/cases/finance-invoice-info-list.scenario.json +3 -11
- package/eval/cases/forewarning-list-google.scenario.json +3 -14
- package/eval/cases/google-ads-no-structural-without-confirm.scenario.json +2 -6
- package/eval/cases/google-analysis-keywords-route.scenario.json +2 -14
- package/eval/cases/human-p1-multiturn.scenario.json +1 -5
- package/eval/cases/meta-single-balance-not-bulk.scenario.json +3 -17
- package/eval/cases/open-account-bing-noninteractive.scenario.json +1 -4
- package/eval/cases/open-account-google-noninteractive.scenario.json +1 -3
- package/eval/cases/open-account-tiktok-license-file.scenario.json +1 -3
- package/eval/cases/optimize-list-by-account.scenario.json +3 -11
- package/eval/cases/p1-single-account-profile.scenario.json +1 -11
- package/eval/cases/p2-balance-scan-bulk.scenario.json +2 -9
- package/eval/cases/p3-accounts-digest.scenario.json +1 -5
- package/eval/cases/p4-period-report-window.scenario.json +1 -8
- package/eval/cases/report-list-google.scenario.json +2 -11
- package/eval/cases/report-push-list-google.scenario.json +2 -11
- package/eval/cases/reporting-vs-account-analytics-routing.scenario.json +1 -4
- package/eval/cases/setup-login-or-env.scenario.json +1 -3
- package/eval/cases/setup-siluzan-data-permission-env.scenario.json +1 -3
- package/eval/cases/skill-optimize-vs-google-ads-distinction.scenario.json +1 -4
- package/eval/cases/tiktok-bc-bind-inquiry.scenario.json +2 -6
- package/eval/cases/time-range-user-delegates-default.scenario.json +1 -8
- package/eval/cases/tips-json-filtering.scenario.json +1 -3
- package/eval/cases/tips-large-json-pagination.scenario.json +1 -3
- package/eval/cases/uj-ad-outdoor-campgear-search-plan.scenario.json +1 -3
- package/eval/cases/uj-analytics-30d-pdf-campaign-device-geo.scenario.json +6 -18
- package/eval/cases/uj-analytics-compare-google-tiktok-last-month-roi.scenario.json +1 -8
- package/eval/cases/uj-analytics-google-weekly-trends-campaigns-keywords.scenario.json +2 -11
- package/eval/cases/uj-analytics-report-push-weekly-email.scenario.json +1 -3
- package/eval/cases/uj-finance-invoice-records-this-month.scenario.json +2 -11
- package/eval/cases/uj-life-newbie-siluzan-google-end-to-end.scenario.json +1 -4
- package/eval/cases/uj-ops-google-accounts-list-normal.scenario.json +2 -14
- package/eval/cases/uj-ops-google-yesterday-spend-conversions.scenario.json +2 -14
- package/eval/cases/uj-ops-open-google-b2c-usd-shenzhen.scenario.json +1 -4
- package/eval/cases/uj-ops-pause-worst-adgroup-confirm.scenario.json +2 -6
- package/eval/cases/uj-ops-tiktok-leads-last-week.scenario.json +3 -17
- package/eval/cases/uj-patrol-cpc-spike-adgroups-over-15.scenario.json +2 -9
- package/eval/cases/uj-patrol-forewarning-create-daily-cap-3000.scenario.json +1 -3
- package/eval/cases/uj-patrol-forewarning-trigger-records.scenario.json +3 -17
- package/eval/cases/uj-patrol-google-balances-low.scenario.json +2 -11
- package/eval/cases/uj-roi-optimize-records-then-execute-cautiously.scenario.json +3 -14
- package/eval/cases/uj-roi-search-terms-add-negative-keywords.scenario.json +2 -14
- package/eval/stub-fixtures/balance-meta.json +3 -1
- package/eval/stub-fixtures/clue-meta.json +6 -1
- package/eval/stub-fixtures/clue-tiktok.json +3 -1
- package/eval/stub-fixtures/forewarning-create-ok.json +5 -1
- package/eval/stub-fixtures/forewarning-records.json +3 -1
- package/eval/stub-fixtures/google-analysis.json +81 -21
- package/eval/stub-fixtures/invoice-billable.json +3 -1
- package/eval/stub-fixtures/invoice-list.json +14 -2
- package/eval/stub-fixtures/report-push-list.json +3 -1
- package/package.json +2 -2
- package/scripts/postinstall.mjs +1 -2
package/dist/skill/SKILL.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: siluzan-tso
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Siluzan TSO 广告 skill(siluzan-tso-cli):Google/Bing/Yandex/TikTok/Kwai 账户开户、授权与分享、数据与消耗、Google 广告管理、发票与转账、优化报告与智能预警、TikTok/Meta 线索。
|
|
5
|
+
写 Google 搜索方案/计划/待确认结构表时先读 references/google-ads.md。
|
|
6
|
+
关键字规划师/拓词/竞品网址拓词/词包清洗/否词/建户关键词编排:先读 references/keyword-planner-workflows.md。
|
|
7
|
+
①竞品URL+种子拓词→JSON筛排TopN ②多种子长尾 ③月搜阈值与词根/意图洗词 ④google-analysis keywords 叠分批 keyword 市场指标 ⑤search-terms 与拓词对照否词线索 ⑥CPC/竞争度/搜索量筛高意图 ⑦否词表+ad keyword-negative-create ⑧Campaign→AdGroup→匹配表+ad 落地 ⑨keyword --json-out 供脚本复用。无 Forecast、无 Planner 官方按月 12 个月趋势接口。
|
|
8
|
+
运营「OKKI 周报」固定话术(如「使用okki周报模板生成…」)→ `report-templates/okki-weekly-google-client.md`,仅用现有 `stats`/`balance`/`google-analysis`,不新增拉数命令。
|
|
4
9
|
license: MIT
|
|
5
10
|
metadata:
|
|
6
11
|
requires: nodejs,siluzan-tso-cli
|
|
@@ -32,24 +37,26 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
32
37
|
|
|
33
38
|
## 功能以及对应文档
|
|
34
39
|
|
|
35
|
-
| 文档
|
|
36
|
-
|
|
37
|
-
| `references/setup.md`
|
|
38
|
-
| `references/workflows.md`
|
|
39
|
-
| `references/tips.md`
|
|
40
|
-
| `references/accounts.md`
|
|
41
|
-
| `references/open-account-by-media.md`
|
|
42
|
-
| `references/google-ads.md`
|
|
43
|
-
| `references/
|
|
44
|
-
| `references/
|
|
45
|
-
| `references/
|
|
46
|
-
| `references/
|
|
47
|
-
| `references/
|
|
48
|
-
| `references/
|
|
49
|
-
| `references/
|
|
50
|
-
| `references/
|
|
51
|
-
| `references/
|
|
52
|
-
| `
|
|
40
|
+
| 文档 | 功能 |
|
|
41
|
+
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `references/setup.md` | 安装、**登录(手机验证码优先)**、配置、环境切换、更新 |
|
|
43
|
+
| `references/workflows.md` | 多步骤业务流程、跨命令串联 |
|
|
44
|
+
| `references/tips.md` | **Agent 拉数一律 `--json-out`**(目录或 `*.json` 文件)+ 读 `cli-manifest[-<查询id>].json` / 各 `<section>[-<查询id>].json` + **`*.outline.txt`**(TS 式类型,**几百字节,描述完整字段结构**——写聚合脚本前先读它而不是 `Read` 整个 JSON,省 2~3 个数量级 context);stdout 一行摘要含 `manifestFile` / `writtenFiles` / `outlineFile` 等 |
|
|
45
|
+
| `references/accounts.md` | 账户列表、余额、消耗、开户记录、授权/解绑/分享/MCC/BC/BM/邮箱授权 |
|
|
46
|
+
| `references/open-account-by-media.md` | 各媒体开户、参数与资料要求 |
|
|
47
|
+
| `references/google-ads.md` | Google Ads 创建、修改、优化与管理;含 `ad list` 等读命令的 JSON 拒审字段。**搜索广告方案/计划**见本文开篇必读表与 `google-ads-rules/`(launch 模板、按需落地页推断专篇) |
|
|
48
|
+
| `references/keyword-planner-workflows.md` | Google 关键字推荐与拓词:`keyword` / `google-analysis` / `ad` 多命令编排;关键词规划师、执行步骤 |
|
|
49
|
+
| `references/reporting.md` | Siluzan TSO 优化报告(Google/TikTok)的生成、推送与查看 |
|
|
50
|
+
| `references/account-analytics.md` | 广告平台账户分析数据拉取与分析/诊断报告模板 |
|
|
51
|
+
| `references/google-analysis-batch.md` | **多账户 × 多维度** Google 数据批处理引擎(`run/resume/status`);产物目录、退出码、stdout 协议、错误分类、resume 语义 |
|
|
52
|
+
| `references/optimize.md` | AI 优化建议记录、详情与历史查询 |
|
|
53
|
+
| `references/clue.md` | TikTok / Meta 线索表单 |
|
|
54
|
+
| `references/forewarning.md` | Siluzan 智能预警规则与通知服务(仅微信推送);只负责创建,后续由 Siluzan 服务完成 |
|
|
55
|
+
| `references/hosted-automation-user-catalog.md` | 更强大的智能预警:预算/ROI 自控、异常监控、自动优化、自动化风控 |
|
|
56
|
+
| `references/finance.md` | 转账、开票、发票抬头、充值网页引导 |
|
|
57
|
+
| `references/write-audit-restore.md` | 本机写审计、`--commit`、补偿写 `audit restore-plan` / `restore-apply` |
|
|
58
|
+
| `report-templates/report-template.html` | 默认 HTML 报告样式参考 |
|
|
59
|
+
| `report-templates/okki-weekly-google-client.md` | **OKKI 周报**:固定客户话术 + 精简维度(`google-analysis` + `stats` + `balance`),见 Playbook P6 |
|
|
53
60
|
|
|
54
61
|
---
|
|
55
62
|
|
|
@@ -59,12 +66,12 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
59
66
|
|
|
60
67
|
## 职责划分
|
|
61
68
|
|
|
62
|
-
| 由 **本 Skill + CLI** 保证
|
|
63
|
-
|
|
64
|
-
| 单次/按需调用下,命令能拉取验证所需的 **结构化字段**(**Agent:`--json-out <目录>`** 落盘后读文件) | **何时**跑一轮检查(cron、事件、对话触发)
|
|
65
|
-
| 写操作命令语义清晰,文档给出 **写后如何用读命令复核**
|
|
66
|
-
| 金额与 ID 口径与文档一致(`*Display`、`entityId` vs `mediaCustomerId` 等)
|
|
67
|
-
| `references/google-ads.md` 等与命令、字段含义对齐
|
|
69
|
+
| 由 **本 Skill + CLI** 保证 | 由 **宿主客户端 / 外部调度** 负责 |
|
|
70
|
+
| --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
71
|
+
| 单次/按需调用下,命令能拉取验证所需的 **结构化字段**(**Agent:`--json-out <目录>`** 落盘后读文件) | **何时**跑一轮检查(cron、事件、对话触发) |
|
|
72
|
+
| 写操作命令语义清晰,文档给出 **写后如何用读命令复核** | **IF 条件**(多指标 AND/OR、滑动时间窗等)的计算与决策 |
|
|
73
|
+
| 金额与 ID 口径与文档一致(`*Display`、`entityId` vs `mediaCustomerId` 等) | 命中后的 **触达**(钉钉/飞书/Slack 等)与内部 **P1/工单** 流程 |
|
|
74
|
+
| `references/google-ads.md` 等与命令、字段含义对齐 | 多账户、多系列的 **批处理循环**、限速、失败重试策略 |
|
|
68
75
|
|
|
69
76
|
具体检查项见 `references/hosted-automation-self-control.md`、异常监控 JSON 键名见 `references/hosted-automation-monitoring-json.md`、自动优化见 `references/hosted-automation-optimize-index.md`、总览见 `references/workflows.md`。
|
|
70
77
|
|
|
@@ -85,6 +92,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
85
92
|
### 执行流程
|
|
86
93
|
|
|
87
94
|
**计划 → 确认 → 执行 → 验证 → 推测下一步**:
|
|
95
|
+
|
|
88
96
|
1. 读对应 references → 用 `-h` 确认命令 → 向用户输出操作计划
|
|
89
97
|
2. 涉及写入/修改/删除的操作必须与用户确认
|
|
90
98
|
3. 按计划执行,说明每步意图
|
|
@@ -111,6 +119,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
111
119
|
涉及"投放数据 / 消耗 / 报告 / 周报 / 月报 / 优化建议"的任务,用户未给明确起止日期时**必须反问**(示例:A) 最近完整自然周 B) 本月 1 号到昨天 C) 自定义 YYYY-MM-DD)。给出范围后,报告首行标注 `统计区间:YYYY-MM-DD ~ YYYY-MM-DD(货币:XXX)`。
|
|
112
120
|
|
|
113
121
|
**例外**(不反问):
|
|
122
|
+
|
|
114
123
|
- `list-accounts` 全量:用 `--json-out`,注意翻页
|
|
115
124
|
- 「昨天」单日 stats:默认 `Asia/Shanghai` 日历日;先 `list-accounts` 再 `stats`
|
|
116
125
|
- 仅持有 `entityId`:先 `list-accounts` 解析出 `mediaCustomerId`,禁止把 `entityId` 传给 `stats -a` / `balance -a`
|
|
@@ -118,31 +127,32 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
118
127
|
|
|
119
128
|
**默认值白名单**(仅用户明确授权"你决定"时使用):
|
|
120
129
|
|
|
121
|
-
| 场景
|
|
122
|
-
|
|
123
|
-
| 日常投放巡检 / 余额扫描 | `now - 7d` ~ `now - 1d`
|
|
124
|
-
| 周报
|
|
125
|
-
| 月报
|
|
126
|
-
| Google 关键词/系列分析
|
|
127
|
-
| MetaAd 账户分析
|
|
130
|
+
| 场景 | 默认窗口 |
|
|
131
|
+
| ----------------------- | ------------------------------- |
|
|
132
|
+
| 日常投放巡检 / 余额扫描 | `now - 7d` ~ `now - 1d` |
|
|
133
|
+
| 周报 | 上一个完整自然周(周一 ~ 周日) |
|
|
134
|
+
| 月报 | 上一个完整自然月(1 号 ~ 月末) |
|
|
135
|
+
| Google 关键词/系列分析 | `now - 30d` ~ `now - 1d` |
|
|
136
|
+
| MetaAd 账户分析 | 不得默认,必须问 |
|
|
128
137
|
|
|
129
138
|
### 金额与品牌名
|
|
130
139
|
|
|
131
140
|
- **永远使用 `*Display` 字段或表格展示值**做用户可见金额。报告/表格金额保留 2 位小数,写明货币代码(例如 `¥50.00 CNY`)。
|
|
132
141
|
- **`ad campaigns --json`/`--json-out`**:列表里的 **`budget` 已为 CLI 换算后的主币种「元」**(与 `ad campaign-edit --budget` 写参同口径),可直接作用户可见日预算;**勿再 ÷100**。见 `references/google-ads.md`「ad campaigns」。
|
|
133
|
-
- **`google-analysis` 落盘 `campaigns-*.json`**:常仅有 **`budgetAmount`(分,元=÷100)**,**禁止**误作微元 **÷1_000_000**;同文件 `spend` 等已为元。见 `references/account-analytics.md`、`references/tips.md`「campaigns
|
|
142
|
+
- **`google-analysis` 落盘 `campaigns-*.json`**:常仅有 **`budgetAmount`(分,元=÷100)**,**禁止**误作微元 **÷1_000_000**;同文件 `spend` 等已为元。见 `references/account-analytics.md`、`references/tips.md`「campaigns-\*.json」。
|
|
134
143
|
- **品牌名**必须来自(按优先级):(1) 用户明确提供 (2) `list-accounts` 返回的 `mag.advertiserName` (3) 用户提供的网址→域名占位并标注 `[待确认品牌名]`。**严禁**把英文域名自行翻译为虚构中文品牌。
|
|
135
144
|
|
|
136
145
|
### 批量任务硬约束
|
|
137
146
|
|
|
138
|
-
| 任务 |
|
|
139
|
-
|
|
140
|
-
| 多账户余额 / 预算不足预警
|
|
141
|
-
| 多账户投放画像 | `accounts-digest -m <媒体> [-a id1,id2,...] --start --end --json-out <dir>`(传 `-a` 时跳过清单翻页直接查;公司名 advertiserName
|
|
147
|
+
| 任务 | 推荐命令| 禁止做法|
|
|
148
|
+
| - | -------- | --------- |
|
|
149
|
+
| 多账户余额 / 预算不足预警 | `balance-scan -m <媒体> --threshold-days 7`(已知 ID 子集加 `-a id1,id2,...` 跳过翻页)| 逐账户循环 `balance --accounts ...`|
|
|
150
|
+
| 多账户投放画像 | `accounts-digest -m <媒体> [-a id1,id2,...] --start --end --json-out <dir>`(传 `-a` 时跳过清单翻页直接查;公司名 advertiserName 会缺失)| 逐账户 `stats`|
|
|
142
151
|
| 多账户 × 多维度 Google 数据 | **全量账号**:`google-analysis-batch run`(省略 `-a`)**2~10 子集**:`google-analysis -a id1,id2,...`(自动转发 batch);**≥10 子集或需 resume**:`google-analysis-batch run -a id1,id2,...` | 外层 for-loop;先跑 `list-accounts -m Google` 再把 ID 拼进 `-a` |
|
|
143
|
-
| 多系列诊断 | `ad campaigns --json-out <dir>` + node
|
|
152
|
+
| 多系列诊断 | `ad campaigns --json-out <dir>` + node 读文件过滤| 逐系列 `ad campaign-get`|
|
|
144
153
|
|
|
145
154
|
**`google-analysis-batch` 使用纪律**(详见 `references/google-analysis-batch.md`):
|
|
155
|
+
|
|
146
156
|
1. **拉全量 Google 数据时省略 `-a`**:CLI 内部自动拉清单,**禁止**先跑 `list-accounts -m Google` 再把 ID 拼进 `-a`。
|
|
147
157
|
2. 中断后**必须**用 `resume --run-id <id>` 续跑,**禁止**重新 `run`。
|
|
148
158
|
3. stdout 始终是单行 JSON(`kind=siluzan-tso-batch-summary`);进度读 `progress.json`、轨迹读 `state/tasks.jsonl`。
|
|
@@ -170,16 +180,20 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
170
180
|
### P2 · 多账户余额扫描
|
|
171
181
|
|
|
172
182
|
**全量巡检**:
|
|
183
|
+
|
|
173
184
|
```bash
|
|
174
185
|
siluzan-tso balance-scan -m BingV2 --threshold-days 7 --json-out ./snap-p2
|
|
175
186
|
# 可选:--min-balance 100 筛绝对余额;--target-days 60 算建议充值额
|
|
176
187
|
```
|
|
188
|
+
|
|
177
189
|
按 `remainingDays` 升序输出;消耗过低的僵尸账户不纳入预警。
|
|
178
190
|
|
|
179
191
|
**已知 ID 子集**(轻量画像,仅看几个号余额/续航):
|
|
192
|
+
|
|
180
193
|
```bash
|
|
181
194
|
siluzan-tso balance-scan -m Google -a id1,id2,id3 --json-out ./snap-p2-subset
|
|
182
195
|
```
|
|
196
|
+
|
|
183
197
|
跳过清单翻页,全部展示(不按阈值丢弃);`hitReason="none"` 表示该账户未触阈值。
|
|
184
198
|
|
|
185
199
|
### P3 · 多账户投放画像汇总
|
|
@@ -187,6 +201,7 @@ siluzan-tso balance-scan -m Google -a id1,id2,id3 --json-out ./snap-p2-subset
|
|
|
187
201
|
```bash
|
|
188
202
|
siluzan-tso accounts-digest -m Google -a id1,id2,... --start <S> --end <D> --json-out ./snap-p3
|
|
189
203
|
```
|
|
204
|
+
|
|
190
205
|
1. 反问时间范围后再执行。
|
|
191
206
|
2. 基于落盘 `data.items` 与 `meta.totals` 生成报告,**不要**再逐账户 `stats`。
|
|
192
207
|
3. 表格须覆盖用户请求的**每一个** ID;某 ID 未出现时仍占一行标注「未返回」。
|
|
@@ -198,6 +213,16 @@ siluzan-tso accounts-digest -m Google -a id1,id2,... --start <S> --end <D> --jso
|
|
|
198
213
|
2. 按 P1 步骤拿数据,用 `report-templates/google-period-report.md` 模板输出,首行标注统计区间和货币。
|
|
199
214
|
3. 报告须含:账户概览、投放趋势、Top 关键词/系列/地区分布、优化建议。
|
|
200
215
|
|
|
216
|
+
### P6 · OKKI 周报(客户同步话术,数据仍走现有 CLI)
|
|
217
|
+
|
|
218
|
+
> **触发**:用户话术含 **`使用okki周报模板`** / **`OKKI 周报`** / **`okki 周报`** 等,且指向 Google 账户 + 日期区间。
|
|
219
|
+
|
|
220
|
+
1. **不要**按 `google-period-report.md` 展开默认 8 维并追问追加;改读 **`report-templates/okki-weekly-google-client.md`** 全文并按其结构交付。
|
|
221
|
+
2. 确认 `mediaCustomerId` 与 `--start` / `--end`(未给齐则按上文「时间范围强制反问」)。
|
|
222
|
+
3. 同一 `--json-out` 目录执行模板中的命令组合:`list-accounts`(可选但推荐)、`stats`、`balance`、`google-analysis --sections overview,campaigns,keywords,search-terms,devices,geographic`。
|
|
223
|
+
4. **先 outline 后脚本**:读各 `*.outline.txt`,编写并执行代码从 JSON 填「客户话术」块;复盘与优化建议可附于后;可选按该模板「可选交付」节写多 Sheet Excel。
|
|
224
|
+
5. 遵守 SKILL 硬规范:金额 `*Display`、禁止手填业务数、禁止编造 ID。
|
|
225
|
+
|
|
201
226
|
### P5 · 多账户多维度报告
|
|
202
227
|
|
|
203
228
|
> 适用:账户数 ≥ 2 且需拉取 ≥ 2 个 google-analysis 维度。**禁止**外层 for-loop。
|
|
@@ -206,6 +231,7 @@ siluzan-tso accounts-digest -m Google -a id1,id2,... --start <S> --end <D> --jso
|
|
|
206
231
|
|
|
207
232
|
1. **反问时间范围 + 维度**(默认 `campaigns,geographic,keywords`,可按需追加)。
|
|
208
233
|
2. **执行**:
|
|
234
|
+
|
|
209
235
|
```bash
|
|
210
236
|
# 全量账号(推荐):省略 -a,CLI 自动拉清单
|
|
211
237
|
siluzan-tso google-analysis-batch run \
|
|
@@ -222,6 +248,7 @@ siluzan-tso accounts-digest -m Google -a id1,id2,... --start <S> --end <D> --jso
|
|
|
222
248
|
--sections campaigns,geographic,keywords \
|
|
223
249
|
--json-out ./snap-p5
|
|
224
250
|
```
|
|
251
|
+
|
|
225
252
|
3. **中断后只能 resume**:`siluzan-tso google-analysis-batch resume --json-out ./snap-p5 --run-id <runId>`
|
|
226
253
|
4. **只读进度**:`siluzan-tso google-analysis-batch status --json-out ./snap-p5 --run-id <runId>`
|
|
227
254
|
5. **产物消费**:每个账户产物在 `<json-out>/<runId>/results/<accountId>/<section>-<accountId>.json`,配套 `<section>-<accountId>.outline.txt` 与 `manifest-<accountId>.json`。
|
|
@@ -262,6 +289,7 @@ siluzan-tso accounts-digest -m Google -a id1,id2,... --start <S> --end <D> --jso
|
|
|
262
289
|
## 消息平台语法规范
|
|
263
290
|
|
|
264
291
|
需 webhook 等方式发送消息时,先阅读对应平台文档获取语法规范:
|
|
292
|
+
|
|
265
293
|
- 企业微信:https://developer.work.weixin.qq.com/document/path/99110
|
|
266
294
|
- 飞书:https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot
|
|
267
295
|
- 其他平台默认使用 markdown 输出
|
package/dist/skill/_meta.json
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
涉及"今天/当天/今日消耗""实时消耗排行"等问题时,**必须**先按此表确认接口口径,否则今天消耗会被误判为 0。
|
|
10
10
|
|
|
11
|
-
| 命令 / 接口
|
|
12
|
-
|
|
13
|
-
| `google-analysis --sections overview`(Google 网关 `OverviewSectionData`)
|
|
14
|
-
| `google-analysis --sections campaign-types`(`types-summary`)
|
|
15
|
-
| `google-analysis` 其他维度(`campaigns` / `keywords` / `devices` / ...)
|
|
11
|
+
| 命令 / 接口 | 时效性 | 能否查"今天" | 典型用途 |
|
|
12
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------------------------------------ |
|
|
13
|
+
| `google-analysis --sections overview`(Google 网关 `OverviewSectionData`) | **实时** | ✅ 可查当天 | 当天/今日消耗、当天高消耗账号排行 |
|
|
14
|
+
| `google-analysis --sections campaign-types`(`types-summary`) | **实时** | ✅ 可查当天 | 当天系列类型分布 |
|
|
15
|
+
| `google-analysis` 其他维度(`campaigns` / `keywords` / `devices` / ...) | 实时(受 Google Ads API 同步延迟影响) | 可查当天,但当天可能尚未结算 | 周期分析、报告 |
|
|
16
16
|
| `stats -m Google` / `balance-scan -m Google` / `accounts-digest -m Google` / `list-accounts -m Google` 合并消耗(TSO `account-spend-overview`,2026-05 起) | **后端自动分流**:窗口完全在历史 → `database` 模式(含余额/状态/币种/账户名 + 当期消耗);窗口含今天 → `googleCombined` 模式(仅实时消耗,无余额/状态/币种/账户名) | ✅ 可查当天(含今天时切实时聚合) | 历史回溯、巡检、余额续航估算;含今天时也能给出实时消耗 |
|
|
17
|
-
| `stats` / `balance-scan` / `accounts-digest` / `list-accounts` 的 **TikTok / Yandex / BingV2 / Kwai** 合并消耗(TSO `accountsoverview`)
|
|
18
|
-
| `balance`(`GetMediaAccountInfo`)
|
|
17
|
+
| `stats` / `balance-scan` / `accounts-digest` / `list-accounts` 的 **TikTok / Yandex / BingV2 / Kwai** 合并消耗(TSO `accountsoverview`) | **每日同步昨天** | ❌ 查今天会全为 0 | 历史回溯、巡检、余额续航估算(口径为"截至昨天") |
|
|
18
|
+
| `balance`(`GetMediaAccountInfo`) | 实时 | — | 仅当前余额,不反映消耗 |
|
|
19
19
|
|
|
20
20
|
**选用规则**:
|
|
21
21
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
## 默认做法(核心工作流)
|
|
31
31
|
|
|
32
32
|
1. **先确认统计区间**:用户未给明确起止日期时**必须反问**(参见 SKILL.md 时间范围强制反问)。
|
|
33
|
-
2. 确定报告维度(默认含:执行摘要、每日趋势、月度汇总、系列表现、设备分布、地域分布、关键词表现、优化建议),详见 `report-templates/README.md
|
|
33
|
+
2. 确定报告维度(默认含:执行摘要、每日趋势、月度汇总、系列表现、设备分布、地域分布、关键词表现、优化建议),详见 `report-templates/README.md`。若用户使用 **「使用 okki 周报模板…」「OKKI 周报」** 等固定话术发客户,改走 **`report-templates/okki-weekly-google-client.md`**(与 SKILL **P6** 一致),不再按 `google-period-report.md` 的默认 8 维追问。
|
|
34
34
|
3. **拉数**:使用 `google-analysis … --json-out <dir>`(Google)或对应 `report <media>-*` 命令落盘。
|
|
35
35
|
4. **编写并执行代码**从磁盘读取 `manifest-<accountId>.json` 与各 `<section>-<accountId>.json` 来完成筛选、聚合、排序等计算;**禁止**用 `Read` 看 JSON 后在对话里心算或手填报告数字。
|
|
36
36
|
- **写脚本前先读 `<section>-<accountId>.outline.txt`**(与 JSON 同 stem 的纯文本,最后一行是 TS 式类型字面量)了解字段结构;它体积只有几百字节、不含数据,比直接 `Read` 整个 `*.json`(动辄几 MB / 几万行)省**两到三个数量级**的上下文,不要 `require()`,用 `fs.readFileSync(outlineFile,'utf8')` 读最后一行即可。
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
**原则**:把拉数结果变成磁盘上的单一事实源,Agent 产出可执行脚本 + 模板骨架,由程序 **读取 JSON → 计算 → 写报告产物**。
|
|
47
47
|
|
|
48
48
|
**步骤**:
|
|
49
|
+
|
|
49
50
|
1. 创建 run 目录(如 `./siluzan-snapshots/run-20260429-google-<id>`)。
|
|
50
51
|
2. 执行 `siluzan-tso google-analysis -a <id> [--sections <a,b,c>] [--start/--end] --json-out <run目录>`。目录内生成 `<section>-<accountId>.json` 和 `manifest-<accountId>.json`。同一目录允许多账户共存。
|
|
51
52
|
3. **编写数据处理脚本**(Node.js/Python),从 `manifest-<accountId>.json` 读取文件路径,用标准库完成过滤/分组/求和/排序。所有展示数值须来自 JSON 对象字段,不得在源码中硬编码示例数据。
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
**stdout**:`--json-out` 模式下 CLI 只输出一行摘要 JSON(含 `absoluteSnapshotDir`、`writtenFiles`、`manifestFile` 等),完整数据一律从落盘文件读取。
|
|
55
56
|
|
|
56
57
|
**清单文件**:
|
|
58
|
+
|
|
57
59
|
- Google:`manifest-<accountId>.json`
|
|
58
60
|
- Meta/TikTok/Bing:`report-manifest-<accountId>.json` + `<section>-<accountId>.json`
|
|
59
61
|
|
|
@@ -106,45 +108,45 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
|
|
|
106
108
|
|
|
107
109
|
### 选项
|
|
108
110
|
|
|
109
|
-
| 选项
|
|
110
|
-
|
|
111
|
-
| `-a, --account <id>`
|
|
112
|
-
| `--json-out <dir>`
|
|
113
|
-
| `--sections <list>`
|
|
114
|
-
| `--exclude <list>`
|
|
115
|
-
| `--start` / `--end`
|
|
116
|
-
| `--concurrency <n>`
|
|
117
|
-
| `--limit <n>`
|
|
118
|
-
| `--level <lvl>`
|
|
119
|
-
| `--audience-type <type>` | 透传给 `audience`(SystemDefined/UserDefined)
|
|
120
|
-
| `--no-order-by-cost`
|
|
121
|
-
| `--verbose`
|
|
111
|
+
| 选项 | 说明 |
|
|
112
|
+
| ------------------------ | ------------------------------------------------------------------------------------ |
|
|
113
|
+
| `-a, --account <id>` | Google `mediaCustomerId`(必填) |
|
|
114
|
+
| `--json-out <dir>` | 必填;每维一个 `<section>-<accountId>.json` + `manifest-<accountId>.json` |
|
|
115
|
+
| `--sections <list>` | 仅执行指定维度(逗号分隔);省略=全部 21 个 |
|
|
116
|
+
| `--exclude <list>` | 排除指定维度;与 `--sections` 可叠加 |
|
|
117
|
+
| `--start` / `--end` | 统计区间(YYYY-MM-DD);省略=近 7 天截至昨天;`final-urls`/`campaign-types` 自动忽略 |
|
|
118
|
+
| `--concurrency <n>` | 并发数,默认 5,上限 16 |
|
|
119
|
+
| `--limit <n>` | 透传给 `keywords`/`search-terms` |
|
|
120
|
+
| `--level <lvl>` | 透传给 `extensions`(Account/Campaign/Ad Group) |
|
|
121
|
+
| `--audience-type <type>` | 透传给 `audience`(SystemDefined/UserDefined) |
|
|
122
|
+
| `--no-order-by-cost` | 透传给 `keywords`/`search-terms` |
|
|
123
|
+
| `--verbose` | 打印详细错误 |
|
|
122
124
|
|
|
123
125
|
### 维度列表(21 个)
|
|
124
126
|
|
|
125
|
-
| 维度
|
|
126
|
-
|
|
127
|
-
| `overview`
|
|
128
|
-
| `keywords`
|
|
129
|
-
| `search-terms`
|
|
130
|
-
| `campaigns`
|
|
131
|
-
| `campaign-hour`
|
|
132
|
-
| `ads`
|
|
133
|
-
| `extensions`
|
|
134
|
-
| `devices`
|
|
135
|
-
| `geographic`
|
|
136
|
-
| `audience`
|
|
137
|
-
| `asset-images`
|
|
138
|
-
| `videos`
|
|
139
|
-
| `materials`
|
|
140
|
-
| `resource-counts`
|
|
141
|
-
| `conversion-actions` | 转化动作
|
|
142
|
-
| `daily-metrics`
|
|
143
|
-
| `gold-account`
|
|
144
|
-
| `ads-index`
|
|
145
|
-
| `final-urls`
|
|
146
|
-
| `dimension-summary`
|
|
147
|
-
| `campaign-types`
|
|
127
|
+
| 维度 | 说明 |
|
|
128
|
+
| -------------------- | --------------------------------------------------------------------------------------------------- |
|
|
129
|
+
| `overview` | 总览(实时,可查当天;当天高消耗账号排行首选) |
|
|
130
|
+
| `keywords` | 关键词;可选 `--limit`、`--no-order-by-cost` |
|
|
131
|
+
| `search-terms` | 搜索词 |
|
|
132
|
+
| `campaigns` | 广告系列 |
|
|
133
|
+
| `campaign-hour` | 系列按小时(根为 JSON 数组) |
|
|
134
|
+
| `ads` | 广告;与 `ad list` 同源 |
|
|
135
|
+
| `extensions` | 附加信息;可选 `--level` |
|
|
136
|
+
| `devices` | 设备分布 |
|
|
137
|
+
| `geographic` | 地域分布 |
|
|
138
|
+
| `audience` | 受众;可选 `--audience-type` |
|
|
139
|
+
| `asset-images` | 图片素材 |
|
|
140
|
+
| `videos` | 视频 |
|
|
141
|
+
| `materials` | 合并图片+视频 `{ images, videos }` |
|
|
142
|
+
| `resource-counts` | 结构统计 |
|
|
143
|
+
| `conversion-actions` | 转化动作 |
|
|
144
|
+
| `daily-metrics` | 按日指标(主平台 `GET …/report/media-account/google/account-daily-reports`,`--json` 根为按日数组) |
|
|
145
|
+
| `gold-account` | 黄金账户 |
|
|
146
|
+
| `ads-index` | 质量指标 |
|
|
147
|
+
| `final-urls` | 最终到达网址(不传 `--start`/`--end`) |
|
|
148
|
+
| `dimension-summary` | 账户汇总 |
|
|
149
|
+
| `campaign-types` | 系列类型(实时,可查当天;不传 `--start`/`--end`) |
|
|
148
150
|
|
|
149
151
|
### stdout 摘要
|
|
150
152
|
|
|
@@ -154,8 +156,11 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
|
|
|
154
156
|
"absoluteSnapshotDir": "/abs/path/to/snap-google",
|
|
155
157
|
"manifestFile": "manifest-9526903813.json",
|
|
156
158
|
"accountId": "9526903813",
|
|
157
|
-
"totalSections": 21,
|
|
158
|
-
"
|
|
159
|
+
"totalSections": 21,
|
|
160
|
+
"succeeded": 21,
|
|
161
|
+
"failed": 0,
|
|
162
|
+
"concurrency": 5,
|
|
163
|
+
"elapsedMs": 18712,
|
|
159
164
|
"results": [
|
|
160
165
|
{ "section": "overview", "ok": true, "elapsedMs": 3380, "file": "overview-9526903813.json" }
|
|
161
166
|
]
|
|
@@ -166,16 +171,16 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
|
|
|
166
171
|
|
|
167
172
|
### 指标字段对照
|
|
168
173
|
|
|
169
|
-
| 展示名
|
|
170
|
-
|
|
171
|
-
| 消耗
|
|
172
|
-
| 展示
|
|
173
|
-
| 点击
|
|
174
|
-
| 转化
|
|
175
|
-
| 点击率
|
|
176
|
-
| 转化率
|
|
177
|
-
| 平均点击成本 | `averageCpc`
|
|
178
|
-
| 转化成本
|
|
174
|
+
| 展示名 | 响应中常见字段名 |
|
|
175
|
+
| ------------ | ------------------- |
|
|
176
|
+
| 消耗 | `spend` |
|
|
177
|
+
| 展示 | `impressions` |
|
|
178
|
+
| 点击 | `clicks` |
|
|
179
|
+
| 转化 | `conversions` |
|
|
180
|
+
| 点击率 | `ctr` |
|
|
181
|
+
| 转化率 | `conversionRate` |
|
|
182
|
+
| 平均点击成本 | `averageCpc` |
|
|
183
|
+
| 转化成本 | `costPerConversion` |
|
|
179
184
|
|
|
180
185
|
### CampaignSectionData 关键字段
|
|
181
186
|
|
|
@@ -194,23 +199,24 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
|
|
|
194
199
|
```bash
|
|
195
200
|
siluzan-tso report meta-overview -a <mediaCustomerId> [--start YYYY-MM-DD --end YYYY-MM-DD] --json-out <dir>
|
|
196
201
|
```
|
|
202
|
+
|
|
197
203
|
`--start`/`--end` 须同传或同省略;省略默认近 7 天(截至昨天)。报告模板:`report-templates/meta-period-report.md`。
|
|
198
204
|
|
|
199
205
|
---
|
|
200
206
|
|
|
201
207
|
## TikTok 账户分析
|
|
202
208
|
|
|
203
|
-
| 子命令
|
|
204
|
-
|
|
205
|
-
| `report tiktok-overview`
|
|
206
|
-
| `report tiktok-campaigns`
|
|
207
|
-
| `report tiktok-ad-groups`
|
|
208
|
-
| `report tiktok-ads`
|
|
209
|
-
| `report tiktok-videos`
|
|
210
|
-
| `report tiktok-audience`
|
|
211
|
-
| `report tiktok-audience-merged` | 受众合并(gender + age + interest_category)
|
|
212
|
-
| `report tiktok-areacode`
|
|
213
|
-
| `report tiktok-interest-list`
|
|
209
|
+
| 子命令 | 说明 |
|
|
210
|
+
| ------------------------------- | -------------------------------------------------- |
|
|
211
|
+
| `report tiktok-overview` | 总览 |
|
|
212
|
+
| `report tiktok-campaigns` | 系列(默认 `take=100`) |
|
|
213
|
+
| `report tiktok-ad-groups` | 广告组 |
|
|
214
|
+
| `report tiktok-ads` | 广告 |
|
|
215
|
+
| `report tiktok-videos` | 视频 |
|
|
216
|
+
| `report tiktok-audience` | 受众(`-d` 取值:gender/age/interest_category 等) |
|
|
217
|
+
| `report tiktok-audience-merged` | 受众合并(gender + age + interest_category) |
|
|
218
|
+
| `report tiktok-areacode` | 区域代码 |
|
|
219
|
+
| `report tiktok-interest-list` | 兴趣列表(需配置 `tiktokApiUrl`) |
|
|
214
220
|
|
|
215
221
|
`--start`/`--end` 同传同省略,省略默认近 7 天(截至昨天)。报告模板:`report-templates/tiktok-period-report.md`。
|
|
216
222
|
|
|
@@ -227,19 +233,19 @@ siluzan-tso report tiktok-audience-merged -a 1234567890 --start 2026-03-01 --end
|
|
|
227
233
|
|
|
228
234
|
> **日期限制**:Bing 报表不能包含今天或昨天。省略时 CLI 默认截至前天的近 7 天。
|
|
229
235
|
|
|
230
|
-
| 子命令
|
|
231
|
-
|
|
232
|
-
| `report bing-overview`
|
|
233
|
-
| `report bing-device`
|
|
234
|
-
| `report bing-geographic`
|
|
235
|
-
| `report bing-age-audience`
|
|
236
|
-
| `report bing-gender-audience` | 性别受众
|
|
236
|
+
| 子命令 | 说明 |
|
|
237
|
+
| ----------------------------- | ----------------------------------- |
|
|
238
|
+
| `report bing-overview` | 总览 |
|
|
239
|
+
| `report bing-device` | 设备 |
|
|
240
|
+
| `report bing-geographic` | 地域 |
|
|
241
|
+
| `report bing-age-audience` | 年龄受众 |
|
|
242
|
+
| `report bing-gender-audience` | 性别受众 |
|
|
237
243
|
| `report bing-audience-merged` | 受众合并(年龄+性别,并行拉取合并) |
|
|
238
|
-
| `report bing-campaigns`
|
|
239
|
-
| `report bing-ad-groups`
|
|
240
|
-
| `report bing-ads`
|
|
241
|
-
| `report bing-keywords`
|
|
242
|
-
| `report bing-search-terms`
|
|
244
|
+
| `report bing-campaigns` | 系列 |
|
|
245
|
+
| `report bing-ad-groups` | 广告组 |
|
|
246
|
+
| `report bing-ads` | 广告 |
|
|
247
|
+
| `report bing-keywords` | 关键词(默认 `limit=100`) |
|
|
248
|
+
| `report bing-search-terms` | 搜索词 |
|
|
243
249
|
|
|
244
250
|
```bash
|
|
245
251
|
mkdir -p ./snap-bing
|
|
@@ -247,6 +253,7 @@ siluzan-tso report bing-overview -a <mediaCustomerId> --json-out ./snap-bing
|
|
|
247
253
|
siluzan-tso report bing-keywords -a <mediaCustomerId> --start 2026-03-01 --end 2026-03-20 --limit 50 --json-out ./snap-bing
|
|
248
254
|
siluzan-tso report bing-audience-merged -a <mediaCustomerId> --json-out ./snap-bing
|
|
249
255
|
```
|
|
256
|
+
|
|
250
257
|
报告模板:`report-templates/bing-period-report.md`。
|
|
251
258
|
|
|
252
259
|
---
|
|
@@ -255,14 +262,14 @@ siluzan-tso report bing-audience-merged -a <mediaCustomerId> --json-out ./snap-b
|
|
|
255
262
|
|
|
256
263
|
报告产物可以是 HTML、Excel、PDF、PPT、Markdown 等,数据口径须与快照 JSON 一致。章节与数据块参考 `report-templates/`:
|
|
257
264
|
|
|
258
|
-
| 模板
|
|
259
|
-
|
|
260
|
-
| `google-period-report.md`
|
|
261
|
-
| `google-account-diagnosis-report.md` | Google 诊断报告纲要
|
|
262
|
-
| `google-ads-diagnosis.md`
|
|
263
|
-
| `meta-period-report.md`
|
|
264
|
-
| `tiktok-period-report.md`
|
|
265
|
-
| `bing-period-report.md`
|
|
266
|
-
| `README.md`
|
|
265
|
+
| 模板 | 用途 |
|
|
266
|
+
| ------------------------------------ | --------------------------- |
|
|
267
|
+
| `google-period-report.md` | Google 周期汇总报告章节 |
|
|
268
|
+
| `google-account-diagnosis-report.md` | Google 诊断报告纲要 |
|
|
269
|
+
| `google-ads-diagnosis.md` | Google Ads 诊断报告完整骨架 |
|
|
270
|
+
| `meta-period-report.md` | Meta(Facebook)周期报告 |
|
|
271
|
+
| `tiktok-period-report.md` | TikTok 周期报告 |
|
|
272
|
+
| `bing-period-report.md` | Bing 周期报告 |
|
|
273
|
+
| `README.md` | 索引与规则 |
|
|
267
274
|
|
|
268
275
|
`.html` 文件(`report-template.html`、`report-template-academic.html` 等)为 HTML 路线的样式参考。选其他格式时仍以各 `*.md` 纲要为章节清单。
|
|
@@ -106,7 +106,7 @@ siluzan-tso balance -m <媒体类型> -a <账户ID列表>
|
|
|
106
106
|
| ---------------------- | ------------------------------------------------------------------------------------ |
|
|
107
107
|
| `-m, --media <type>` | 媒体类型(必填) |
|
|
108
108
|
| `-a, --accounts <ids>` | 账户 `mediaCustomerId`(数字 ID),多个用逗号分隔(必填)。**注意:不是 `entityId`** |
|
|
109
|
-
| `--json` | 输出原始 JSON;不支持或查询失败时 stdout 为 `{"ok":false,"error":"..."}`
|
|
109
|
+
| `--json` | 输出原始 JSON;不支持或查询失败时 stdout 为 `{"ok":false,"error":"..."}` |
|
|
110
110
|
|
|
111
111
|
**示例:**
|
|
112
112
|
|
|
@@ -130,6 +130,7 @@ siluzan-tso balance -m Google -a 6326027735 --json
|
|
|
130
130
|
## stats — 查询投放消耗数据
|
|
131
131
|
|
|
132
132
|
> **数据时效性**:
|
|
133
|
+
>
|
|
133
134
|
> - **Google**:走 `account-spend-overview`(2026-05 起),后端按日期窗口分流——
|
|
134
135
|
> - 窗口完全在历史 → `database` 模式:含余额、状态、币种、账户名、当期展点消等完整字段;
|
|
135
136
|
> - 窗口包含今天 → `googleCombined` 模式:只返回实时聚合的展点消(**没有**余额/状态/币种/账户名)。
|
|
@@ -140,14 +141,14 @@ siluzan-tso balance -m Google -a 6326027735 --json
|
|
|
140
141
|
siluzan-tso stats -m <媒体类型> [选项]
|
|
141
142
|
```
|
|
142
143
|
|
|
143
|
-
| 选项
|
|
144
|
-
|
|
|
145
|
-
| `-m, --media <type>`
|
|
146
|
-
| `-a, --accounts <ids>`
|
|
147
|
-
| `--start <YYYY-MM-DD>`
|
|
148
|
-
| `--end <YYYY-MM-DD>`
|
|
149
|
-
| `--start-date` / `--end-date` | 与 `--start` / `--end` 同义(CLI 别名,与 SKILL Playbook 一致)
|
|
150
|
-
| `--json`
|
|
144
|
+
| 选项 | 说明 | 默认 |
|
|
145
|
+
| ----------------------------- | ----------------------------------------------------------------------------- | ------ |
|
|
146
|
+
| `-m, --media <type>` | 媒体类型(必填) | — |
|
|
147
|
+
| `-a, --accounts <ids>` | 账户 `mediaCustomerId`(数字 ID),逗号分隔(**必填**,接口不支持查全部账户) | — |
|
|
148
|
+
| `--start <YYYY-MM-DD>` | 开始日期 | 7 天前 |
|
|
149
|
+
| `--end <YYYY-MM-DD>` | 结束日期 | 昨天 |
|
|
150
|
+
| `--start-date` / `--end-date` | 与 `--start` / `--end` 同义(CLI 别名,与 SKILL Playbook 一致) | — |
|
|
151
|
+
| `--json` | 输出原始 JSON;**失败时 stdout 仍为 JSON**(`{"ok":false,"error":"..."}`) | — |
|
|
151
152
|
|
|
152
153
|
**示例:**
|
|
153
154
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## invoice-info — 发票抬头管理
|
|
9
9
|
|
|
10
|
-
对应页面:`https://www.siluzan.com/v3/foreign_trade/settings/invoiceInformation`
|
|
10
|
+
对应页面:`https://www-ci.siluzan.com/v3/foreign_trade/settings/invoiceInformation`
|
|
11
11
|
|
|
12
12
|
发票抬头是开票申请时使用的公司/企业信息模板,支持三种类型:
|
|
13
13
|
|
|
@@ -133,10 +133,10 @@ siluzan-tso config show
|
|
|
133
133
|
**示例:**
|
|
134
134
|
|
|
135
135
|
```
|
|
136
|
-
- 现金充值(单笔):https://www.siluzan.com/recharge/pay
|
|
137
|
-
- 现金充值(批量):https://www.siluzan.com/recharge/pay_batch
|
|
138
|
-
- 月结充值: https://www.siluzan.com/recharge/accountBillingQuota
|
|
139
|
-
- 丝路赞钱包: https://www.siluzan.com/recharge/siluzanWallet
|
|
136
|
+
- 现金充值(单笔):https://www-ci.siluzan.com/recharge/pay
|
|
137
|
+
- 现金充值(批量):https://www-ci.siluzan.com/recharge/pay_batch
|
|
138
|
+
- 月结充值: https://www-ci.siluzan.com/recharge/accountBillingQuota
|
|
139
|
+
- 丝路赞钱包: https://www-ci.siluzan.com/recharge/siluzanWallet
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
---
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
| 层级 | 指标 | 用途 | CLI 数据来源 |
|
|
50
50
|
| ---------------------- | -------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------- |
|
|
51
|
-
| **决策层**(先看) | CPA / ROAS / 转化率 | 决定关键词去留 | `google-analysis --sections keywords` → `costPerConversion`、`conversionRate`
|
|
51
|
+
| **决策层**(先看) | CPA / ROAS / 转化率 | 决定关键词去留 | `google-analysis --sections keywords` → `costPerConversion`、`conversionRate` |
|
|
52
52
|
| **诊断层**(解释原因) | CTR / CPC / Quality Score | 解释为什么决策指标好或差 | 同上 → `ctr`、`averageCpc`、`qualityScore` |
|
|
53
53
|
| **机会层**(发现增长) | 搜索展示份额 / 因排名丢失 / 因预算丢失 | 发现被抑制的潜力 | 同上 → `searchImpressionShare`、`searchRankLostImpressionShare`、`searchBudgetLostImpressionShare` |
|
|
54
54
|
|