siluzan-tso-cli 1.1.44-beta.3 → 1.1.44

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 (143) hide show
  1. package/README.md +1 -2
  2. package/dist/index.js +209 -163
  3. package/dist/skill/AGENTS.md +16 -16
  4. package/dist/skill/_meta.json +2 -2
  5. package/dist/skill/assets/campaign-create-template.md +46 -46
  6. package/dist/skill/assets/market-analysis-rules.md +4 -4
  7. package/dist/skill/assets/pmax-create-template.md +17 -17
  8. package/dist/skill/assets/pmax-lead-form-template.md +12 -12
  9. package/dist/skill/assets/scripts/assemble-campaign-from-plan.mjs +3 -1
  10. package/dist/skill/references/README.md +31 -31
  11. package/dist/skill/references/accounts/accounts-balance-stats.md +38 -36
  12. package/dist/skill/references/accounts/accounts-list.md +21 -21
  13. package/dist/skill/references/accounts/accounts-permissions.md +29 -29
  14. package/dist/skill/references/accounts/accounts.md +9 -9
  15. package/dist/skill/references/accounts/finance.md +1 -2
  16. package/dist/skill/references/accounts/open-account-by-media.md +58 -59
  17. package/dist/skill/references/accounts/open-account-google-ui.md +19 -19
  18. package/dist/skill/references/analytics/account-analytics.md +33 -33
  19. package/dist/skill/references/analytics/google-analysis-batch.md +0 -1
  20. package/dist/skill/references/analytics/keyword-planner-workflows.md +15 -13
  21. package/dist/skill/references/analytics/market-analysis-guide.md +4 -1
  22. package/dist/skill/references/analytics/rag.md +8 -8
  23. package/dist/skill/references/analytics/reporting.md +5 -5
  24. package/dist/skill/references/analytics/website-diagnosis-guide.md +6 -6
  25. package/dist/skill/references/core/agent-conventions.md +54 -54
  26. package/dist/skill/references/core/intent-routing.md +107 -108
  27. package/dist/skill/references/core/setup.md +6 -5
  28. package/dist/skill/references/core/tips.md +0 -1
  29. package/dist/skill/references/core/workflows.md +15 -16
  30. package/dist/skill/references/google-ads/google-ads-campaign-plan.md +55 -55
  31. package/dist/skill/references/google-ads/google-ads-read.md +30 -12
  32. package/dist/skill/references/google-ads/google-ads-write.md +35 -18
  33. package/dist/skill/references/google-ads/google-ads.md +13 -14
  34. package/dist/skill/references/google-ads/rules/README.md +17 -17
  35. package/dist/skill/references/google-ads/rules/google-ads-account-audit.md +6 -8
  36. package/dist/skill/references/google-ads/rules/google-ads-compliance.md +5 -7
  37. package/dist/skill/references/google-ads/rules/google-ads-keyword-strategy.md +9 -9
  38. package/dist/skill/references/google-ads/rules/google-ads-launch-plan-template.md +16 -15
  39. package/dist/skill/references/google-ads/rules/google-ads-plan-source-fidelity.md +27 -27
  40. package/dist/skill/references/google-ads/rules/google-ads-pmax-launch-plan-template.md +41 -41
  41. package/dist/skill/references/misc/tso-home.md +2 -2
  42. package/dist/skill/references/operations/guard.md +24 -24
  43. package/dist/skill/references/operations/hosted-automation-self-control.md +15 -16
  44. package/dist/skill/references/operations/hosted-automation-user-catalog.md +18 -18
  45. package/dist/skill/references/report-templates/README.md +1 -1
  46. package/dist/skill/references/report-templates/bing-period-report.md +16 -16
  47. package/dist/skill/references/report-templates/google-ads-diagnosis.md +26 -23
  48. package/dist/skill/references/report-templates/google-inquiry-analysis.md +1 -1
  49. package/dist/skill/references/report-templates/google-period-report.md +5 -5
  50. package/dist/skill/references/report-templates/meta-account-diagnosis-report.md +2 -2
  51. package/dist/skill/references/report-templates/okki-weekly-google-client.md +0 -1
  52. package/dist/skill/references/report-templates/tiktok-period-report.md +6 -6
  53. package/dist/skill/report-templates/GoogleAdsDiagnosisReport.html +42 -13
  54. package/dist/skill/report-templates/README.md +1 -1
  55. package/dist/skill/report-templates/bing-period-report.html +10 -7
  56. package/dist/skill/report-templates/bing-period-report.md +16 -16
  57. package/dist/skill/report-templates/google-ads-diagnosis.md +26 -23
  58. package/dist/skill/report-templates/google-inquiry-analysis.md +1 -1
  59. package/dist/skill/report-templates/google-period-report.md +5 -5
  60. package/dist/skill/report-templates/meta-account-diagnosis-report.md +2 -2
  61. package/dist/skill/report-templates/okki-weekly-google-client.md +0 -1
  62. package/dist/skill/report-templates/tiktok-period-report.md +6 -6
  63. package/dist/skill/scripts/install.ps1 +3 -3
  64. package/dist/skill/scripts/install.sh +3 -3
  65. package/eval/cases/accounts-entityid-vs-mediaccustomerid.scenario.json +2 -14
  66. package/eval/cases/accounts-mcc-bind-inquiry.scenario.json +1 -3
  67. package/eval/cases/accounts-single-balance-not-bulk.scenario.json +3 -14
  68. package/eval/cases/budget-display-not-raw-micros.scenario.json +1 -8
  69. package/eval/cases/clue-meta-leads-json.scenario.json +2 -14
  70. package/eval/cases/clue-tiktok-leads-json.scenario.json +2 -11
  71. package/eval/cases/destructive-account-delink-needs-confirm.scenario.json +3 -9
  72. package/eval/cases/destructive-forewarning-delete-needs-confirm.scenario.json +3 -9
  73. package/eval/cases/destructive-invoice-apply-needs-confirm.scenario.json +3 -9
  74. package/eval/cases/facebook-analysis-google-section-aliases.scenario.json +2 -11
  75. package/eval/cases/facebook-analysis-not-google-keywords.scenario.json +3 -10
  76. package/eval/cases/facebook-analysis-period-default.scenario.json +2 -14
  77. package/eval/cases/finance-invoice-info-list.scenario.json +3 -11
  78. package/eval/cases/forewarning-list-google.scenario.json +3 -14
  79. package/eval/cases/google-ads-no-structural-without-confirm.scenario.json +2 -6
  80. package/eval/cases/google-analysis-keywords-route.scenario.json +2 -14
  81. package/eval/cases/guard-budget-circuit-all-google.scenario.json +2 -12
  82. package/eval/cases/guard-zero-conv-empty-spend.scenario.json +2 -12
  83. package/eval/cases/human-p1-multiturn.scenario.json +1 -5
  84. package/eval/cases/ir-p1-vs-p8-account-vs-url.scenario.json +5 -17
  85. package/eval/cases/ir-p3-cpa-monitor-not-p7.scenario.json +2 -19
  86. package/eval/cases/ir-p3-zero-inquiry-not-p7.scenario.json +3 -16
  87. package/eval/cases/ir-p4-period-not-diagnosis.scenario.json +3 -16
  88. package/eval/cases/ir-p8-meets-google-ads-requirements-with-url.scenario.json +3 -28
  89. package/eval/cases/ir-p8-network-diagnosis-with-url.scenario.json +3 -25
  90. package/eval/cases/ir-p8-website-monitor-report-with-url.scenario.json +3 -28
  91. package/eval/cases/ir-p8-website-test-report-no-url.scenario.json +3 -14
  92. package/eval/cases/ir-p9-industry-not-p8.scenario.json +3 -19
  93. package/eval/cases/ir-vague-report-clarify.scenario.json +3 -14
  94. package/eval/cases/ir-w3-vs-p8-from-website.scenario.json +2 -8
  95. package/eval/cases/ir-w5-keyword-planner-url-core-terms.scenario.json +2 -22
  96. package/eval/cases/meta-single-balance-not-bulk.scenario.json +3 -17
  97. package/eval/cases/no-legacy-json-flag.scenario.json +2 -6
  98. package/eval/cases/open-account-google-noninteractive.scenario.json +1 -3
  99. package/eval/cases/open-account-tiktok-license-file.scenario.json +1 -3
  100. package/eval/cases/optimize-list-by-account.scenario.json +3 -11
  101. package/eval/cases/p1-single-account-profile.scenario.json +1 -11
  102. package/eval/cases/p2-balance-scan-bulk.scenario.json +2 -9
  103. package/eval/cases/p3-accounts-digest.scenario.json +1 -5
  104. package/eval/cases/p3-cpa-scan-max-cpa.scenario.json +2 -14
  105. package/eval/cases/p4-fb-meta-period-report.scenario.json +2 -12
  106. package/eval/cases/p4-period-report-window.scenario.json +1 -8
  107. package/eval/cases/pmax-asset-group-create-with-bg.scenario.json +2 -13
  108. package/eval/cases/pmax-brand-edit-routing.scenario.json +3 -16
  109. package/eval/cases/pmax-edit-not-campaign-edit.scenario.json +2 -12
  110. package/eval/cases/pmax-enable-brand-guidelines.scenario.json +2 -12
  111. package/eval/cases/pmax-no-assets-update-brand-fields.scenario.json +3 -14
  112. package/eval/cases/rag-before-keyword-expand.scenario.json +1 -11
  113. package/eval/cases/rag-list-then-query.scenario.json +2 -14
  114. package/eval/cases/report-list-google.scenario.json +2 -11
  115. package/eval/cases/report-push-list-google.scenario.json +2 -11
  116. package/eval/cases/setup-login-or-env.scenario.json +1 -3
  117. package/eval/cases/setup-siluzan-data-permission-env.scenario.json +1 -3
  118. package/eval/cases/tiktok-bc-bind-inquiry.scenario.json +2 -6
  119. package/eval/cases/time-range-user-delegates-default.scenario.json +1 -8
  120. package/eval/cases/tips-json-out-filtering.scenario.json +1 -3
  121. package/eval/cases/tips-large-json-pagination.scenario.json +1 -3
  122. package/eval/cases/uj-ad-campaign-validate-before-create-stub.scenario.json +2 -11
  123. package/eval/cases/uj-ad-outdoor-campgear-search-plan.scenario.json +1 -3
  124. package/eval/cases/uj-ad-website-search-plan-table-format.scenario.json +1 -3
  125. package/eval/cases/uj-analytics-30d-pdf-campaign-device-geo.scenario.json +6 -18
  126. package/eval/cases/uj-analytics-compare-google-tiktok-last-month-roi.scenario.json +1 -8
  127. package/eval/cases/uj-analytics-ecommerce-industry-report.scenario.json +2 -14
  128. package/eval/cases/uj-analytics-google-weekly-trends-campaigns-keywords.scenario.json +2 -11
  129. package/eval/cases/uj-analytics-report-push-weekly-email.scenario.json +1 -3
  130. package/eval/cases/uj-finance-invoice-records-this-month.scenario.json +2 -11
  131. package/eval/cases/uj-life-newbie-siluzan-google-end-to-end.scenario.json +1 -4
  132. package/eval/cases/uj-ops-google-accounts-list-normal.scenario.json +2 -17
  133. package/eval/cases/uj-ops-google-yesterday-spend-conversions.scenario.json +2 -14
  134. package/eval/cases/uj-ops-pause-worst-adgroup-confirm.scenario.json +2 -6
  135. package/eval/cases/uj-ops-tiktok-leads-last-week.scenario.json +3 -17
  136. package/eval/cases/uj-patrol-cpc-spike-adgroups-over-15.scenario.json +1 -5
  137. package/eval/cases/uj-patrol-forewarning-create-daily-cap-3000.scenario.json +1 -3
  138. package/eval/cases/uj-patrol-forewarning-trigger-records.scenario.json +3 -17
  139. package/eval/cases/uj-patrol-google-balances-low.scenario.json +2 -11
  140. package/eval/cases/uj-roi-optimize-records-then-execute-cautiously.scenario.json +3 -14
  141. package/eval/cases/uj-roi-search-terms-add-negative-keywords.scenario.json +2 -14
  142. package/eval/cases/yandex-stats-use-porg-mediaccustomerid.scenario.json +3 -21
  143. package/package.json +1 -1
