siluzan-tso-cli 1.1.72 → 1.1.73-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.
Files changed (48) hide show
  1. package/README.md +2 -1
  2. package/dist/index.js +2530 -1258
  3. package/dist/skill/SKILL.md +3 -2
  4. package/dist/skill/_meta.json +2 -2
  5. package/dist/skill/assets/campaign-create-keyword-test.fixed.json +2 -2
  6. package/dist/skill/assets/campaign-create-keyword-test.json +2 -2
  7. package/dist/skill/assets/campaign-create-template.json +2 -2
  8. package/dist/skill/assets/campaign-create-template.md +14 -2
  9. package/dist/skill/references/README.md +1 -0
  10. package/dist/skill/references/accounts/accounts-list.md +1 -1
  11. package/dist/skill/references/accounts/accounts-permissions.md +2 -2
  12. package/dist/skill/references/accounts/finance.md +1 -1
  13. package/dist/skill/references/accounts/open-account-by-media.md +1 -1
  14. package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
  15. package/dist/skill/references/analytics/account-analytics.md +18 -2
  16. package/dist/skill/references/analytics/google-analysis-batch.md +5 -3
  17. package/dist/skill/references/analytics/rag.md +1 -1
  18. package/dist/skill/references/analytics/reporting.md +5 -5
  19. package/dist/skill/references/core/agent-conventions.md +3 -1
  20. package/dist/skill/references/core/cli-enums.md +30 -20
  21. package/dist/skill/references/core/intent-routing.md +2 -1
  22. package/dist/skill/references/core/playbooks.md +12 -5
  23. package/dist/skill/references/core/setup.md +5 -5
  24. package/dist/skill/references/google-ads/google-ads-campaign-plan.md +3 -2
  25. package/dist/skill/references/google-ads/google-ads-read.md +9 -1
  26. package/dist/skill/references/google-ads/google-ads-write.md +83 -39
  27. package/dist/skill/references/google-ads/google-ads.md +22 -19
  28. package/dist/skill/references/google-ads/rules/google-ads-plan-source-fidelity.md +5 -0
  29. package/dist/skill/references/misc/tso-home.md +2 -2
  30. package/dist/skill/references/report-templates/README.md +1 -0
  31. package/dist/skill/references/report-templates/google-account-diagnosis-report.md +1 -1
  32. package/dist/skill/references/report-templates/google-ads-diagnosis.md +2 -2
  33. package/dist/skill/references/report-templates/google-daily-report-excel.md +45 -0
  34. package/dist/skill/references/report-templates/google-period-report-excel.md +1 -1
  35. package/dist/skill/references/report-templates/google-period-report.md +3 -3
  36. package/dist/skill/references/report-templates/okki-weekly-google-client.md +4 -4
  37. package/dist/skill/report-templates/README.md +1 -0
  38. package/dist/skill/report-templates/google-account-diagnosis-report.md +1 -1
  39. package/dist/skill/report-templates/google-ads-diagnosis.md +2 -2
  40. package/dist/skill/report-templates/google-daily-report-excel.md +45 -0
  41. package/dist/skill/report-templates/google-period-report-excel.md +1 -1
  42. package/dist/skill/report-templates/google-period-report.html +31 -4
  43. package/dist/skill/report-templates/google-period-report.md +3 -3
  44. package/dist/skill/report-templates/okki-weekly-google-client.md +4 -4
  45. package/dist/skill/scripts/install.ps1 +3 -3
  46. package/dist/skill/scripts/install.sh +3 -3
  47. package/dist/skill/snippets/handoff-p5-batch.md +1 -1
  48. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: siluzan-tso