@@ -4,14 +4,14 @@
4
4
 
5
5
  ## 怎么找文档
6
6
 
7
- | 要做什么 | 读哪里 |
8
- | -------- | ------ |
9
- | 锁定工作流 | `SKILL.md` 路由表 |
10
- | 报告类话术模糊 | `references/core/intent-routing.md` |
11
- | 步骤与产物 | `playbooks.md`(P*)或 `workflows.md`(W*) |
12
- | 命令参数 / 字段 | 路由表「必读文档」 |
13
- | 纪律与对用户怎么说 | `references/core/agent-conventions.md` |
14
- | 报告结构纲要 | `report-templates/*.md`(勿读 `*.html`) |
7
+ | 要做什么 | 读哪里 |
8
+ | ------------------ | ------------------------------------------- |
9
+ | 锁定工作流 | `SKILL.md` 路由表 |
10
+ | 报告类话术模糊 | `references/core/intent-routing.md` |
11
+ | 步骤与产物 | `playbooks.md`(P*)或 `workflows.md`(W*) |
12
+ | 命令参数 / 字段 | 路由表「必读文档」 |
13
+ | 纪律与对用户怎么说 | `references/core/agent-conventions.md` |
14
+ | 报告结构纲要 | `report-templates/*.md`(勿读 `*.html`) |
15
15
 
16
16
  ## 启动顺序
17
17
 
@@ -23,13 +23,13 @@
23
23
 
24
24
  ## 按域
25
25
 
26
- | 域 | 路径 | 说明 |
27
- | -- | ---- | ---- |
28
- | Core | `references/core/` | conventions、intent-routing、playbooks、workflows |
29
- | Accounts | `references/accounts/` | 直接读 `accounts-list` / `accounts-balance-stats` / `accounts-permissions` |
30
- | Google Ads | `references/google-ads/` | `google-ads-read` / `write` / `batch`;`rules/` 先 README 再单文件 |
31
- | Analytics | `references/analytics/` | 拉数、批处理、拓词 |
32
- | Operations | `references/operations/` | 预警、线索;自动化仅用户问起时 |
33
- | Templates | `report-templates/*.md`、`assets/` | 报告纲要 / JSON 契约 |
26
+ | 域 | 路径 | 说明 |
27
+ | ---------- | ---------------------------------- | -------------------------------------------------------------------------- |
28
+ | Core | `references/core/` | conventions、intent-routing、playbooks、workflows |
29
+ | Accounts | `references/accounts/` | 直接读 `accounts-list` / `accounts-balance-stats` / `accounts-permissions` |
30
+ | Google Ads | `references/google-ads/` | `google-ads-read` / `write` / `batch`;`rules/` 先 README 再单文件 |
31
+ | Analytics | `references/analytics/` | 拉数、批处理、拓词 |
32
+ | Operations | `references/operations/` | 预警、线索;自动化仅用户问起时 |
33
+ | Templates | `report-templates/*.md`、`assets/` | 报告纲要 / JSON 契约 |
34
34
 