3
- description: 丝路赞 TSO 广告平台(Google/Bing/Yandex/TikTok/MetaAd),凡涉及丝路赞/TSO、投广告、出价预算、广告账户管理,或需要做行业分析/市场分析/行业分析报告(含「写一份 XX 行业报告」「电商/制造/医疗等行业报告」「市场调查/战略市场/KA 市场报告」「竞品/GTM/市场格局/行业趋势」等,无论是否提及丝路赞/广告/客户)须加载本 skill。【§零·最高优先】网址/域名/官网+诊断/检测/监测/评估/体检/报告/符合投放要求/能不能投(含「网络诊断」混说)→P8 website-diagnosis collect(浏览器只开一次,collect --html-file;禁WebFetch当终稿),禁止P9/P1/W3、禁止A/B/C/D追问;细则见 intent-routing.md §零。【§零·B·次高优先】未命中§零时,行业/市场分析报告类话术→必走P9 market-analysis collect+render出HTML,禁止纯WebSearch/WebFetch在对话里写Markdown/HTML当终稿、禁止改走P8/P1/P4/W5/google-analysis;细则见 references/core/intent-routing.md §零·B。【§零·C·关键词规划】Google Ads/谷歌广告拓词、关键词规划/推荐、Keyword Planner、长尾关键词、月搜索量/搜索量、竞争度、核心词/种子词扩词(含「阅读网址/文章/页面后针对核心词出带搜索量词表」,无论是否提及丝路赞/TSO/账户)→必走W5,一次 keyword -k … --google-only --min-monthly-search,禁止分批洗词脚本,禁止WebSearch/WebFetch编造搜索量当终稿;细则见 references/core/intent-routing.md §零·C。【报告/诊断消歧】其余报告类话术禁止默认某一CLI——行业/市场/战略/行业分析报告→P9 market-analysis(必走collect+render,禁止纯WebSearch代替);Google账户ID+健康诊断→P1 google-ads-diagnosis;只要周期数据/8维/花费转化汇总/Excel→P4;Demand Gen/需求开发投放数据分析或汇总报告→P4-DG(demand-gen-render 出 HTML,要 Excel 走对应纲要,不是创建 W3);Google/谷歌广告月度报告、月总结与规划、季度报告、Q3汇总、Q4规划、季度汇报、投放季报、客户版、大族模板、下月规划→P10 google-quarterly;Meta/TikTok/Bing周期→P4/P4-FB;多账户对比→P3/P5;OKKI周报→P6;Google询盘→P7;官网+明确要搜索广告方案/campaign JSON→W3;Meta Instant Form 线索广告→W13;仅要词表+搜索量/竞争度→W5;平台优化报告列表/推送→W7;对象仍不清→Read intent-routing.md。【账户】列表/余额/消耗/激活账单/Google赠送金(W1)、多账户余额预警 balance-scan(P2)、多户消耗汇总 accounts-digest(P3)、五大媒体开户与进度(W2)、分享/解绑/MCC/BC/BM/权限(W9)。【投放】**搭建仅 Google+Meta**:Google Search/PMax/Demand Gen(W3,无 Display;Demand Gen 用 ad demand-gen;含 CRUD/PMax/batch W4);Meta Instant Form(W13)。Google 账号封禁/临时暂停/付款或身份验证、广告或落地页拒登、Merchant Center 关联封禁的申诉材料与英文申诉稿→W14(不代提交;禁止编造整改、换号绕过)。TikTok/Bing/Yandex **不能建广告**。另:拓词 W5、optimize W6。【财务】充值/钱包、转账记录、发票/开票/抬头(W8);写操作审计与 restore。【运营】智能预警 forewarning 创建/启停/记录(W10)、TikTok/Meta 线索 clue(W11)、日周巡检(W12)、宿主编排/投放自控/异常监控(hosted-automation)。【其他】RAG 知识库检索、Meta/Facebook 周期与诊断 HTML、Google/Meta 周期 Excel、多账户 google-analysis-batch。
3
+ description: 丝路赞 TSO 广告平台(Google/Bing/Yandex/TikTok/MetaAd),凡涉及丝路赞/TSO、投广告、出价预算、广告账户管理,或需要做行业分析/市场分析/行业分析报告(含「写一份 XX 行业报告」「电商/制造/医疗等行业报告」「市场调查/战略市场/KA 市场报告」「竞品/GTM/市场格局/行业趋势」等,无论是否提及丝路赞/广告/客户)须加载本 skill。【§零·最高优先】网址/域名/官网+诊断/检测/监测/评估/体检/报告/符合投放要求/能不能投(含「网络诊断」混说)→P8 website-diagnosis collect(浏览器只开一次,collect --html-file;禁WebFetch当终稿),禁止P9/P1/W3、禁止A/B/C/D追问;细则见 intent-routing.md §零。【§零·B·次高优先】未命中§零时,行业/市场分析报告类话术→必走P9 market-analysis collect+render出HTML,禁止纯WebSearch/WebFetch在对话里写Markdown/HTML当终稿、禁止改走P8/P1/P4/W5/google-analysis;细则见 references/core/intent-routing.md §零·B。【§零·C·关键词规划】Google Ads/谷歌广告拓词、关键词规划/推荐、Keyword Planner、长尾关键词、月搜索量/搜索量、竞争度、核心词/种子词扩词(含「阅读网址/文章/页面后针对核心词出带搜索量词表」,无论是否提及丝路赞/TSO/账户)→必走W5,一次 keyword -k … --google-only --min-monthly-search,禁止分批洗词脚本,禁止WebSearch/WebFetch编造搜索量当终稿;细则见 references/core/intent-routing.md §零·C。【报告/诊断消歧】其余报告类话术禁止默认某一CLI——行业/市场/战略/行业分析报告→P9 market-analysis(必走collect+render,禁止纯WebSearch代替);Google账户ID+健康诊断→P1 google-ads-diagnosis;只要周期数据/8维/花费转化汇总/Excel→P4;投放日报/按天×系列·关键词·搜索词/按上传旧日报格式重拉到昨日→P4-DAILY(Google:google-analysis --by-date 一条拉数+daily-render,禁止按天循环);Demand Gen/需求开发投放数据分析或汇总报告→P4-DG(demand-gen-render 出 HTML,要 Excel 走对应纲要,不是创建 W3);Google/谷歌广告月度报告、月总结与规划、季度报告、Q3汇总、Q4规划、季度汇报、投放季报、客户版、大族模板、下月规划→P10 google-quarterly;Meta/TikTok/Bing周期→P4/P4-FB;多账户对比→P3/P5;OKKI周报→P6;Google询盘→P7;官网+明确要搜索广告方案/campaign JSON→W3;Meta Instant Form 线索广告→W13;仅要词表+搜索量/竞争度→W5;平台优化报告列表/推送→W7;对象仍不清→Read intent-routing.md。【账户】列表/余额/消耗/激活账单/Google赠送金(W1)、多账户余额预警 balance-scan(P2)、多户消耗汇总 accounts-digest(P3)、五大媒体开户与进度(W2)、分享/解绑/MCC/BC/BM/权限(W9)。【投放】**搭建仅 Google+Meta**:Google Search/PMax/Demand Gen(W3,无 Display;Demand Gen 用 ad demand-gen;含 CRUD/PMax/batch W4);Meta Instant Form(W13)。Google 账号封禁/临时暂停/付款或身份验证、广告或落地页拒登、Merchant Center 关联封禁的申诉材料与英文申诉稿→W14(不代提交;禁止编造整改、换号绕过)。TikTok/Bing/Yandex **不能建广告**。另:拓词 W5、optimize W6。【财务】充值/钱包、转账记录、发票/开票/抬头(W8);写操作审计与 restore。【运营】智能预警 forewarning 创建/启停/记录(W10)、TikTok/Meta 线索 clue(W11)、日周巡检(W12)、宿主编排/投放自控/异常监控(hosted-automation)。【其他】RAG 知识库检索、Meta/Facebook 周期与诊断 HTML、Google/Meta 周期 Excel、多账户 google-analysis-batch。
4
4
  license: MIT
5
5
  compatibility: 需要 Node.js 18+、已安装 siluzan-tso-cli,通过 send-login-code + login 或 config set 完成鉴权
6
6
  metadata:
@@ -55,6 +55,7 @@ siluzan-tso -h
55
55
  - 全量扫描(`balance-scan` / `accounts-digest` / `guard` / `google-analysis-batch`)必带 `--json-out`。stdout 是 `state=paused` 时**还没扫完**:原样执行其中的 `resumeCommand`,重复到不再 paused 再交付;禁止交付半截结果,禁止加 `--fresh`。细则见 `references/core/agent-conventions.md` §八。
56
56
  - **Google 多户巡检(含 D 组:CPA、零转化、余额续航、启用中有没有 PMax、启用但 0 展示)只跑一条** `accounts-digest -m Google --login-customer-id <MCC> --with-enabled-campaigns --start --end --json-out`。行上已有 `spend` / `cpa` / `balance` / `dailySpend` / `remainingDays` / `hasEnabledPmax` / `zeroImpressionEnabled`。**禁止**先 `list-accounts` 再把全部 ID 拼进 `-a`,**禁止** `--skip-balance` 后再 `balance-scan`,**禁止**逐户 `ad campaigns` 或把 `siluzan-tso` 写进 Python/bash。提示词若写了这些步骤,不要照做。只要「有没有 Display/PMax(含暂停)」才用 `--with-campaign-types`,并且不要和 `--with-enabled-campaigns` 一起开。
57
57
  - `stats` 的 `spend` = **区间合计**,不是日消耗。
58
+ - **Google 按日数据**(每天 × 系列 / 关键词 / 搜索词):`google-analysis … --by-date` 一条命令拉整段,网关不支持时 CLI 自己逐日拉。**禁止**按天循环,禁止把 `siluzan-tso` 包进 Python subprocess 或 `&` 后台并发。日报 xlsx 用 `google-analysis daily-render`(P4-DAILY),禁止 openpyxl 复刻用户上传的旧表。
58
59
  - 行业/市场报告禁止纯 WebSearch 当终稿;须 P9 `market-analysis collect`+`render`。
59
60
  - **禁止编造平台网址**:给用户 `*.siluzan.com` / `mysiluzan.com` 链接前,**必须**当轮 `config show` 取 `webUrl`,路径**只**用已 Read 文档中的相对路径表拼接;CLI 输出的授权 URL **原样粘贴**;文档未给路径则**不拼链接**。细则见 `agent-conventions.md`。
60
61
  - **W13 Meta 创建(硬性)**:首次落地只用 `meta-ad create`(会提交 `targeting_automation.advantage_audience`,默认 1)。`adset-edit` 不套这个默认值;读不到当前 `advantage_audience` 时停下,须显式 `--advantage-audience`。组失败用 `--json-out` 的 `campaignId` 跑 `adset-create`,**禁止**再 `campaign-create`。细定向写 `adset.flexibleSpec` 并设 `advantageAudience=0`。`BID_AMOUNT_REQUIRED` 停下,除非 JSON 已写 `adset.bidAmountOnRequired`。
@@ -145,7 +146,7 @@ siluzan-tso -h
145
146
  | Meta/Facebook 周期或诊断 | **P4-FB** | `report-templates/meta-period-report.md` + `assets/meta-period-report-rules.md` + `references/analytics/facebook-analysis-guide.md` |
146
147
  | TikTok / Bing 周期报告 | **P4** | `references/analytics/account-analytics.md` + 对应 `report-templates/*-period-report.md` |
147
148
  | Yandex 账户分析 / 周期 / 月报 | **P4** | `report-templates/yandex-period-report.md` + `references/analytics/account-analytics.md`;Excel 加 `yandex-period-report-excel.md` |
148
- | 账户级按日 Excel | **P4-DAILY** | `report-templates/stats-daily-excel.md` |
149
+ | 按日 Excel / 投放日报 / 按上传的旧日报重拉到昨天 | **P4-DAILY** | Google:`report-templates/google-daily-report-excel.md`(`--by-date` 一条拉数 + `daily-render`);其他媒体:`report-templates/stats-daily-excel.md` |
149
150
  | 多账户 × 多维度批处理 | **P5** | `references/analytics/google-analysis-batch.md` + `references/analytics/account-analytics.md` |
150
151
  | OKKI 周报 / 表格形式(OKKI) | **P6** | `report-templates/okki-weekly-google-client.md`(写 `okki-weekly-report.json` → `google-analysis okki-render` 出 5 Sheet `.xlsx`;客户话术默认 7 条、一条一行;「表格形式」= Excel) |
151
152
  | Google 询盘分析(**须 CRM 询盘资料**;口语零询盘/CPA → **P3**) | **P7** | `report-templates/google-inquiry-analysis.md` + `references/analytics/geo-continents.json` |
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.72",
4
- "publishedAt": 1794912919105
3
+ "version": "1.1.73-beta.2",
4
+ "publishedAt": 1795078603194
5
5
  }
@@ -21,8 +21,8 @@
21
21
  "TargetSearchNetwork": false,
22
22
  "TargetContentNetwork": false,
23
23
  "TargetPartnerSearchNetwork": false,
24
- "PositiveGeoTargetType": 0,
25
- "NegativeGeoTargetType": 0,
24
+ "PositiveGeoTargetTypeV2": "Presence",
25
+ "NegativeGeoTargetTypeV2": "Presence",
26
26
  "DSADomainName": "",
27
27
  "DSALanguageCode": "en",
28
28
  "StartTime": "2026-05-25",
@@ -39,8 +39,8 @@
39
39
  "TargetSearchNetwork": false,
40
40
  "TargetContentNetwork": false,
41
41
  "TargetPartnerSearchNetwork": false,
42
- "PositiveGeoTargetType": 0,
43
- "NegativeGeoTargetType": 0,
42
+ "PositiveGeoTargetTypeV2": "Presence",
43
+ "NegativeGeoTargetTypeV2": "Presence",
44
44
  "DSADomainName": "",
45
45
  "DSALanguageCode": "en",
46
46
  "StartTime": "2026-05-25",
@@ -40,8 +40,8 @@
40
40
  "TargetSearchNetwork": false,
41
41
  "TargetContentNetwork": false,
42
42
  "TargetPartnerSearchNetwork": false,
43
- "PositiveGeoTargetType": 0,
44
- "NegativeGeoTargetType": 0,
43
+ "PositiveGeoTargetTypeV2": "Presence",
44
+ "NegativeGeoTargetTypeV2": "Presence",
45
45
  "DSADomainName": "",
46
46
  "DSALanguageCode": "en",
47
47
  "StartTime": "2026-04-01",
@@ -180,8 +180,20 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
180
180
  | `excludedLocations` | 同上 | | 排除地区;**不得与 `targetedLocations` 有相同 id**(validate 报错;「刚果」等歧义地名 resolve 后须核对) |
181
181
  | `targetedPlatforms` | `{ id: number, bidModifier?: number }[]` | | **30000 桌面 / 30001 移动 / 30002 平板**;`bidModifier` 为**百分比整数**(见下) |
182
182
  | `excludedIpAddresses` | string[] | | 排除 IP |
183
- | `PositiveGeoTargetType` | number | | |
184
- | `NegativeGeoTargetType` | number | | |
183
+ | `PositiveGeoTargetTypeV2` | "Presence" \| "PresenceOrInterest" \| "SearchInterest" | | 位置选项(定向)。不写或写 `Unspecified` 时 CLI 填 **Presence**(仅所在地),见下 |
184
+ | `NegativeGeoTargetTypeV2` | "Presence" \| "PresenceOrInterest" | | 位置选项(排除)。不写时 CLI 填 **Presence**;排除侧没有 SearchInterest |
185
+
186
+ **位置选项(`PositiveGeoTargetTypeV2`)**:
187
+
188
+ | 取值 | Google 后台叫法 | 谁会看到广告 |
189
+ | -------------------- | ---------------------------------- | ------------------------------------------------ |
190
+ | `Presence`(默认) | 所在地:位于或经常位于目标地区的用户 | 只有身处目标国家/地区的人 |
191
+ | `PresenceOrInterest` | 所在地或兴趣 | 身处目标地区,或在别处搜索/关注目标地区的人 |
192
+ | `SearchInterest` | 搜索兴趣 | 搜索目标地区相关内容的人(不论身处哪里) |
193
+
194
+ - 方案没写位置选项就用默认 Presence,不要自己改成 `PresenceOrInterest`。方案明确要求「也覆盖关注该地区的人」时才写 `PresenceOrInterest` / `SearchInterest`。
195
+ - 旧字段 `PositiveGeoTargetType` / `NegativeGeoTargetType`(数字)网关不读,写了也不生效,不要再用。
196
+ - 创建后要改,用 `ad campaign-edit --geo-target-type presence|presence-or-interest|search-interest`(见 `google-ads-write.md`)。
185
197
 
186
198
  **`targetedPlatforms.bidModifier`(创建时,百分比整数,范围 -100~900)**:
187
199
 