35
35
  源码目录:`tso-cli/assets/siluzan-ads/`。
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.44-beta.3",
4
- "publishedAt": 1786500005435
3
+ "version": "1.1.44",
4
+ "publishedAt": 1786527227101
5
5
  }
@@ -35,17 +35,17 @@ JSON 模板:同目录 [`campaign-create-template.json`](campaign-create-templa
35
35
 
36
36
  用户给了投放方案文件时,**必读** `references/google-ads/rules/google-ads-plan-source-fidelity.md`,并遵守:
37
37
 
38
- | 坑 | 正确做法 |
39
- | -- | -------- |
40
- | 编造 `targetedLocations[].id` 或对 30 国逐条 `geo search` | **一次** `ad geo resolve --from-file … --json-out`;见 `google-ads-plan-source-fidelity.md` |
41
- | 对话里手写完整 campaign JSON | Agent **写转换脚本** Excel → `campaign.json`(落盘),再 validate |
42
- | 方案有 Exact/Phrase,JSON 却一律 `BROAD` | 转换脚本按方案列/词面写入 EXACT/PHRASE/BROAD 分块 |
43
- | validate 失败后未问用户就改词/消重标题/截断 | **询问**「您自己改还是我帮您改?」;见 `google-ads-plan-source-fidelity.md` § 用户方案不合规 |
44
- | 代改后只说「创建成功」不交代改了啥 | 创建完成后出报告:创建清单 + **从 xxx→xxx + 原因**(代改时维护变更账本) |
38
+ | 坑 | 正确做法 |
39
+ | --------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
40
+ | 编造 `targetedLocations[].id` 或对 30 国逐条 `geo search` | **一次** `ad geo resolve --from-file … --json-out`;见 `google-ads-plan-source-fidelity.md` |
41
+ | 对话里手写完整 campaign JSON | Agent **写转换脚本** Excel → `campaign.json`(落盘),再 validate |
42
+ | 方案有 Exact/Phrase,JSON 却一律 `BROAD` | 转换脚本按方案列/词面写入 EXACT/PHRASE/BROAD 分块 |
43
+ | validate 失败后未问用户就改词/消重标题/截断 | **询问**「您自己改还是我帮您改?」;见 `google-ads-plan-source-fidelity.md` § 用户方案不合规 |
44
+ | 代改后只说「创建成功」不交代改了啥 | 创建完成后出报告:创建清单 + **从 xxx→xxx + 原因**(代改时维护变更账本) |
45
45
 
46
46
  **多词短语(与 `keyword-negative-create` 同类误判)**:`KeywordText` 是 **JSON 字符串数组**,**空格多词完全合法**(如 `"how to make"`、`"home cooking"`)。PHRASE 写 `"\"vegan recipe\""` 或裸词 + `MatchTypeV2: "PHRASE"`(validate 会补引号)。**禁止**因「多词」就省略否词或让用户去 Google Ads 后台手补——那是 Agent 误判,不是 `campaign-create` 限制。
47
47
 
48
- 投放方案 Markdown 中 §3.3 关键词矩阵 → `KeywordsForBatchJob`;§3.3 系列级否定词 / §3.4 账户级否定词 → `NegativeKeywordsForBatchJob`(账户级列表仍须在 Google 后台单独应用)。
48
+ 投放方案 Markdown 中 §3.3 关键词矩阵 → `KeywordsForBatchJob`;§3.3 系列级否定词 → `NegativeKeywordsForBatchJob`。**§3.4 账户级否定词**:`campaign-create` 批量接口不支持账户级,需在系列创建完成后**另行**执行 `ad keyword-negative-create --level Account`。
49
49
 
50
50
  ### CLI 参数(勿混用)
51
51
 
@@ -121,17 +121,17 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
121
121
 
122
122
  ## 外层字段(CampaignCreationRecord)
123
123
 
124
- | 字段 | 类型 | 必填 | 说明 |
125
- | -------------------- | -------------- | :--: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
126
- | `account` | string | ✅ | 媒体账户 ID;提交时转为数字 `customerId`(勿依赖引号字符串)。**仅出方案**(未确认创建、无账户)可填 `"[PENDING_ACCOUNT]"` 或 `""`,见 `google-ads-campaign-plan.md` §仅出方案;**create/validate 前**须换成真实 `mediaCustomerId` |
127
- | `customerName` | string | | 展示/智投用客户名;**可省略**——`campaign-create` / `batch publish` 会按 `account` 调 `list-accounts` 自动填入 `mediaCustomerName`。若填写则须与之一致,否则提交时 CLI 自动更正 |
128
- | `name` | string | | 智投 `campaignName`;缺省取 `campaign.Name`;账户内不得与已有在投/暂停系列重名,否则 BatchJob 系列创建失败 |
129
- | `url` | string | | 智投展示用 URL;后端只读,用于回显 |
130
- | `locations` | string[] | | 展示用地区名(后端只读,可空数组);**若填写非空**则长度须与 `campaign.targetedLocations` 一致(validate 硬校验) |
131
- | `productWords` | string[] | | 智投/推荐用产品核心词 |
132
- | `googleDataRecordId` | string \| null | | 智投记录 ID;省略时提交 `""`(CLI 默认) |
133
- | `draft` | boolean | | `false`(默认)立即发布到 Google;`true` 仅保存草稿,需后续 `ad batch publish` |
134
- | `campaign` | object | ✅ | 内层 Campaign 对象,见下表 |
124
+ | 字段 | 类型 | 必填 | 说明 |
125
+ | -------------------- | -------------- | :--: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
126
+ | `account` | string | ✅ | 媒体账户 ID;提交时转为数字 `customerId`(勿依赖引号字符串)。**仅出方案**(未确认创建、无账户)可填 `"[PENDING_ACCOUNT]"` 或 `""`,见 `google-ads-campaign-plan.md` §仅出方案;**create/validate 前**须换成真实 `mediaCustomerId` |
127
+ | `customerName` | string | | 展示/智投用客户名;**可省略**——`campaign-create` / `batch publish` 会按 `account` 调 `list-accounts` 自动填入 `mediaCustomerName`。若填写则须与之一致,否则提交时 CLI 自动更正 |
128
+ | `name` | string | | 智投 `campaignName`;缺省取 `campaign.Name`;账户内不得与已有在投/暂停系列重名,否则 BatchJob 系列创建失败 |
129
+ | `url` | string | | 智投展示用 URL;后端只读,用于回显 |
130
+ | `locations` | string[] | | 展示用地区名(后端只读,可空数组);**若填写非空**则长度须与 `campaign.targetedLocations` 一致(validate 硬校验) |
131
+ | `productWords` | string[] | | 智投/推荐用产品核心词 |
132
+ | `googleDataRecordId` | string \| null | | 智投记录 ID;省略时提交 `""`(CLI 默认) |
133
+ | `draft` | boolean | | `false`(默认)立即发布到 Google;`true` 仅保存草稿,需后续 `ad batch publish` |
134
+ | `campaign` | object | ✅ | 内层 Campaign 对象,见下表 |
135
135
 
136
136
  > 提交时 CLI 另附 `KeywordRecommendationsV2`:`[{ Key: <广告组 Name>, Value: [] }, …]`,由 CLI 自动附加;JSON 文件内无需手写。
137
137
 
@@ -152,17 +152,17 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
152
152
 
153
153
  ### 预算与出价
154
154
 
155
- | 字段 | 类型 | 必填条件 | 说明 |
156
- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------ | ----------------------------- |
157
- | `Budget` | number | ✅ > 0 | 日预算(元) |
158
- | `BudgetShared` | boolean | | 共享预算时为 true |
159
- | `BudgetId` | number / string | | 共享预算 id |
155
+ | 字段 | 类型 | 必填条件 | 说明 |
156
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------------ |
157
+ | `Budget` | number | ✅ > 0 | 日预算(元) |
158
+ | `BudgetShared` | boolean | | 共享预算时为 true |
159
+ | `BudgetId` | number / string | | 共享预算 id |
160
160
  | `BudgetBudgetDeliveryMethodV2` | "STANDARD" \| "ACCELERATED" \| "UNSPECIFIED" \| "UNKNOWN" | | 默认 **STANDARD**;`ACCELERATED` 多数账户会被 Google 拒(validate 警告) |
161
- | `BiddingStrategyTypeV2` | "TARGET_SPEND" \| "MANUAL_CPC" \| "TARGET_CPA" \| "TARGET_ROAS" \| "MAXIMIZE_CONVERSIONS" \| "MAXIMIZE_CONVERSION_VALUE" | ✅ | 出价策略 |
162
- | `TargetSpend_BidCeilingAmount` | number | TARGET_SPEND 时 ✅ | 每次点击费用上限(元) |
163
- | `TargetCpa_BidingAmount` | number | TARGET_CPA 时 ✅ | 目标 CPA(元) |
164
- | `TargetRoas` | number | TARGET_ROAS 时 ✅ | 目标 ROAS(如 2.5 表示 250%) |
165
- | `ManualCpc_EnhancedCpcEnabled` | boolean | | 是否增强 CPC |
161
+ | `BiddingStrategyTypeV2` | "TARGET_SPEND" \| "MANUAL_CPC" \| "TARGET_CPA" \| "TARGET_ROAS" \| "MAXIMIZE_CONVERSIONS" \| "MAXIMIZE_CONVERSION_VALUE" | ✅ | 出价策略 |
162
+ | `TargetSpend_BidCeilingAmount` | number | TARGET_SPEND 时 ✅ | 每次点击费用上限(元) |
163
+ | `TargetCpa_BidingAmount` | number | TARGET_CPA 时 ✅ | 目标 CPA(元) |
164
+ | `TargetRoas` | number | TARGET_ROAS 时 ✅ | 目标 ROAS(如 2.5 表示 250%) |
165
+ | `ManualCpc_EnhancedCpcEnabled` | boolean | | 是否增强 CPC |
166
166
 
167
167
  ### 网络(后端硬约束)
168
168
 
@@ -175,15 +175,15 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
175
175
 
176
176
  ### 地理 / 语言 / 平台
177
177
 
178
- | 字段 | 类型 | 必填 | 说明 |
179
- | ----------------------- | ---------------------------------------- | :--: | --------------------------------------------------------------- |
178
+ | 字段 | 类型 | 必填 | 说明 |
179
+ | ----------------------- | ---------------------------------------- | :--: | ---------------------------------------------------------------------------------------- |
180
180
  | `targetedLocations` | `{ id: string, bidModifier?: number }[]` | ✅ | 至少 1 个;**id 必须来自** `siluzan-tso ad geo search -a <acct> -q <地区名>`(禁止编造) |
181
- | `excludedLocations` | 同上 | | 排除地区 |
182
- | `targetedLanguages` | `{ id: number }[]` | ✅ | 英语 1000,中文 1017 |
183
- | `targetedPlatforms` | `{ id: number, bidModifier?: number }[]` | | 30001 桌面 / 30002 平板 / 30000 移动 |
184
- | `excludedIpAddresses` | string[] | | 排除 IP |
185
- | `PositiveGeoTargetType` | number | | |
186
- | `NegativeGeoTargetType` | number | | |
181
+ | `excludedLocations` | 同上 | | 排除地区 |
182
+ | `targetedLanguages` | `{ id: number }[]` | ✅ | 英语 1000,中文 1017 |
183
+ | `targetedPlatforms` | `{ id: number, bidModifier?: number }[]` | | 30001 桌面 / 30002 平板 / 30000 移动 |
184
+ | `excludedIpAddresses` | string[] | | 排除 IP |
185
+ | `PositiveGeoTargetType` | number | | |
186
+ | `NegativeGeoTargetType` | number | | |
187
187
 
188
188
  ### 时间与 DSA
189
189
 
@@ -197,18 +197,18 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
197
197
 
198
198
  ### 子结构
199
199
 
200
- | 字段 | 类型 | 说明 |
201
- | ----------------------------- | -------- | --------------------------------------------------------------------------------- |
202
- | `AdGroupsForBatchJob` | object[] | **至少 1 组**;见下 |
200
+ | 字段 | 类型 | 说明 |
201
+ | ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
202
+ | `AdGroupsForBatchJob` | object[] | **至少 1 组**;见下 |
203
203
  | `NegativeKeywordsForBatchJob` | object[] | 系列级否词;元素:`{ KeywordText: string[], MatchTypeV2: "BROAD"\|"PHRASE"\|"EXACT", FinalURL: "" }`;**KeywordText 可含空格多词**(见模板示例) |
204
- | `ExtensionsForBatchJob` | object[] | 附加信息;`Properties` 须 **string→string**(勿用数组值)。SITELINK / STRUCTURED_SNIPPET 见下 |
204
+ | `ExtensionsForBatchJob` | object[] | 附加信息;`Properties` 须 **string→string**(勿用数组值)。SITELINK / STRUCTURED_SNIPPET 见下 |
205
205
 
206
206
  #### STRUCTURED_SNIPPET(`typeV2` / `AssetFieldType` = `STRUCTURED_SNIPPET`)
207
207
 
208
- | 字段 | 说明 |
209
- | ---- | ---- |
210
- | `Properties.StructuredSnippetHeaderValue.Key` | **须为合法英文标头**(`ad extension snippet-headers`)。非法值如 `Features` 会被 `campaign-validate` 拦截(建议 `Amenities`) |
211
- | `Properties.StructuredSnippetHeaderValue.Value` | 非空字符串数组(各条目有长度上限) |
208
+ | 字段 | 说明 |
209
+ | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
210
+ | `Properties.StructuredSnippetHeaderValue.Key` | **须为合法英文标头**(`ad extension snippet-headers`)。非法值如 `Features` 会被 `campaign-validate` 拦截(建议 `Amenities`) |
211
+ | `Properties.StructuredSnippetHeaderValue.Value` | 非空字符串数组(各条目有长度上限) |
212
212
 
213
213
  #### SITELINK(`ExtensionsForBatchJob[i]`,`typeV2` / `AssetFieldType` = `SITELINK`)
214
214
 
@@ -268,7 +268,7 @@ siluzan-tso ad batch diff --batch-id <taskId> --config-file ./campaign.json --js
268
268
  | 规则 | 说明 |
269
269
  | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
270
270
  | 基础 | `customerName` / `campaign` 非空;`Budget > 0`;地理/语言至少 1 项 |
271
- | 地域一致性 | 外层 `locations` 非空时,长度须等于 `targetedLocations`;每个 location `id` 须为数字字符串 |
271
+ | 地域一致性 | 外层 `locations` 非空时,长度须等于 `targetedLocations`;每个 location `id` 须为数字字符串 |
272
272
  | 网络 | `TargetPartnerSearchNetwork` 须 false;不可同时关闭 Google 搜索与搜索网络 |
273
273
  | RSA / 关键词 / 附加信息 | 标题 **15** 条、描述 **4** 条(须写满);字符上限、词面非空;RSA `Path1`/`Path2` 必填;SITELINK 行长度限制 |
274
274
  | 否词误填 | `KeywordsForBatchJob` 含常见否词词根或与 `NegativeKeywordsForBatchJob` 重复 → **warnings**(不阻断,须 Agent 修正后再 create) |
@@ -92,11 +92,11 @@
92
92
 
93
93
  ### 呈现规范(HTML)
94
94
 
95
- | 维度 | 要求 |
96
- | -------- | ------------------------------------------------------------------------------------------- |
95
+ | 维度 | 要求 |
96
+ | -------- | ----------------------------------------------------------------------------------------------- |
97
97
  | ECharts | 统一引用 `https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.min.js` + `echarts.init` 图表 |
98
- | 来源脚注 | 图表/关键表配 `Source:` 或「来源」 |
99
- | 版式 | Bootstrap CDN;商务深蓝;max-width 1200px;每 slide 页码点 |
98
+ | 来源脚注 | 图表/关键表配 `Source:` 或「来源」 |
99
+ | 版式 | Bootstrap CDN;商务深蓝;max-width 1200px;每 slide 页码点 |
100
100
 
101
101
  ---
102
102
 
@@ -10,19 +10,19 @@
10
10
 
11
11
  ## Agent 常见坑
12
12
 
13
- | 场景 | 正确做法 |
14
- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
- | 创建 PMax | `pmax-validate` → **写代码**从 JSON 投影完整审查稿 → 用户确认 → `pmax-create` |
16
- | 文案超长 | `pmax-validate --json-out` 读 `lengthViolations`(含完整 `text`);**勿自动截断**,列改写方案给用户确认后再改 JSON 并重跑 validate(同 Search `campaign-validate`) |
17
- | 金额 | JSON 填**主币种「元」**;CLI 提交前 `budget`、`targetCpa_BidingAmount` ×100 |
13
+ | 场景 | 正确做法 |
14
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
+ | 创建 PMax | `pmax-validate` → **写代码**从 JSON 投影完整审查稿 → 用户确认 → `pmax-create` |
16
+ | 文案超长 | `pmax-validate --json-out` 读 `lengthViolations`(含完整 `text`);**勿自动截断**,列改写方案给用户确认后再改 JSON 并重跑 validate(同 Search `campaign-validate`) |
17
+ | 金额 | JSON 填**主币种「元」**;CLI 提交前 `budget`、`targetCpa_BidingAmount` ×100 |
18
18
  | 图片 | **只填 `imagePaths`** 指向本地 PNG/JPEG(**相对路径相对 `--config-file` 所在目录**;`pmax-validate` 会检查文件是否存在);`pmax-create` 自动上传并用 assetId 创建(勿把 Base64 提交进 Git) |
19
- | 视频 | JSON 填 **`videoPath`**(别名 `video` 亦可);`pmax-create` 成功后 **必定**经 PyAPI 上传并链接(含 `--json-out`)。已有 YouTube 用 `youtubeUrlOrId` |
20
- | 附加资产 | **必填** `campaignExtensions`:宣传信息 ≥20、结构化摘要 ≥20、站内链接 ≥6、leadForm、WhatsApp |
21
- | 文案数量 | 短标题 15、长标题 5(Google API 上限,须填满)、描述 5 |
22
- | Lead Gen 方案 | **默认**在 `campaignExtensions` 含 **`leadForm`**(B2B/询盘/留资);仅 callouts/snippets 不算完整方案;用户明确不要才省略 |
23
- | 存量补表单 | 活动已创建时用 `ad extension lead-form`(见 `pmax-lead-form-template.md` 方式 B) |
24
- | 改已上线 PMax | 先 `ad pmax-get` 看 `_brandGuidelinesActive`;改品牌见 `pmax-api.md` § Brand Guidelines |
25
- | 列表复核 | `ad campaigns -a <id> --json-out ./snap`,`channelTypeV2` 应为 `PERFORMANCE_MAX` |
19
+ | 视频 | JSON 填 **`videoPath`**(别名 `video` 亦可);`pmax-create` 成功后 **必定**经 PyAPI 上传并链接(含 `--json-out`)。已有 YouTube 用 `youtubeUrlOrId` |
20
+ | 附加资产 | **必填** `campaignExtensions`:宣传信息 ≥20、结构化摘要 ≥20、站内链接 ≥6、leadForm、WhatsApp |
21
+ | 文案数量 | 短标题 15、长标题 5(Google API 上限,须填满)、描述 5 |
22
+ | Lead Gen 方案 | **默认**在 `campaignExtensions` 含 **`leadForm`**(B2B/询盘/留资);仅 callouts/snippets 不算完整方案;用户明确不要才省略 |
23
+ | 存量补表单 | 活动已创建时用 `ad extension lead-form`(见 `pmax-lead-form-template.md` 方式 B) |
24
+ | 改已上线 PMax | 先 `ad pmax-get` 看 `_brandGuidelinesActive`;改品牌见 `pmax-api.md` § Brand Guidelines |
25
+ | 列表复核 | `ad campaigns -a <id> --json-out ./snap`,`channelTypeV2` 应为 `PERFORMANCE_MAX` |
26
26
 
27
27
  ---
28
28
 
@@ -94,9 +94,9 @@ siluzan-tso ad campaigns -a <accountId> --json-out ./snap
94
94
 
95
95
  **不**随 `POST .../campaign/pmax` 提交;活动创建成功后 CLI 自动调用 `extensionmanagement`。
96
96
 
97
- | 子字段 | 类型 | 说明 |
98
- | -------------------- | -------- | ------------------------------------------------------------------------ |
99
- | `callouts` | string[] | 宣传信息(CALLOUT),每条 ≤25 字符,各创建 1 个扩展 |
97
+ | 子字段 | 类型 | 说明 |
98
+ | -------------------- | -------- | -------------------------------------------------------------------------------------- |
99
+ | `callouts` | string[] | 宣传信息(CALLOUT),每条 ≤25 字符,各创建 1 个扩展 |
100
100
  | `structuredSnippets` | object[] | `{ header, values }`;`values` 至少 3 项、每项 ≤25 字符;`header` 须为 Google 英文枚举 |
101
101
 
102
102
  **`structuredSnippets.header` 合法值(English,与网关 `structuredSnippetHeaders` 一致)**:
@@ -104,8 +104,8 @@ siluzan-tso ad campaigns -a <accountId> --json-out ./snap
104
104
  `Brands`, `Amenities`, `Styles`, `Types`, `Destinations`, `Services`, `Courses`, `Neighbourhoods`, `Shows`, `Insurance coverage`, `Degree programmes`, `Featured hotels`, `Models`
105
105
 
106
106
  勿自创标头(如 `Industries`/`Highlights`/`Certifications`/`Product Types` 等会在挂载时 HTTP 400)。`pmax-validate` 会提前拦截。
107
- | `leadForm` | object | 潜在客户表单;字段同 `pmax-lead-form-template.json` 的 `leadForm` |
108
- | `businessMessage` | object | WhatsApp 私信;字段同 `pmax-whatsapp-template.json` 的 `businessMessage` |
107
+ | `leadForm` | object | 潜在客户表单;字段同 `pmax-lead-form-template.json` 的 `leadForm` |
108
+ | `businessMessage` | object | WhatsApp 私信;字段同 `pmax-whatsapp-template.json` 的 `businessMessage` |
109
109
 
110
110
  标头可选值:`ad extension snippet-headers`。WhatsApp 需 Google API 白名单(见 `pmax-whatsapp-template.md`)。
111
111
 
@@ -36,19 +36,19 @@ siluzan-tso ad extension update -a <accountId> --id <extensionId> --config-file
36
36
 
37
37
  ## 字段说明
38
38
 
39
- | 字段 | 类型 | 必填 | 说明 |
40
- | ---------------------------------- | -------- | :--: | -------------------------------------------------------------- |
41
- | `account` | string | ✅ | Google 媒体客户 ID |
42
- | `campaignId` | string | ✅ | PMax 活动 ID(`channelTypeV2=PERFORMANCE_MAX`) |
43
- | `leadForm.businessName` | string | ✅ | 商家名称(≤25 字符) |
44
- | `leadForm.headline` | string | ✅ | 表单标题(**≤30 字符**,超长网关常直接 HTTP 400) |
45
- | `leadForm.description` | string | ✅ | 表单描述(≤200 字符) |
46
- | `leadForm.privacyPolicyUrl` | string | ✅ | 隐私政策 URL |
47
- | `leadForm.finalUrl` | string | ✅ | 落地页 URL |
48
- | `leadForm.callToActionType` | string | | 默认 `LEARN_MORE` |
49
- | `leadForm.callToActionDescription` | string | | 默认 `Contact us`(≤30 字符) |
39
+ | 字段 | 类型 | 必填 | 说明 |
40
+ | ---------------------------------- | -------- | :--: | ---------------------------------------------------------------------------------- |
41
+ | `account` | string | ✅ | Google 媒体客户 ID |
42
+ | `campaignId` | string | ✅ | PMax 活动 ID(`channelTypeV2=PERFORMANCE_MAX`) |
43
+ | `leadForm.businessName` | string | ✅ | 商家名称(≤25 字符) |
44
+ | `leadForm.headline` | string | ✅ | 表单标题(**≤30 字符**,超长网关常直接 HTTP 400) |
45
+ | `leadForm.description` | string | ✅ | 表单描述(≤200 字符) |
46
+ | `leadForm.privacyPolicyUrl` | string | ✅ | 隐私政策 URL |
47
+ | `leadForm.finalUrl` | string | ✅ | 落地页 URL |
48
+ | `leadForm.callToActionType` | string | | 默认 `LEARN_MORE` |
49
+ | `leadForm.callToActionDescription` | string | | 默认 `Contact us`(≤30 字符) |
50
50
  | `leadForm.fields` | object[] | ✅ | 至少 1 项;`inputType` 如 `FULL_NAME`、`EMAIL`、`PHONE_NUMBER`(**无** `MESSAGE`) |
51
- | `leadForm.webhook` | object | | 写入 Google 的 Webhook(非平台接收端) |
51
+ | `leadForm.webhook` | object | | 写入 Google 的 Webhook(非平台接收端) |
52
52
 
53
53
  ---
54
54
 
@@ -39,7 +39,9 @@ function stripMeta(value) {
39
39
  }
40
40
 
41
41
  function normalizeMatchType(raw) {
42
- const u = String(raw ?? "BROAD").trim().toUpperCase();
42
+ const u = String(raw ?? "BROAD")
43
+ .trim()
44
+ .toUpperCase();
43
45
  if (u === "EXACT" || u === "完全匹配" || u === "精确匹配") return "EXACT";
44
46
  if (u === "PHRASE" || u === "词组匹配" || u === "短语匹配") return "PHRASE";
45
47
  if (u === "BROAD" || u === "广泛匹配") return "BROAD";
@@ -4,44 +4,44 @@
4
4
 
5
5
  ## 基础与纪律
6
6
 
7
- | 文件 | 用途 |
8
- | ------------------------------------------- | ------------------------------------------------------------------------------------------- |
9
- | `references/core/setup.md` | 安装、登录(手机验证码优先)、配置、更新 |
10
- | `references/core/agent-conventions.md` | 通用纪律 + §十四沟通 |
11
- | `references/core/user-communication-guide.md` | 重定向 → `agent-conventions.md` §十四 |
12
- | `references/core/intent-routing.md` | 报告/分析/拓词话术消歧 |
13
- | `references/core/tips.md` | `--json-out` 脚本食谱 |
14
- | `references/core/playbooks.md` | 分析/报告工作流(P1–P9) |
15
- | `references/core/workflows.md` | 操作/管理工作流(W1–W12) |
16
- | `references/core/subagent-orchestration.md` | 可选:P5/P6/P7 委派 subagent |
17
- | `references/core/skill-authoring.md` | 维护约定(运行时勿加载) |
7
+ | 文件 | 用途 |
8
+ | --------------------------------------------- | ---------------------------------------- |
9
+ | `references/core/setup.md` | 安装、登录(手机验证码优先)、配置、更新 |
10
+ | `references/core/agent-conventions.md` | 通用纪律 + §十四沟通 |
11
+ | `references/core/user-communication-guide.md` | 重定向 → `agent-conventions.md` §十四 |
12
+ | `references/core/intent-routing.md` | 报告/分析/拓词话术消歧 |
13
+ | `references/core/tips.md` | `--json-out` 脚本食谱 |
14
+ | `references/core/playbooks.md` | 分析/报告工作流(P1–P9) |
15
+ | `references/core/workflows.md` | 操作/管理工作流(W1–W12) |
16
+ | `references/core/subagent-orchestration.md` | 可选:P5/P6/P7 委派 subagent |
17
+ | `references/core/skill-authoring.md` | 维护约定(运行时勿加载) |
18
18
 
19
19
  ## 账户与财务
20
20
 
21
- | 文件 | 用途 |
22
- | ----------------------------------------------- | ---------------------------------------------------------------- |
23
- | `references/accounts/accounts.md` | **账户域索引**(按任务再读子文件) |
24
- | `references/accounts/accounts-list.md` | list-accounts、激活账单、开户申请历史 |
21
+ | 文件 | 用途 |
22
+ | ----------------------------------------------- | ----------------------------------------------------------------- |
23
+ | `references/accounts/accounts.md` | **账户域索引**(按任务再读子文件) |
24
+ | `references/accounts/accounts-list.md` | list-accounts、激活账单、开户申请历史 |
25
25
  | `references/accounts/accounts-balance-stats.md` | balance、**balance-scan(P2)**、stats、**accounts-digest(P3)** |
26
- | `references/accounts/accounts-permissions.md` | 分享/解绑/重授权/MCC/BC/BM/关闭/提现/邮箱授权 |
27
- | `references/accounts/currency.md` | CNY/USD 字段来源、符号、跨币种禁止求和 |
28
- | `references/accounts/open-account-by-media.md` | 各媒体开户命令与参数 |
29
- | `references/accounts/open-account-google-ui.md` | Google 开户字段与 Agent 流程 |
30
- | `references/accounts/finance.md` | 转账、开票、充值 |
31
- | `references/accounts/write-audit-restore.md` | 写审计、`--commit`、restore |
26
+ | `references/accounts/accounts-permissions.md` | 分享/解绑/重授权/MCC/BC/BM/关闭/提现/邮箱授权 |
27
+ | `references/accounts/currency.md` | CNY/USD 字段来源、符号、跨币种禁止求和 |
28
+ | `references/accounts/open-account-by-media.md` | 各媒体开户命令与参数 |
29
+ | `references/accounts/open-account-google-ui.md` | Google 开户字段与 Agent 流程 |
30
+ | `references/accounts/finance.md` | 转账、开票、充值 |
31
+ | `references/accounts/write-audit-restore.md` | 写审计、`--commit`、restore |
32
32
 
33
33
  ## Google 广告
34
34
 
35
- | 文件 | 用途 |
36
- | --------------------------------------------------- | ------------------------------------ |
35
+ | 文件 | 用途 |
36
+ | --------------------------------------------------- | -------------------------------------- |
37
37
  | `references/google-ads/google-ads.md` | **Google Ads 索引**(金额/ID Gotchas) |
38
- | `references/google-ads/google-ads-read.md` | 系列/组/创意/关键词/搜索词/地理查询 |
39
- | `references/google-ads/google-ads-write.md` | 创建/编辑/启停/扩展/PMax/设备出价 |
40
- | `references/google-ads/google-ads-batch.md` | batch 流水线、ad batch、智投草稿 |
41
- | `references/google-ads/google-ads-campaign-plan.md` | 搜索系列 7 步流水线、validate/create |
42
- | `references/google-ads/pmax-api.md` | PMax 网关路径、金额口径 |
43
- | `references/analytics/keyword-planner-workflows.md` | keyword / google-analysis 拓词 |
44
- | `references/google-ads/rules/README.md` | 优化/合规 SOP 索引 |
38
+ | `references/google-ads/google-ads-read.md` | 系列/组/创意/关键词/搜索词/地理查询 |
39
+ | `references/google-ads/google-ads-write.md` | 创建/编辑/启停/扩展/PMax/设备出价 |
40
+ | `references/google-ads/google-ads-batch.md` | batch 流水线、ad batch、智投草稿 |
41
+ | `references/google-ads/google-ads-campaign-plan.md` | 搜索系列 7 步流水线、validate/create |
42
+ | `references/google-ads/pmax-api.md` | PMax 网关路径、金额口径 |
43
+ | `references/analytics/keyword-planner-workflows.md` | keyword / google-analysis 拓词 |
44
+ | `references/google-ads/rules/README.md` | 优化/合规 SOP 索引 |
45
45
 
46
46
  ## 分析与报告
47
47
 
@@ -92,7 +92,7 @@
92
92
  | ---------------------------------------------------------------- | ------------------------------ |
93
93
  | `google-period-report.md` | Google 账户周期/月度报告(P4) |
94
94
  | `google-period-report-excel.md` | P4 用户要 Excel |
95
- | `stats-daily-excel.md` | P4-DAILY 按日 Excel |
95
+ | `stats-daily-excel.md` | P4-DAILY 按日 Excel |
96
96
  | `meta-period-report.md` / `meta-period-report-excel.md` | Meta 周期(P4-FB) |
97
97
  | `google-ads-diagnosis.md` / `google-account-diagnosis-report.md` | Google 诊断(P1) |
98
98
  | `website-diagnosis-report.md` | 网站诊断(P8) |
@@ -19,17 +19,17 @@
19
19
  siluzan-tso balance-scan -m <媒体类型> [选项]
20
20
  ```
21
21
 
22
- | 选项 | 说明 | 默认 |
23
- | ---- | ---- | ---- |
24
- | `-m, --media <type>` | 必填:`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai` | — |
25
- | `-a, --accounts <ids>` | 指定 `mediaCustomerId`(逗号分隔);**跳过清单翻页**,拉取后全部输出(不按阈值过滤) | — |
26
- | `--threshold-days <n>` | 剩余续航天数阈值 | `7` |
27
- | `--spend-days <n>` | 日均消耗回看自然日数(截至昨天不含今天;日均 = 窗口合计 / N) | `7` |
28
- | `--min-balance <n>` | 绝对余额阈值(与 threshold 取并集) | — |
29
- | `--min-daily-spend <n>` | 日均消耗低于此值视为僵尸账户,不做续航估算 | `0.01` |
30
- | `--target-days <n>` | 建议充值目标续航天数 | `30` |
31
- | `--page-size <n>` / `--max-pages <n>` | 全量扫描分页(上限 500 / 200) | `200` / `20` |
32
- | `--json-out` | Agent 推荐落盘 | — |
22
+ | 选项 | 说明 | 默认 |
23
+ | ------------------------------------- | ------------------------------------------------------------------------------------ | ------------ |
24
+ | `-m, --media <type>` | 必填:`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai` | — |
25
+ | `-a, --accounts <ids>` | 指定 `mediaCustomerId`(逗号分隔);**跳过清单翻页**,拉取后全部输出(不按阈值过滤) | — |
26
+ | `--threshold-days <n>` | 剩余续航天数阈值 | `7` |
27
+ | `--spend-days <n>` | 日均消耗回看自然日数(截至昨天不含今天;日均 = 窗口合计 / N) | `7` |
28
+ | `--min-balance <n>` | 绝对余额阈值(与 threshold 取并集) | — |
29
+ | `--min-daily-spend <n>` | 日均消耗低于此值视为僵尸账户,不做续航估算 | `0.01` |
30
+ | `--target-days <n>` | 建议充值目标续航天数 | `30` |
31
+ | `--page-size <n>` / `--max-pages <n>` | 全量扫描分页(上限 500 / 200) | `200` / `20` |
32
+ | `--json-out` | Agent 推荐落盘 | — |
33
33
 
34
34
  **示例:**
35
35
 
@@ -57,11 +57,11 @@ siluzan-tso balance-scan -m MetaAd --json-out ./snap-p2-meta
57
57
  siluzan-tso balance -m <媒体类型> -a <账户ID列表>
58
58
  ```
59
59
 
60
- | 选项 | 说明 |
61
- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
62
- | `-m, --media <type>` | 媒体类型(必填):`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai`(MetaAd 走 `GetMediaAccountInfo`,余额字段为 `spend_cap`) |
60
+ | 选项 | 说明 |
61
+ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | `-m, --media <type>` | 媒体类型(必填):`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai`(MetaAd 走 `GetMediaAccountInfo`,余额字段为 `spend_cap`) |
63
63
  | `-a, --accounts <ids>` | 账户 `mediaCustomerId`(来自 `list-accounts` 的 `ma.mediaCustomerId`),逗号分隔(必填)。**禁止**传 `entityId` / tokenId / 其它 UUID;Yandex 须传 `porg-…` |
64
- | `--json-out` | 输出原始 JSON;不支持或查询失败时 stdout 为 `{"ok":false,"error":"..."}` |
64
+ | `--json-out` | 输出原始 JSON;不支持或查询失败时 stdout 为 `{"ok":false,"error":"..."}` |
65
65
 
66
66
  **示例:**
67
67
 
@@ -93,6 +93,7 @@ siluzan-tso balance -m Google -a 6326027735 --json-out ./snap
93
93
  > **数据时效性**:与 `stats` / `balance-scan` 相同(Google `account-spend-overview` 分流;TikTok/Yandex/BingV2/Kwai/**MetaAd** 为截至昨天的 `accountsoverview`)。完整表见 `references/analytics/account-analytics.md` 顶部。
94
94
 
95
95
  > **反模式**:
96
+ >
96
97
  > - **无** `--period` / `--date-start`;区间只用 `--start`/`--end`(别名 `--start-date`/`--end-date`)。
97
98
  > - 口语「零询盘 / 转化成本」且**无 CRM 询盘附件** → 本命令(P3),**不是** P7。
98
99
  > - `conversions` / `cpa` 可能为 **null**(overview 未返回转化)→ 交付写「转化未返回」;脚本勿对 null 做数值比较。过滤用 `--max-cpa` / `--zero-conversions`,勿手写脆弱 Python。
@@ -101,19 +102,19 @@ siluzan-tso balance -m Google -a 6326027735 --json-out ./snap
101
102
  siluzan-tso accounts-digest -m <媒体类型> [选项]
102
103
  ```
103
104
 
104
- | 选项 | 说明 | 默认 |
105
- | --------------------------- | ------------------------------------------------------------------------------------------------------------- | ------- |
106
- | `-m, --media <type>` | 媒体类型(必填):`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai` | — |
107
- | `-a, --accounts <ids>` | 指定 `mediaCustomerId`,逗号分隔;**留空**则翻页拉该媒体全部账户 | — |
108
- | `--start <YYYY-MM-DD>` | 统计开始日期(SKILL 要求 AI 先与用户确认区间) | 近 7 天 |
109
- | `--end <YYYY-MM-DD>` | 统计结束日期 | 昨天 |
110
- | `--start-date` / `--end-date` | 同 `--start` / `--end`(兼容别名) | — |
111
- | `--min-spend <n>` | 过滤:区间内消耗 ≤ 此值的账户不返回 | `0` |
112
- | `--max-cpa <n>` | 过滤:保留 CPA > n 的账户;有消耗且转化为 0 视为命中(CPA 无穷) | — |
113
- | `--zero-conversions` | 过滤:保留区间消耗 > 0 且转化 = 0 或转化未返回的账户 | off |
114
- | `--page-size <n>` | 全量扫描时清单分页大小(上限 500) | `200` |
115
- | `--max-pages <n>` | 全量扫描时最多页数(上限 200) | `20` |
116
- | `--json-out <path>` | **Agent 推荐**:落盘目录或 `*.json` 文件;stdout 一行摘要(含 `outlineFile`、`writtenFiles`、`manifestFile`) | — |
105
+ | 选项 | 说明 | 默认 |
106
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------- | ------- |
107
+ | `-m, --media <type>` | 媒体类型(必填):`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai` | — |
108
+ | `-a, --accounts <ids>` | 指定 `mediaCustomerId`,逗号分隔;**留空**则翻页拉该媒体全部账户 | — |
109
+ | `--start <YYYY-MM-DD>` | 统计开始日期(SKILL 要求 AI 先与用户确认区间) | 近 7 天 |
110
+ | `--end <YYYY-MM-DD>` | 统计结束日期 | 昨天 |
111
+ | `--start-date` / `--end-date` | 同 `--start` / `--end`(兼容别名) | — |
112
+ | `--min-spend <n>` | 过滤:区间内消耗 ≤ 此值的账户不返回 | `0` |
113
+ | `--max-cpa <n>` | 过滤:保留 CPA > n 的账户;有消耗且转化为 0 视为命中(CPA 无穷) | — |
114
+ | `--zero-conversions` | 过滤:保留区间消耗 > 0 且转化 = 0 或转化未返回的账户 | off |
115
+ | `--page-size <n>` | 全量扫描时清单分页大小(上限 500) | `200` |
116
+ | `--max-pages <n>` | 全量扫描时最多页数(上限 200) | `20` |
117
+ | `--json-out <path>` | **Agent 推荐**:落盘目录或 `*.json` 文件;stdout 一行摘要(含 `outlineFile`、`writtenFiles`、`manifestFile`) | — |
117
118
 
118
119
  **`--json-out` 落盘**:
119
120
 
@@ -156,6 +157,7 @@ siluzan-tso accounts-digest -m Google --start 2026-07-20 --end 2026-07-20 \
156
157
  ## stats — 查询投放消耗数据
157
158
 
158
159
  > **数据时效性**:
160
+ >
159
161
  > - **Google**:走 `account-spend-overview`;`--start` / `--end` 日历日按 **UTC+8** 转为 `YYYY-MM-DDTHH:mm:ss+08:00` 再请求(起 00:00:00、止 23:59:59,含今天时 end 截到当前时刻)。与 `google-analysis`(只传年月日)口径不同。
160
162
  > - 窗口完全在历史 → `database` 模式;窗口含今天 → `googleCombined` 模式(仅实时消耗,无余额/状态/币种/账户名)。
161
163
  > - **TikTok / Yandex / BingV2 / Kwai**:走旧版 `accountsoverview`,每日凌晨同步昨天数据,**不能查今天**。判断这几家的「今天/当天/今日消耗」仍需走 `google-analysis(-batch) --sections overview`(仅 Google)。
@@ -165,15 +167,15 @@ siluzan-tso accounts-digest -m Google --start 2026-07-20 --end 2026-07-20 \
165
167
  siluzan-tso stats -m <媒体类型> [选项]
166
168
  ```
167
169
 
168
- | 选项 | 说明 | 默认 |
169
- | ----------------------------- | ----------------------------------------------------------------------------- | ------ |
170
- | `-m, --media <type>` | 媒体类型(必填) | — |
170
+ | 选项 | 说明 | 默认 |
171
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------ |
172
+ | `-m, --media <type>` | 媒体类型(必填) | — |
171
173
  | `-a, --accounts <ids>` | 账户 `mediaCustomerId`(**必填**;与 `list-accounts` 的 `ma.mediaCustomerId` 一致;Yandex=`porg-…`;**禁止** UUID/`entityId`) | — |
172
- | `--start <YYYY-MM-DD>` | 开始日期 | 7 天前 |
173
- | `--end <YYYY-MM-DD>` | 结束日期 | 昨天 |
174
- | `--start-date` / `--end-date` | 与 `--start` / `--end` 同义(CLI 别名,与 SKILL Playbook 一致) | — |
175
- | `--by-day` | 按日明细(`items[]` 带 `date`);按日 Excel 见 `stats-daily-excel.md` | 关 |
176
- | `--json-out` | 输出原始 JSON;**失败时 stdout 仍为 JSON**(`{"ok":false,"error":"..."}`) | — |
174
+ | `--start <YYYY-MM-DD>` | 开始日期 | 7 天前 |
175
+ | `--end <YYYY-MM-DD>` | 结束日期 | 昨天 |
176
+ | `--start-date` / `--end-date` | 与 `--start` / `--end` 同义(CLI 别名,与 SKILL Playbook 一致) | — |
177
+ | `--by-day` | 按日明细(`items[]` 带 `date`);按日 Excel 见 `stats-daily-excel.md` | 关 |
178
+ | `--json-out` | 输出原始 JSON;**失败时 stdout 仍为 JSON**(`{"ok":false,"error":"..."}`) | — |
177
179
 
178
180
  **口径(易错)**:默认 **`spend` = 区间合计**(非日消耗)。按日加 `--by-day`;单日可用 `start=end`;日均用 `spend/天数` 或 `balance-scan` 的 `dailySpend`。
179
181