@@ -116,6 +116,7 @@
116
116
  | `google-quarterly-plan.md` | P10 下期规划规则(九章) |
117
117
  | `google-period-report-excel.md` | P4 用户要 Excel |
118
118
  | `stats-daily-excel.md` | P4-DAILY 按日 Excel |
119
+ | `google-daily-report-excel.md` | P4-DAILY Google 投放日报 |
119
120
  | `meta-period-report.md` / `meta-period-report-excel.md` | Meta 周期(P4-FB) |
120
121
  | `google-ads-diagnosis.md` / `google-account-diagnosis-report.md` | Google 诊断(P1) |
121
122
  | `website-diagnosis-report.md` | 网站诊断(P8) |
@@ -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.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Yandex 当前没有对应充值界面) |
173
+ | `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www-ci.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.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
493
+ | **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www-ci.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.siluzan.com/v3/foreign_trade/tso/manageAccounts
502
+ # https://www-ci.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.siluzan.com/v3/foreign_trade/tso/recharge/<page>?mediaType=<mediaType>`;丝路赞钱包:`https://www.siluzan.com/v3/foreign_trade/tso/recharge/siluzanWallet`(无媒体参数)。
129
+ 链接模式:`https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/<page>?mediaType=<mediaType>`;丝路赞钱包:`https://www-ci.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.siluzan.com/v3/foreign_trade/tso/accountOpeningHistory?tso=%2Fv3umijs%2Ftso%2FaccountOpeningHistory`
3
+ > 网页链接:`https://www-ci.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.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
68
+ # 审核通过后:config show → https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
69
69
  ```
70
70
 
71
71
  ---
@@ -138,7 +138,7 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
138
138
  | `materials` | 图片+视频拍平进 `items[]`,每行带 `assetType: 'image' \| 'video'` |
139
139
  | `resource-counts` | 结构统计 |
140
140
  | `conversion-actions` | 转化动作 |
141
- | `daily-metrics` | 按日指标(主平台 `GET …/report/media-account/google/account-daily-reports`,`--json-out` 落盘为按日数组)。**广告诊断报告**中:金额/CPA **保留 2 位小数**,转化/点击/展示为整数;须配趋势**分析**段落(见 `google-ads-diagnosis.md`) |
141
+ | `daily-metrics` | 按日指标(主平台 `GET …/report/media-account/google/account-daily-reports`,`--json-out` 落盘为按日数组)。行上 `conversionsValue` 是账户币种转化价值。**广告诊断报告**中:金额/CPA/转化价值 **保留 2 位小数**,转化/点击/展示为整数;须配趋势**分析**段落(见 `google-ads-diagnosis.md`) |
142
142
  | `gold-account` | 黄金账户 |
143
143
  | `ads-index` | 质量指标 |
144
144
  | `final-urls` | 最终到达网址(不传 `--start`/`--end`) |
@@ -254,7 +254,23 @@ const data = d.record ?? d.items; // record 非空=汇总维度;否则=列表
254
254
 
255
255
  ### campaign-hour 字段
256
256
 
257
- `items[]` 每行:`campaignId`、`campaignName`、`date`、`hour`、`spend`、`impressions`、`clicks`、`conversions`(`schemaVersion 3` 起行统一在 `items[]`,不再是裸数组根)。
257
+ `items[]` 每行:`campaignId`、`campaignName`、`date`、`hour`、`spend`、`impressions`、`clicks`、`conversions`(`schemaVersion 3` 起行统一在 `items[]`,不再是裸数组根)。`campaign-hour` 没有页首 / 绝对页首展示份额,也不能代替按日的关键词或搜索词。
258
+
259
+ ### 按日的系列、关键词、搜索词(`--by-date`)
260
+
261
+ 默认 `campaigns` / `keywords` / `search-terms` 是 `--start`~`--end` 的合计,行上 `date` 为空。用户要日报里的「天 × 系列」(含搜索展示份额、页首、绝对页首)、「天 × 关键词」或「天 × 搜索词」时,加 `--by-date`,一次拉整个区间。禁止按天循环这三维。
262
+
263
+ ```bash
264
+ siluzan-tso google-analysis -a <mediaCustomerId> --sections campaigns,keywords,search-terms --by-date --start YYYY-MM-DD --end YYYY-MM-DD --json-out ./snap
265
+ ```
266
+
267
+ - 行上 `date` 为 `YYYY-MM-DD`。同一 `campaignId` / 关键词 / 搜索词会有多行,写合计前先按对象把 `spend`、`clicks`、`impressions`、`conversions` 加总。
268
+ - 网关还不支持按日时,CLI 自动改成逐日拉取并补 `date`,stderr 有一行 `已改为逐日拉取 N 天`,结果形状不变。区间超过 92 天会报错,按月拆段。不要自己再写循环。
269
+ - `campaigns` 的 `competitiveMetrics` 仍在(`searchImpressionShare`、`searchTopImpressionShare`、`searchAbsoluteTopImpressionShare`)。份额是当天该系列的值,不要把多天的份额相加。
270
+ - 按日的关键词行不保证有 `qualityScore`。要质量得分另跑一次不带 `--by-date` 的 `keywords`。
271
+ - 搜索词没有展示份额。账户每天一行用 `daily-metrics`,不要用 `--by-date`。
272
+ - 其他维度忽略这个旗标。省略它时行为与以前相同。
273
+ - 要做成日报 xlsx(账户概览 / 每日数据 / 分计划 / 搜索字词 / 关键词):同一次带上 `overview`,然后 `google-analysis daily-render --snapshot-dir <dir>`,见 `report-templates/google-daily-report-excel.md`。
258
274
 
259
275
  ---
260
276
 
@@ -41,7 +41,7 @@
41
41
  siluzan-tso google-analysis-batch run \
42
42
  --start 2026-04-30 --end 2026-05-06 \
43
43
  --sections campaigns,geographic,keywords \
44
- --account-concurrency 4 --section-concurrency 6 \
44
+ --account-concurrency 12 --section-concurrency 6 \
45
45
  --keyword-limit 1000 --min-spend 1 \
46
46
  --json-out ./snap-batch
47
47
  ```
@@ -58,6 +58,8 @@ siluzan-tso google-analysis-batch run \
58
58
 
59
59
  `-a` 给定时:跳过清单拉取与余额/消耗查询;不应用 `--min-spend`;`accounts.json` 元信息为空。**任何情况下都不要**先 `list-accounts` 再把全部 ID 拼进 `-a`。
60
60
 
61
+ `--min-spend` 为 0(默认)时只拉账户清单,不请求余额和消耗,`accounts.json` 的 `spend` 为空。大于 0 时才按区间消耗预筛。
62
+
61
63
  ### 中断后续跑
62
64
 
63
65
  ```bash
@@ -85,7 +87,7 @@ siluzan-tso google-analysis-batch status --json-out ./snap-batch --run-id <runId
85
87
  | `-a, --accounts <ids>` | 显式 ID 列表;传入则跳过清单拉取与 `--min-spend` | 省略时自动拉全量 Google 账号 |
86
88
  | `--start` / `--end` | 统计区间(YYYY-MM-DD) | 近 7 天截至昨天 |
87
89
  | `--sections <list>` | 维度(逗号分隔),合法值见 `references/analytics/account-analytics.md` | `campaigns,geographic,keywords` |
88
- | `--account-concurrency <n>` | 账户级并发(1~16) | 4 |
90
+ | `--account-concurrency <n>` | 账户级并发(1~16) | 12 |
89
91
  | `--section-concurrency <n>` | 单账户内维度并发(1~16) | 6 |
90
92
  | `--keyword-limit <n>` | keywords / search-terms 条数上限 | google-analysis 默认 |
91
93
  | `--campaign-geo-cost-greater <n>` 等 | 仅 **`campaign-geo`**:与网关 `GetCampaignsGeoReport` 可选 query 一致;写入 `run-manifest.json`,`resume` 沿用 | 不设 |
@@ -233,7 +235,7 @@ batch 完成后,主 Agent 按 `references/core/tips.md`:**先 outline 后 JS
233
235
  ## 常见问题
234
236
 
235
237
  **Q:拉全量是不是先 `list-accounts` 再把 ID 拼进 `-a`?**
236
- A:**不要**。`run` 不传 `-a` 时内部自动拉清单+余额+消耗,先 `list-accounts` 只是重复请求。直接 `google-analysis-batch run ...` 即可。
238
+ A:**不要**。`run` 不传 `-a` 时内部自动拉清单;只有 `--min-spend` 大于 0 才再拉余额和消耗。先 `list-accounts` 只是重复请求。直接 `google-analysis-batch run ...` 即可。
237
239
 
238
240
  **Q:Ctrl+C 后能否重新 `run`?**
239
241
  A:**不能**。会生成新 runId,所有 task 从零开始。只能 `resume --run-id <旧id>`。
@@ -1,6 +1,6 @@
1
1
  # rag:知识库检索(TSO 广告投放辅助)
2
2
 
3
- 知识库管理页面在 https://www.siluzan.com/knowledge-base/
3
+ 知识库管理页面在 https://www-ci.siluzan.com/knowledge-base/
4
4
 
5
5
  为 **广告投放、账户分析、拓词、诊断报告** 等 TSO 业务提供**企业已入库**的产品、行业、客户背景事实依据。
6
6
 
@@ -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.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` |
193
+ | Google | 日报(Daily) | `https://www-ci.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
194
+ | Google | 小时报(Hourly) | `https://www-ci.siluzan.com/media-report/hour/{entityId}?culture=zh-CN` |
195
+ | TikTok | 日报 | `https://www-ci.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.siluzan.com
208
+ # webUrl: https://www-ci.siluzan.com
209
209
 
210
210
  # 第三步:拼接链接(Google 日报)
211
- # https://www.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
211
+ # https://www-ci.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
212
212
  ```
@@ -263,7 +263,7 @@
263
263
  | 多账户投放画像 / 转化成本巡检 | `accounts-digest -m <媒体> [-a ...] --start --end --json-out`(CPA 加 `--max-cpa --skip-balance`;**`spend`=区间合计**;交付 `agentBrief.userDelivery`) | 发明 `cpa-risk-scan`;逐账户 `stats`;把 `meta.totals` 说成全部账户;把 `ctr` 再乘 100 |
264
264
  | Google 巡检要「有没有 Display / PMax」(含暂停) | 同一条 `accounts-digest -m Google --with-campaign-types [--login-customer-id <MCC>]`。只对消耗 > 0 的户查类型 | 逐户 `ad campaigns` / `google-analysis --sections campaign-types`;把 `siluzan-tso` 写进 Python 再 subprocess;把 `campaignTypesStatus≠ok` 当成「无展示」 |
265
265
  | Google 巡检要「启用系列有没有 PMax」或「启用但 0 展示」(D 组) | 同一条 `accounts-digest -m Google --login-customer-id <MCC> --with-enabled-campaigns --start --end`(**不要** `--skip-balance`,**不要**再 `balance-scan`)。`dailySpend` / `remainingDays` 已在行上;`hasEnabledPmax` 只看启用中的系列;`zeroImpressionEnabled` 是启用、展示为 0、且不是 PMax/Display 的系列 | 先 `list-accounts` 再把全部 ID 拼进 `balance-scan -a`;逐户 `ad campaigns`;把 CLI 写进 Python/bash 再循环;和 `--with-campaign-types` 一起开(两轮按户请求);把 `enabledCampaignStatus≠ok` 当成「无 PMax」 |
266
- | 单户按日 Excel | `stats … --by-day --json-out`(P4-DAILY) | 默认 `stats` 当按日 |
266
+ | 单户按日 Excel | Google:`google-analysis --by-date` 一次拉整段 + `daily-render`;其他媒体:`stats … --by-day --json-out`(P4-DAILY) | 默认 `stats` 当按日;按天循环 `google-analysis`;Python/bash 包 `siluzan-tso` 再 subprocess / `&` 并发 |
267
267
  | 多账户 × 多维度 Google 数据 | 全量:`google-analysis-batch run`(省略 `-a`);2~10:`google-analysis -a id1,id2,...` | 外层 for-loop;先 list 再拼 `-a` |
268
268
  | 多系列诊断 | `ad campaigns --json-out` + node 读文件过滤 | 逐系列 `ad campaign-get` |
269
269
  | 单日预算熔断 / 空耗熔断(全户 Google) | `guard budget-circuit` / `guard zero-conv -m Google --json-out`(交付 `userDelivery`;见 `operations/guard.md`) | 六媒体 `list-accounts` + 逐户 `ad campaigns`/`ad groups` for-loop;`ad campaigns -m`(非法) |
@@ -286,6 +286,8 @@
286
286
 
287
287
  预估超 2 分钟的任务先告知预计耗时;超 5 分钟未完成时主动检查并告知用户。长任务中断后用对应 `resume` 入口续跑,**禁止**直接重跑 `run`。
288
288
 
289
+ stderr 里如果出现以 `进度 ` 开头的一行,把这一整句原样告诉用户,然后继续等待,或按上面的暂停规则续跑。不要另外编一个剩余时间。
290
+
289
291
  ---
290
292
 
291
293
  ## 十、账户 ID 示例
@@ -6,8 +6,8 @@
6
6
 
7
7
  ### 媒体类型 `-m` / `--media`(多数命令)
8
8
 
9
- | 命令 | 选项 | 合法值 |
10
- | ------------------------------------------------------------------------- | ----------- | ------------------------------------------------------ |
9
+ | 命令 | 选项 | 合法值 |
10
+ | ------------------------------------------------------------------------- | ----------- | ---------------------------------------------- |
11
11
  | list-accounts, stats, balance, account-history, open-account, transfer, … | -m, --media | Google \| TikTok \| Yandex \| MetaAd \| BingV2 |
12
12
 
13
13
  > 区分大小写;Meta 广告账户用 MetaAd,不是 Facebook。
@@ -20,20 +20,20 @@
20
20
 
21
21
  ### `google-analysis --sections` 维度(25)
22
22
 
23
- | 命令 | 选项 | 合法值 |
24
- | ------------------------------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
+ | 命令 | 选项 | 合法值 |
24
+ | ------------------------------------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
25
  | google-analysis, google-analysis-batch run | --sections | overview \| keywords \| search-terms \| campaigns \| campaign-hour \| ads \| extensions \| devices \| geographic \| geo-matched \| campaign-geo \| campaign-geo-matched \| geo-targeted \| campaign-device \| audience \| asset-images \| videos \| materials \| resource-counts \| conversion-actions \| daily-metrics \| gold-account \| ads-index \| final-urls \| dimension-summary \| campaign-types |
26
26
 
27
27
  > 逗号分隔;省略=全部。`final-urls`、`campaign-types` 不传日期。
28
28
 
29
29
  ### `google-quarterly collect`
30
30
 
31
- | 命令 | 选项 | 说明 |
32
- | ---- | ---- | ---- |
33
- | google-quarterly collect | --inquiries | 运营询盘 **JSON**(数组或 `items`);禁止传 xlsx/csv,由 Agent 先转 |
34
- | google-quarterly collect | --inquiry-conversion | 转化动作名称兜底 |
35
- | google-quarterly collect | --youtube-channel | 可选;本期报告不展示频道订阅总数 / 来源饼 |
36
- | google-quarterly collect | --keyword-seeds | 逗号分隔种子词(Keyword Planner,不是行业指数) |
31
+ | 命令 | 选项 | 说明 |
32
+ | ------------------------ | -------------------- | ------------------------------------------------------------------- |
33
+ | google-quarterly collect | --inquiries | 运营询盘 **JSON**(数组或 `items`);禁止传 xlsx/csv,由 Agent 先转 |
34
+ | google-quarterly collect | --inquiry-conversion | 转化动作名称兜底 |
35
+ | google-quarterly collect | --youtube-channel | 可选;本期报告不展示频道订阅总数 / 来源饼 |
36
+ | google-quarterly collect | --keyword-seeds | 逗号分隔种子词(Keyword Planner,不是行业指数) |
37
37
 
38
38
  ### `google-analysis --level`(extensions 维度)
39
39
 
@@ -49,16 +49,16 @@
49
49
 
50
50
  ### `facebook-analysis --sections` 维度(10)
51
51
 
52
- | 命令 | 选项 | 合法值 |
53
- | ----------------- | ---------- | ----------------------------------------------------------------------------------------------- |
52
+ | 命令 | 选项 | 合法值 |
53
+ | ----------------- | ---------- | -------------------------------------------------------------------------------------------------------------- |
54
54
  | facebook-analysis | --sections | overview \| daily \| campaigns \| ad-sets \| platform \| country \| device \| audience \| creative \| material |
55
55
 
56
56
  > 默认周期报告:overview,daily,country,campaigns,audience。当天/小时巡检不要用 `--sections`,走 `account-status` / `campaign-entities` / `adset-entities` / `ad-entities` / `insights`。
57
57
 
58
58
  ### `facebook-analysis insights --level`
59
59
 
60
- | 命令 | 选项 | 合法值 |
61
- | ---- | ---- | ------ |
60
+ | 命令 | 选项 | 合法值 |
61
+ | -------------------------- | ------- | ------------------------------------- |
62
62
  | facebook-analysis insights | --level | account \| campaigns \| adsets \| ads |
63
63
 
64
64
  ### `facebook-analysis --sections` Google 别名
@@ -73,12 +73,13 @@
73
73
 
74
74
  ### `ad extension * --level`
75
75
 
76
- | 命令 | 选项 | 合法值 |
77
- | ------------------------------------------ | ------------- | ---------------------------------------------------------------------------------- |
78
- | ad extension sitelink, callout, snippet, … | --level | Account \| Campaign \| AdGroup |
79
- | ad extension list | --type | SITELINK \| CALL \| CALLOUT \| STRUCTURED_SNIPPET \| LEAD_FORM \| BUSINESS_MESSAGE |
80
- | ad extension lead-form / update | --config-file | JSON(见 `assets/pmax-lead-form-template.json`) |
81
- | ad extension whatsapp / update | --config-file | JSON(见 `assets/pmax-whatsapp-template.json`) |
76
+ | 命令 | 选项 | 合法值 |
77
+ | ------------------------------------------ | --------------- | ---------------------------------------------------------------------------------- |
78
+ | ad extension sitelink, callout, snippet, … | --level | Account \| Campaign \| AdGroup |
79
+ | ad extension list | --type | SITELINK \| CALL \| CALLOUT \| STRUCTURED_SNIPPET \| LEAD_FORM \| BUSINESS_MESSAGE |
80
+ | ad extension list | --start / --end | YYYY-MM-DD(整户列表区间,默认近 30 天) |
81
+ | ad extension lead-form / update | --config-file | JSON(见 `assets/pmax-lead-form-template.json`) |
82
+ | ad extension whatsapp / update | --config-file | JSON(见 `assets/pmax-whatsapp-template.json`) |
82
83
 
83
84
  ### 搜索系列 `BiddingStrategyTypeV2`
84
85
 
@@ -98,6 +99,15 @@
98
99
  | ------------------------------------- | ----------------- | ----------------- |
99
100
  | ad campaign-create, campaign-validate | campaign.StatusV2 | Enabled \| Paused |
100
101
 
102
+ ### 搜索系列位置选项
103
+
104
+ | 命令 | 选项 | 合法值 |
105
+ | ------------------------------------- | -------------------------------- | ---------------------------------------------------------------------- |
106
+ | ad campaign-create, campaign-validate | campaign.PositiveGeoTargetTypeV2 | Presence(默认,仅所在地)\| PresenceOrInterest \| SearchInterest |
107
+ | ad campaign-create, campaign-validate | campaign.NegativeGeoTargetTypeV2 | Presence(默认)\| PresenceOrInterest |
108
+ | ad campaign-edit | --geo-target-type | presence \| presence-or-interest \| search-interest |
109
+ | ad campaign-edit | --negative-geo-target-type | presence \| presence-or-interest |
110
+
101
111
  ### 预算投放 `BudgetBudgetDeliveryMethodV2`
102
112
 
103
113
  | 命令 | 选项 | 合法值 |
@@ -225,7 +225,7 @@
225
225
  | **P4** | **单个媒体广告账户** 某区间的 **周期数据汇总** | 周期报告、投放月报、**只要**花费/转化/8 维/Excel(**没有**规划/客户版/大族/询盘结构;**没有**点名 Demand Gen) | 媒体 + 账户 ID + 区间 | HTML(默认);用户要 Excel 见 P4 excel 纲要 |
226
226
  | **P4-DG** | **Demand Gen** 投放数据分析 / 汇总报告 | Demand Gen 投放数据分析、需求开发汇总报告、需求生成数据分析、客户与运营共用版 | Google 账户 ID + 区间 | HTML(`google-analysis demand-gen-render`);要 Excel 见 P4-DG excel 纲要 |
227
227
  | **P10** | **单个 Google 账户** 客户版经营复盘 + **下期规划** | **月度报告**、**月总结与规划**、**季度报告**、**Q3 汇总**、**Q4 规划**、**季度汇报**、**投放季报**、客户版、大族模板、下月规划、效率+区域询盘+国家明细 | 账户 ID(季度可省略=上一完整季;月度=上一完整月) | HTML(`google-quarterly render`) |
228
- | **P4-DAILY** | **账户级按日表**(无多维) | 按天导出、投放数据 Excel(非 Google/Meta 周期报告) | 媒体 + 账户 ID + 区间 | xlsx(`stats --by-day`) |
228
+ | **P4-DAILY** | **按日表 / 投放日报** | 按天导出、投放日报、日报 Excel、每天 × 系列/关键词/搜索词、「按这个格式重新拉到昨天」(附旧日报) | 媒体 + 账户 ID + 区间 | Google:xlsx(`google-analysis --by-date` + `daily-render`);其他媒体:xlsx(`stats --by-day`) |
229
229
  | **P4-FB** | **Meta/Facebook 账户** 周期或诊断 | Facebook 报告、Meta 月报、FB **账户**诊断报告 | Meta 账户 ID + 区间 | HTML(`facebook-analysis render`);要表格 `--format xlsx` |
230
230
  | **P6** | **OKKI 周报**(固定客户模板) | 见 §三魔法短语;「表格形式 / 表格 / 各维度表格」仍是 P6 | 账户 ID + 区间 | **必产** 5 Sheet xlsx(`google-analysis okki-render`;禁止 Markdown 表/手写 HTML/Agent 手写 xlsx) |
231
231
  | **P7** | **Google 账户 + CRM 询盘资料** 效果 | 见 §三魔法短语;**须有询盘附件/字段表**(≠ 口语「零询盘」) | 账户 + 分析月 + 询盘资料 | 8 Sheet xlsx |
@@ -279,6 +279,7 @@
279
279
  | `转化成本监控` / `CPA 监控` / `谷歌ADS转化成本` / `低余额账户转化成本` | **P3(§零·D)** | `accounts-digest --max-cpa --skip-balance`;贴 `agentBrief.userDelivery` |
280
280
  | `昨日零询盘` / `零询盘账户` / `0 转化` / `有消耗无转化`(**无 CRM 附件**) | **P3(§零·D)** | `--zero-conversions`;**不是 P7** |
281
281
  | `根据 … 生成 Google **搜索**广告` / `搜索广告方案` / `关键词表` + 官网 URL | **W3** | ≠ P8 ≠ P9;若同时要 **搜索量/竞争度** → **W5** |
282
+ | `投放日报` / `日报` + Excel / 上传旧日报 + `按这个格式` / `重新拉取` / `截止昨日`(Google) | **P4-DAILY** | `google-daily-report-excel.md`:一条 `--by-date` 拉数 + `daily-render`。禁止按天循环、禁止 openpyxl 复刻旧表 |
282
283
  | `Demand Gen` / `需求开发` / `需求生成` + **分析 / 汇总报告 / 投放数据 / 月报 / 周报**(不要创建) | **P4-DG** | `demand-gen-analysis-report.md`;HTML 用 `google-analysis demand-gen-render`。不是 P4 全账户,不是 W3 |
283
284
  | `创建 Demand Gen` / `搭建需求开发` / `需求生成广告`(方案、创建、改预算、启停) | **W3** | `ad demand-gen` + `demand-gen-api.md`。不是 Display,不是 PMax,禁止 `campaign-create`。句子里有分析/汇总报告时改 **P4-DG** |
284
285
  | `展示广告` / `Display 广告` / `自适应展示广告` / `RDA`(要创建/出方案) | `ad-gap` `google.display-campaign` | 不是 Demand Gen。禁止 `campaign-create` 伪装。新建为暂停 |
@@ -88,7 +88,7 @@
88
88
  - **产物**:按 conventions §七 自检;`accountId` 须与用户给的 `mediaCustomerId` 一致。HTML 封面按区间写成「季度」或「月度」,对不上则仍是「周期」。不要打开 HTML 改称呼。
89
89
 
90
90
  > 用户用「OKKI 周报」固定话术 → 改走 **P6**,不按默认 10 章追问。
91
- > 只要账户级按日 Excel(无多维章节)→ **P4-DAILY**。
91
+ > 按日 Excel / 投放日报(含「每天 × 系列 / 关键词 / 搜索词」、按上传的旧日报重拉)→ **P4-DAILY**。
92
92
  > 用户要的是 **Demand Gen / 需求开发** 投放数据分析或汇总报告 → **P4-DG**,不要用本卡的 9 个拉数维。
93
93
 
94
94
  ---
@@ -111,9 +111,16 @@
111
111
 
112
112
  ## P4-DAILY · 按日投放 Excel
113
113
 
114
- - **触发**:按天导出 / 投放数据做成 Excel(非 Google/Meta 多维报告)。
115
- - **必读**:`report-templates/stats-daily-excel.md`。
116
- - **步骤**:核验账户 → `stats … --by-day --json-out` → 脚本写 xlsx。
114
+ - **触发**:按天导出 / 投放数据做成 Excel / 投放日报;用户上传旧日报说「按这个格式重新拉(到昨天)」。
115
+ - **Google**(要每天 × 系列 / 关键词 / 搜索词,或只要账户每天):
116
+ - **必读**:`report-templates/google-daily-report-excel.md`。
117
+ - **步骤**:
118
+ 1. `list-accounts -m Google -k <id>` 核验账户。起始日取旧日报或问用户,截止日按东八区算。
119
+ 2. `google-analysis -a <id> --start <S> --end <E> --sections overview,campaigns,keywords,search-terms --by-date --json-out ./snap-daily`,一条命令拉完。
120
+ 3. `google-analysis daily-render --snapshot-dir ./snap-daily --title … [--note …] --out ….xlsx`。
121
+ 4. 用 stdout 的 `totals` / `latestDay` / `daysWithoutData` 写两三句汇总,交付文件。
122
+ - **禁止**:按天循环拉数;用 openpyxl 复刻旧日报版式;再开 xlsx 逐格核对。
123
+ - **其他媒体**:Read `report-templates/stats-daily-excel.md`。核验账户 → `stats … --by-day --json-out` → 脚本写 xlsx。
117
124
 
118
125
  ---
119
126
 
@@ -145,7 +152,7 @@
145
152
  ```bash
146
153
  siluzan-tso google-analysis-batch run --start <S> --end <D> \
147
154
  --sections campaigns,geographic,keywords \
148
- --account-concurrency 4 --section-concurrency 6 \
155
+ --account-concurrency 12 --section-concurrency 6 \
149
156
  --min-spend 1 --keyword-limit 1000 --json-out ./snap-p5
150
157
  ```
151
158
  4. **中断只能 resume**:`google-analysis-batch resume --json-out ./snap-p5 --run-id <runId>`;只读进度用 `status`。
@@ -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@beta
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.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
67
+ API Key 获取入口:`https://www-ci.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.siluzan.com
131
- googleApiUrl : https://googleapi.mysiluzan.com
132
- webUrl : https://www.siluzan.com
130
+ apiBaseUrl : https://tso-api-ci.siluzan.com
131
+ googleApiUrl : https://googleapi-ci.mysiluzan.com
132
+ webUrl : https://www-ci.siluzan.com
133
133
  apiKey : abcd****1234
134
134
  ```
135
135
 
@@ -45,6 +45,7 @@
45
45
  - **PMax 系列创建**走独立流水线(勿用本文件 JSON 模板):**先 Read `assets/pmax-create-template.json`** + `assets/pmax-create-template.md` + `rules/google-ads-pmax-launch-plan-template.md`;落盘 JSON →(创建阶段 `pmax-validate`)→ **写代码投影完整审查稿** → 用户确认 → `pmax-create`;**Lead Gen/B2B 默认含 `campaignExtensions.leadForm`**(审查稿须单列表单节)。运营诊断见 `rules/google-ads-pmax-guide.md`。PMax **仅出方案**同样**禁止**因缺账户阻塞;`account` 占位,跳过 validate/create。
46
46
  - 搜索网络:仅 Google 搜索(`TargetSearchNetwork`/`TargetContentNetwork`/`TargetPartnerSearchNetwork` 均为 false)。
47
47
  - **地域 id(创建阶段)**:多国用 **`ad geo resolve`**(单国可用 `ad geo search`);**禁止**编造 / ISO 心算。外层 `locations` 与 `targetedLocations` 数量必须一致(validate 硬校验)。**仅出方案**可用国家名占位,勿为取 id 而先逼用户给账户。
48
+ - **投放国家(创建阶段)**:方案和对话里都没写国家时,必须先问用户投哪些国家,等用户回复后才能 `campaign-create`。不能按语种、网址、产品或系列名推断。**位置选项**默认 `PositiveGeoTargetTypeV2: "Presence"`(仅所在地),方案明确要求才写 `PresenceOrInterest` / `SearchInterest`。
48
49
  - **匹配类型**:转换脚本按方案写入 EXACT/PHRASE/BROAD 分块(有方案源时勿压成一律 BROAD)。
49
50
 
50
51
  ---
@@ -161,9 +162,9 @@ validate 与 create **共用** `runCampaignCreateValidation`:词面规范化 +
161
162
  | 1 | `ad batch get --id <taskId> --config-file ./campaign.json --json-out ./snap-campaign` 直至终端态(Creating 时每 5s 轮询;**读落盘 `agentWorkflow.nextCommand`**,勿只看人读提示) |
162
163
  | 2 | `Successfully` / `HasFailed`:执行 `agentWorkflow.nextCommand`(即 `ad batch diff … --json-out`);**Failed** 勿 diff |
163
164
  | 3 | **立刻交付**:把本次 diff stdout 中 `BEGIN_USER_DELIVERY_MARKDOWN`…`END_USER_DELIVERY_MARKDOWN` 全文原样发给用户(即 `reportMarkdown`)。**禁止**只贴系列 ID/counts 摘要,**禁止**等补建结束再交付 |
164
- | 4 | 读落盘 `ok` / `missing[]`;`layer=location` → `ad geo add`;`layer=extension` → 执行 `remediateCommand` |
165
+ | 4 | 读落盘 `ok` / `missing[]`;`layer=location` → `ad geo add` 或 `ad campaign-edit --geo-target-type`(位置选项不一致);`layer=extension` → 执行 `remediateCommand`。`issue=unplanned`(线上多出计划外地域)没有命令,问用户 |
165
166
  | 5 | 无 `remediateCommand` 时,按 JSON 路径映射 `ad extension *` / `adgroup-create` / `keyword-create` / `ad-create` / `keyword-negative-create` |
166
- | 6 | 有缺失时 CLI **exit 2**;补建后再 `ad batch diff`,直到 `ok===true`;每次 diff 后若状态有变可再发更新版详情 |
167
+ | 6 | 有缺失时 CLI **exit 2**;补建后再 `ad batch diff`,直到 `ok===true`。动过地区或位置选项后,**必须**把新 diff 的 Markdown 全文再发一次(见 `google-ads-write.md`「改过地区以后」) |
167
168
  | 7 | 可简短补充「已自动补上 N 个投放国家 / M 条 Sitelink」(**不能代替**步骤 3 的 Markdown 全文) |
168
169
  | 8 | 仅当补建命令也失败时,才向用户说明原因并给改写方案;代改方案另附修改表见 `google-ads-plan-source-fidelity.md` |
169
170
 
@@ -372,7 +372,15 @@ siluzan-tso google-analysis -a <accountId> --sections daily-metrics --start YYYY
372
372
  siluzan-tso google-analysis -a <accountId> --sections campaign-hour --start YYYY-MM-DD --end YYYY-MM-DD --json-out ./snap
373
373
  ```
374
374
 
375
- `keywords` 行上的 `qualityScore` 是质量得分。按日看 `daily-metrics`,按小时看 `campaign-hour`。字段含义见 `references/analytics/account-analytics.md`。谁改了预算用 `ad changes`(最多 30 天),见 `google-ads-exclusions.md`。
375
+ `keywords` 行上的 `qualityScore` 是质量得分。账户按日看 `daily-metrics`,按小时看 `campaign-hour`。字段含义见 `references/analytics/account-analytics.md`。谁改了预算用 `ad changes`(最多 30 天),见 `google-ads-exclusions.md`。
376
+
377
+ 要「每一天 × 广告系列 / 关键词 / 搜索词」时,同一次加上 `--by-date`,不要按天循环:
378
+
379
+ ```bash
380
+ siluzan-tso google-analysis -a <accountId> --sections campaigns,keywords,search-terms --by-date --start YYYY-MM-DD --end YYYY-MM-DD --json-out ./snap
381
+ ```
382
+
383
+ `--by-date` 只作用在 `campaigns`、`keywords`、`search-terms`。行上的 `date` 是 `YYYY-MM-DD`,同一系列或同一个词会有多行。系列行仍带 `competitiveMetrics`(搜索展示份额、页首、绝对页首)。不加 `--by-date` 时这三维仍是整段合计,`date` 为空。网关不支持按日时 CLI 自己逐日拉(最多 92 天),不要另写循环。按日的关键词行不保证有 `qualityScore`。账户每天一行仍用 `daily-metrics`,不要用 `--by-date` 代替。要日报 xlsx 走 `google-analysis daily-render`(`report-templates/google-daily-report-excel.md`)。
376
384
 
377
385
  ---
378
386