siluzan-tso-cli 1.1.45 → 1.1.46-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.js +480 -106
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/accounts/accounts-balance-stats.md +10 -10
- package/dist/skill/references/accounts/accounts-list.md +1 -1
- package/dist/skill/references/accounts/accounts-permissions.md +2 -2
- package/dist/skill/references/accounts/finance.md +1 -1
- package/dist/skill/references/accounts/open-account-by-media.md +1 -1
- package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
- package/dist/skill/references/analytics/account-analytics.md +74 -13
- package/dist/skill/references/analytics/rag.md +1 -1
- package/dist/skill/references/analytics/reporting.md +5 -5
- package/dist/skill/references/core/setup.md +5 -5
- package/dist/skill/references/google-ads/rules/google-ads-keyword-strategy.md +8 -8
- package/dist/skill/references/misc/tso-home.md +2 -2
- package/dist/skill/references/operations/hosted-automation-monitoring-json.md +9 -9
- package/dist/skill/references/operations/hosted-automation-scenarios.md +2 -0
- package/dist/skill/references/report-templates/REPORT-WORKFLOW.md +3 -3
- package/dist/skill/references/report-templates/yandex-period-report-excel.md +45 -45
- package/dist/skill/references/report-templates/yandex-period-report.md +26 -27
- package/dist/skill/report-templates/REPORT-WORKFLOW.md +3 -3
- package/dist/skill/report-templates/yandex-period-report-excel.md +45 -45
- package/dist/skill/report-templates/yandex-period-report.html +1377 -1164
- package/dist/skill/report-templates/yandex-period-report.md +26 -27
- package/dist/skill/scripts/install.ps1 +3 -3
- package/dist/skill/scripts/install.sh +3 -3
- package/package.json +1 -1
package/dist/skill/_meta.json
CHANGED
|
@@ -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`
|
|
22
|
+
| 选项 | 说明 | 默认 |
|
|
23
|
+
| ------------------------------------- | ------------------------------------------------------------------------------ | ------------ |
|
|
24
|
+
| `-m, --media <type>` | 必填:`Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai` | — |
|
|
25
25
|
| `-a, --accounts <ids>` | 指定 `mediaCustomerId`(逗号分隔);**跳过清单翻页**,对这些 ID 拉数后全部输出 | — |
|
|
26
|
-
| `--threshold-days <n>` | 剩余续航天数阈值
|
|
27
|
-
| `--spend-days <n>` | 日均消耗回看自然日数(截至昨天不含今天,**北京时间**;日均 = 窗口合计 / N)
|
|
28
|
-
| `--min-balance <n>` | 绝对余额阈值(与 threshold 取并集)
|
|
29
|
-
| `--min-daily-spend <n>` | 日均消耗低于此值视为僵尸账户,不做续航估算
|
|
30
|
-
| `--target-days <n>` | 建议充值目标续航天数
|
|
31
|
-
| `--page-size <n>` / `--max-pages <n>` | 全量扫描分页(上限 500 / 200)
|
|
32
|
-
| `--json-out` | Agent 推荐落盘
|
|
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
|
|
|
@@ -167,7 +167,7 @@ siluzan-tso account-history --start 2026-03-01 --end 2026-03-31 --json-out ./sna
|
|
|
167
167
|
| 状态 | 含义 | 下一步操作 |
|
|
168
168
|
| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
169
169
|
| `Pending` | 审核中 | 等待,可反复运行此命令轮询;审核周期因媒体而异 |
|
|
170
|
-
| `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Kwai、Yandex 当前没有对应充值界面) |
|
|
170
|
+
| `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Kwai、Yandex 当前没有对应充值界面) |
|
|
171
171
|
| `Rejected` | 被拒 | 查看 `--json-out` 落盘中的 `reason` 字段了解拒绝原因;修改资料后重新提交;若原因不明,引导用户联系丝路赞客服 |
|
|
172
172
|
|
|
173
173
|
---
|
|
@@ -488,7 +488,7 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
|
|
|
488
488
|
|
|
489
489
|
| 功能 | 媒体 | 网页路径 |
|
|
490
490
|
| --------------------------------------- | ------ | ------------------------------------------------- |
|
|
491
|
-
| **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
|
|
491
|
+
| **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www-ci.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
|
|
492
492
|
|
|
493
493
|
**Agent 建议话术**:
|
|
494
494
|
|
|
@@ -497,5 +497,5 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
|
|
|
497
497
|
siluzan-tso config show # 查看 webUrl 字段
|
|
498
498
|
|
|
499
499
|
# 账户激活(Google)→ 引导至账户管理页
|
|
500
|
-
# https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts
|
|
500
|
+
# https://www-ci.siluzan.com/v3/foreign_trade/tso/manageAccounts
|
|
501
501
|
```
|
|
@@ -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
|
---
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- Google 账户分析:`google-analysis` 命令
|
|
11
11
|
- Meta / Facebook Ads 账户分析
|
|
12
12
|
- TikTok 账户分析
|
|
13
|
-
- Bing(BingV2
|
|
13
|
+
- Bing(BingV2)账户分析(含原始实体只读运营子命令 / `--aggregation` 近实时报表)
|
|
14
14
|
- Yandex 账户分析
|
|
15
15
|
- 报告模板
|
|
16
16
|
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
|
|
23
23
|
涉及"今天/当天/今日消耗""实时消耗排行"等问题时,**必须**先按此表确认接口口径,否则今天消耗会被误判为 0。
|
|
24
24
|
|
|
25
|
-
| 命令 / 接口 | 时效性
|
|
26
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
|
-
| `google-analysis --sections overview`(Google 网关 `OverviewSectionData`) | **实时**;请求起止为 **YYYY-MM-DD**(不附加时区)
|
|
28
|
-
| `google-analysis --sections campaign-types`(`types-summary`) | **实时**
|
|
29
|
-
| `google-analysis` 其他 range 维度(`campaigns` / `keywords` / `devices` / `geographic` / `daily-metrics` / …) | 实时(受 Google Ads API 同步延迟影响);**一律 YYYY-MM-DD**(不附加时区;与 `stats` 的 UTC+8 不同)
|
|
25
|
+
| 命令 / 接口 | 时效性 | 能否查"今天" | 典型用途 |
|
|
26
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------------------------------ |
|
|
27
|
+
| `google-analysis --sections overview`(Google 网关 `OverviewSectionData`) | **实时**;请求起止为 **YYYY-MM-DD**(不附加时区) | ✅ 可查当天 | 当天/今日消耗、当天高消耗账号排行 |
|
|
28
|
+
| `google-analysis --sections campaign-types`(`types-summary`) | **实时** | ✅ 可查当天 | 当天系列类型分布 |
|
|
29
|
+
| `google-analysis` 其他 range 维度(`campaigns` / `keywords` / `devices` / `geographic` / `daily-metrics` / …) | 实时(受 Google Ads API 同步延迟影响);**一律 YYYY-MM-DD**(不附加时区;与 `stats` 的 UTC+8 不同) | 可查当天,但当天可能尚未结算 | 周期分析、报告 |
|
|
30
30
|
| `stats -m Google` / `balance-scan -m Google` / `accounts-digest -m Google` / `list-accounts -m Google` 合并消耗(TSO `account-spend-overview`,2026-05 起) | **后端自动分流**:窗口完全在历史 → `database`;含今天 → `googleCombined`。**凡走本接口的请求起止一律东八区墙钟**(`…T00:00:00+08:00` ~ `…T23:59:59+08:00`) | ✅ 可查当天(含今天时切实时聚合) | 历史回溯、巡检、周报 KPI、余额续航估算 |
|
|
31
|
-
| `stats` / `balance-scan` / `accounts-digest` / `list-accounts` 的 **TikTok / Yandex / BingV2 / Kwai / MetaAd** 合并消耗(TSO `accountsoverview`;MetaAd OAuth 户走 `FacebookAds` 段) | **每日同步昨天**
|
|
32
|
-
| `balance`(`GetMediaAccountInfo`) | 实时
|
|
31
|
+
| `stats` / `balance-scan` / `accounts-digest` / `list-accounts` 的 **TikTok / Yandex / BingV2 / Kwai / MetaAd** 合并消耗(TSO `accountsoverview`;MetaAd OAuth 户走 `FacebookAds` 段) | **每日同步昨天** | ❌ 查今天会全为 0 | 历史回溯、巡检、余额续航估算(口径为"截至昨天") |
|
|
32
|
+
| `balance`(`GetMediaAccountInfo`) | 实时 | — | 仅当前余额,不反映消耗 |
|
|
33
33
|
|
|
34
34
|
**选用规则**:
|
|
35
35
|
|
|
@@ -367,6 +367,67 @@ Bing 的 `ctr` / `conversionRate` 为 0~1 小数\*\*(`0.007434` = 0.74%),
|
|
|
367
367
|
|
|
368
368
|
各 `overview-*.outline.txt` 等文件头部含 `//` 硬提示,Agent **须先读 outline** 再写报告。
|
|
369
369
|
|
|
370
|
+
### Bing 只读运营子命令(原始实体,供自动化监控/优化使用)
|
|
371
|
+
|
|
372
|
+
> 以下均为 `bing-analysis` 的子命令(与 `run`/`render` 平级),专供「账户封禁」「拒审巡检」
|
|
373
|
+
> 「余额续航」等场景的**原始实体**接口(非报表数值),不带日期区间参数。系列/广告组/广告的
|
|
374
|
+
> **花费/点击/转化**等报表数值走 `run --sections campaigns/ad-groups/ads`(见下方「近实时报表」),
|
|
375
|
+
> 与本节的 `campaign-entities`/`ad-entities` 不是同一份数据,不要混用。
|
|
376
|
+
> 本批(2026-08)**仅只读**:暂停 / 改价 / 改预算暂无接口。
|
|
377
|
+
|
|
378
|
+
| 子命令 | 用途 |
|
|
379
|
+
| -------------------- | --------------------------------------------------------------------------------------------- |
|
|
380
|
+
| `account-status` | 账户生命周期状态(`status=Active` 为正常投放),封禁监控用 |
|
|
381
|
+
| `campaign-entities` | 系列原始实体:`dailyBudget`/`isSharedBudget`/`status`/`biddingScheme`(非报表数值) |
|
|
382
|
+
| `ad-entities` | 单系列广告列表(**必须**带 `--campaign-id`,否则 400):落地页 `finalUrls`、`editorialStatus` |
|
|
383
|
+
| `bulk-ads` | 全账户 Bulk 广告下载:拒审巡检首选,避免按系列遍历;回传 `syncTimeUtc` 可做增量 |
|
|
384
|
+
| `insertion-orders` | 插入订单(IO)列表:额度看 `budgetRemaining`/`spendCapAmount`;无预付余额字段 |
|
|
385
|
+
| `monthly-spend` | 官方月消耗(非预付余额);`--year`/`--month` 须成对传入或都省略查北京当月 |
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# 系列原始实体(预算/出价策略),配合 run --sections campaigns 的花费数值一起判断能否改价/超预算
|
|
389
|
+
siluzan-tso bing-analysis campaign-entities -a <mediaCustomerId>
|
|
390
|
+
|
|
391
|
+
# 账户封禁监控
|
|
392
|
+
siluzan-tso bing-analysis account-status -a <mediaCustomerId>
|
|
393
|
+
|
|
394
|
+
# 全账户拒审巡检(首次全量;下次把上次响应的 syncTimeUtc 回传做增量,最早回溯 30 天)
|
|
395
|
+
siluzan-tso bing-analysis bulk-ads -a <mediaCustomerId> --editorial-status Disapproved
|
|
396
|
+
siluzan-tso bing-analysis bulk-ads -a <mediaCustomerId> --editorial-status Disapproved --last-sync-time-utc 2026-08-16T03:12:00Z
|
|
397
|
+
|
|
398
|
+
# 余额续航:IO 额度 + 官方月消耗(无 IO 时没有额度上限,只看 monthly-spend)
|
|
399
|
+
siluzan-tso bing-analysis insertion-orders -a <mediaCustomerId>
|
|
400
|
+
siluzan-tso bing-analysis monthly-spend -a <mediaCustomerId>
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**要点**:
|
|
404
|
+
|
|
405
|
+
- `ad-entities` 单系列查必须带 `--campaign-id`;查全账户拒审/落地页用 `bulk-ads`,不要按系列遍历 `ad-entities`。
|
|
406
|
+
- `bulk-ads` 底层为官方异步下载任务,网关等文件就绪才返回,大账户可能要几分钟,不适合放在页面同步加载场景,适合定时巡检。
|
|
407
|
+
|
|
408
|
+
### Bing 近实时报表(`bing-analysis --aggregation`,日期可含今天)
|
|
409
|
+
|
|
410
|
+
> `bing-analysis` 默认面向周期报告,日期**禁止**含今天/昨天;一旦显式传 `--aggregation` 或
|
|
411
|
+
> `--return-only-complete-data`,即视为「单日花费」「近两小时 CPA」等近实时监控意图,
|
|
412
|
+
> **自动放开**日期含今天/昨天的限制。仅 `campaigns`/`ad-groups`/`ads` 三个 section 支持这两个参数
|
|
413
|
+
> (分别对应网关 `CampaignReport`/`AdGroupReport`/`AdReport`)。
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
# 单日花费与日预算(同一 campaignId 算 spend / dailyBudget;isSharedBudget=true 时 dailyBudget 是共享总额)
|
|
417
|
+
siluzan-tso bing-analysis run -a <mediaCustomerId> --json-out ./snap --sections campaigns \
|
|
418
|
+
--start 2026-08-17 --end 2026-08-17 --aggregation Daily
|
|
419
|
+
|
|
420
|
+
# 近两小时 CPA(按 adGroupId 取最近两个整点 spend/conversions 相加再算 CPA)
|
|
421
|
+
siluzan-tso bing-analysis run -a <mediaCustomerId> --json-out ./snap --sections ad-groups \
|
|
422
|
+
--start 2026-08-16 --end 2026-08-17 --aggregation Hourly
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**要点**:
|
|
426
|
+
|
|
427
|
+
- `--aggregation` 透传官方 `ReportAggregation`(`Summary` 默认 / `Daily` / `Hourly` / `Weekly` 等),无法识别网关返回 400;非 `Summary` 时行内 `timePeriod` 为**太平洋时区**分桶(如 `"2026-08-16"` / `"2026-08-16|14"`),与北京日期可能错一天。
|
|
428
|
+
- `--return-only-complete-data <true|false>` 省略即可:网关按区间是否含今天/昨天自动判断;**拉今天数据不要显式传 `true`**。
|
|
429
|
+
- `campaigns`/`ad-groups`/`ads` 三个 section 的 `ctr`/`conversionRate` 已归一为 **0~1 小数**,与周期报告口径一致。
|
|
430
|
+
|
|
370
431
|
---
|
|
371
432
|
|
|
372
433
|
## Yandex 账户分析
|
|
@@ -381,12 +442,12 @@ Bing 的 `ctr` / `conversionRate` 为 0~1 小数\*\*(`0.007434` = 0.74%),
|
|
|
381
442
|
|
|
382
443
|
与 `bing-analysis` 同架构:`yandex-analysis -a … --json-out …`(省略子命令名默认执行 `run`);周期报告默认 **HTML**:`yandex-analysis render`(见 `report-templates/yandex-period-report.md`)。用户要 Excel → `yandex-period-report-excel.md`(Agent 脚本,无 excel 子命令)。
|
|
383
444
|
|
|
384
|
-
| 选项 | 说明
|
|
385
|
-
| -------------------------- |
|
|
445
|
+
| 选项 | 说明 |
|
|
446
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
386
447
|
| `--sections` / `--exclude` | `overview` `daily` `search` `campaigns` `keywords` `search-terms` `geo` `devices`(8 个);别名:`geographic`→`geo`,`device`→`devices`,`search-queries`→`search-terms` |
|
|
387
|
-
| `--limit` | 仅 `campaigns` / `keywords` / `search-terms` / `geo`:默认 100,最大 10000
|
|
388
|
-
| `--start` / `--end` | 同传或同省略;不能晚于今天;省略=近 7 天(含今天)
|
|
389
|
-
| `--concurrency` | 默认 5,上限 16
|
|
448
|
+
| `--limit` | 仅 `campaigns` / `keywords` / `search-terms` / `geo`:默认 100,最大 10000 |
|
|
449
|
+
| `--start` / `--end` | 同传或同省略;不能晚于今天;省略=近 7 天(含今天) |
|
|
450
|
+
| `--concurrency` | 默认 5,上限 16 |
|
|
390
451
|
|
|
391
452
|
```bash
|
|
392
453
|
mkdir -p ./snap-yandex
|
|
@@ -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
|
```
|
|
@@ -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
|
|
|
@@ -403,15 +403,15 @@ Broad Match + 受众信号 = 伪装成广泛定向的精准投放。
|
|
|
403
403
|
|
|
404
404
|
## 十四、CLI 命令联动速查
|
|
405
405
|
|
|
406
|
-
| 策略场景 | 命令 | 要点
|
|
407
|
-
| ------------ | ------------------------------------------------------------ |
|
|
408
|
-
| 关键词调研 | `keyword -k "词" [--url]` | 结果按意图分层后再添加
|
|
409
|
-
| 添加关键词 | `ad keyword-create --keywords "词1,词2"` | 格式:`词→BROAD`、`"词"→PHRASE`、`[词]→EXACT`
|
|
406
|
+
| 策略场景 | 命令 | 要点 |
|
|
407
|
+
| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
408
|
+
| 关键词调研 | `keyword -k "词" [--url]` | 结果按意图分层后再添加 |
|
|
409
|
+
| 添加关键词 | `ad keyword-create --keywords "词1,词2"` | 格式:`词→BROAD`、`"词"→PHRASE`、`[词]→EXACT` |
|
|
410
410
|
| 添加否定词 | `ad keyword-negative-create` | **支持空格多词**(`how to make`);多词用 `--keywords` 或 `--keywords-file`,**禁止**因多词改让用户后台手补;`--level Account` 可直接建账户级否词(详见 `google-ads-write.md`) |
|
|
411
|
-
| 创建广告系列 | `ad campaign-create --config-file`(先 `campaign-validate`) | `KeywordText` 为 JSON 数组,**空格多词合法**;否词写 `NegativeKeywordsForBatchJob`,勿因多词省略
|
|
412
|
-
| 搜索词分析 | `ad search-terms` | 每周导出,按第八章流程处理
|
|
413
|
-
| 竞品监控 | `ad auction-insights`(如有) | 按第九章分析竞争态势
|
|
414
|
-
| 出价调整 | 广告系列级 Smart Bidding 设置 | 新账户用 Manual/ECPC → 有数据后切 tCPA/tROAS
|
|
411
|
+
| 创建广告系列 | `ad campaign-create --config-file`(先 `campaign-validate`) | `KeywordText` 为 JSON 数组,**空格多词合法**;否词写 `NegativeKeywordsForBatchJob`,勿因多词省略 |
|
|
412
|
+
| 搜索词分析 | `ad search-terms` | 每周导出,按第八章流程处理 |
|
|
413
|
+
| 竞品监控 | `ad auction-insights`(如有) | 按第九章分析竞争态势 |
|
|
414
|
+
| 出价调整 | 广告系列级 Smart Bidding 设置 | 新账户用 Manual/ECPC → 有数据后切 tCPA/tROAS |
|
|
415
415
|
|
|
416
416
|
---
|
|
417
417
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
siluzan-tso config show # 取 webUrl
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
首页地址:`https://www.siluzan.com/v3/foreign_trade/tso/home`
|
|
9
|
+
首页地址:`https://www-ci.siluzan.com/v3/foreign_trade/tso/home`
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ siluzan-tso config show # 取 webUrl
|
|
|
25
25
|
|
|
26
26
|
## 推荐话术
|
|
27
27
|
|
|
28
|
-
1. **「和首页一样的总览」** → 打开 `https://www.siluzan.com/v3/foreign_trade/tso/home`。
|
|
28
|
+
1. **「和首页一样的总览」** → 打开 `https://www-ci.siluzan.com/v3/foreign_trade/tso/home`。
|
|
29
29
|
2. **「某个 Google 账户昨天花了多少」** → `list-accounts -m Google` + `stats -m Google -a <id>`。
|
|
30
30
|
3. **「有待充值账户」** → 说明聚合数据在首页;CLI 可 `list-accounts` + `balance` 逐户排查,或引导充值页。
|
|
31
31
|
|
|
@@ -18,16 +18,16 @@ siluzan-tso balance-scan -m Google [--threshold-days <n>] [--min-balance <n>] [-
|
|
|
18
18
|
|
|
19
19
|
`--json-out` 落盘后根结构常为 **`{ ok, data: { items }, meta }`**(以实际输出为准)。宿主常用字段:
|
|
20
20
|
|
|
21
|
-
| 用途 | JSON 路径 / 字段名
|
|
22
|
-
| ---------------------------------------------------------- |
|
|
23
|
-
| 账户 | `data.items[].mediaCustomerId`、`data.items[].name`、`data.items[].advertiserName`
|
|
24
|
-
| 余额(主币种金额,与平台余额接口一致) | **`data.items[].balance`**(由 `remainingAccountBudget` 计算而来)
|
|
25
|
-
| 近 7 日估算日均消耗 | **`data.items[].dailySpend`** = 近 7 日总消耗 / 7(窗口为 **[T-7, T-1]**,北京时间截至昨天的 7 个自然日,**不含当天**;Google 请求带 `+08:00`)
|
|
26
|
-
| 按余额÷日均估算的续航天数 | **`data.items[].remainingDays`** = `balance / dailySpend`(消耗过低 < `minDailySpend` 时为 `null`)
|
|
27
|
-
| 建议充值额(按 `meta.thresholds.targetDaysForTopup` 目标) | **`data.items[].recommendedTopup`**
|
|
21
|
+
| 用途 | JSON 路径 / 字段名 |
|
|
22
|
+
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| 账户 | `data.items[].mediaCustomerId`、`data.items[].name`、`data.items[].advertiserName` |
|
|
24
|
+
| 余额(主币种金额,与平台余额接口一致) | **`data.items[].balance`**(由 `remainingAccountBudget` 计算而来) |
|
|
25
|
+
| 近 7 日估算日均消耗 | **`data.items[].dailySpend`** = 近 7 日总消耗 / 7(窗口为 **[T-7, T-1]**,北京时间截至昨天的 7 个自然日,**不含当天**;Google 请求带 `+08:00`) |
|
|
26
|
+
| 按余额÷日均估算的续航天数 | **`data.items[].remainingDays`** = `balance / dailySpend`(消耗过低 < `minDailySpend` 时为 `null`) |
|
|
27
|
+
| 建议充值额(按 `meta.thresholds.targetDaysForTopup` 目标) | **`data.items[].recommendedTopup`** |
|
|
28
28
|
| 命中原因(阈值逻辑) | **`data.items[].hitReason`**:`low-days` \| `low-balance` \| `both` \| `none`(已检查但未触阈值)。`data.items` 含全部已检查账户;预警筛 `hitReason !== "none"`。`meta.hitCount` 为触阈值条数 |
|
|
29
|
-
| 币种 / 状态 / OAuth | `data.items[].currencyCode`、`data.items[].status`、`data.items[].invalidOAuthToken`
|
|
30
|
-
| 本轮扫描元数据 | **`meta`**:`scannedAccounts`、`validAccounts`、`hitCount`、`thresholds`(含 `days`、`minBalance`、`minDailySpend`、`targetDaysForTopup`)、`generatedAt` 等
|
|
29
|
+
| 币种 / 状态 / OAuth | `data.items[].currencyCode`、`data.items[].status`、`data.items[].invalidOAuthToken` |
|
|
30
|
+
| 本轮扫描元数据 | **`meta`**:`scannedAccounts`、`validAccounts`、`hitCount`、`thresholds`(含 `days`、`minBalance`、`minDailySpend`、`targetDaysForTopup`)、`generatedAt` 等 |
|
|
31
31
|
|
|
32
32
|
**单账户** — 命令:
|
|
33
33
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 宿主编排(Google):文档索引
|
|
2
2
|
|
|
3
|
+
> **Bing(BingV2)**:同类「预算与 ROI / 异常监控 / 自动优化」场景的**只读**读数命令见 `references/analytics/account-analytics.md` § Bing 只读运营子命令(`bing-analysis account-status`/`campaign-entities`/`ad-entities`/`bulk-ads`/`insertion-orders`/`monthly-spend`:账户封禁、拒审巡检、余额续航)与 § Bing 近实时报表(`bing-analysis run --aggregation`:单日花费、近两小时 CPA);本批暂无暂停/改价/改预算接口,宿主侧只能读数决策,不能自动执行写操作。
|
|
4
|
+
|
|
3
5
|
> **编排责任**:定时、多条件 IF、滑动时间窗、通知(含 P1 /「空耗熔断」文案)由 **OpenClaw / WorkBuddy / Cron** 等宿主实现。
|
|
4
6
|
> **CLI 责任**:单次调用下给出检查与写操作所需命令;**不**内置常驻调度或通知渠道。
|
|
5
7
|
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
根据媒体与用户意图,选择 `report-templates/` 下对应的 `*.md`:
|
|
25
25
|
|
|
26
|
-
| 意图 | Google | Meta | TikTok | Bing | Yandex
|
|
27
|
-
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------- | ----------------------- |
|
|
28
|
-
| 周期分析 / 月报 / 周报 | `google-period-report.md` | `meta-period-report.md` | `tiktok-period-report.md` | `bing-period-report.md` | `yandex-period-report.md`
|
|
26
|
+
| 意图 | Google | Meta | TikTok | Bing | Yandex |
|
|
27
|
+
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------- | ----------------------- | ------------------------- |
|
|
28
|
+
| 周期分析 / 月报 / 周报 | `google-period-report.md` | `meta-period-report.md` | `tiktok-period-report.md` | `bing-period-report.md` | `yandex-period-report.md` |
|
|
29
29
|
| OKKI 周报 / 固定话术发客户(Google) | `okki-weekly-google-client.md` | — | — | — |
|
|
30
30
|
| **询盘分析** / 固定运营触发(Goog账户询盘分析 / 我给你询盘信息分析Google账号XXX效果) | `google-inquiry-analysis.md`(**严格 3 个月** + 用户上传询盘资料 + 8 Sheet xlsx;见 SKILL **P7**) | — | — | — |
|
|
31
31
|
| 深度诊断 / 健康检查 | `google-account-diagnosis-report.md` | `meta-account-diagnosis-report.md`(`facebook-analysis diagnosis-render` 出 HTML) | 同周期,注明能力受限 | 同周期 |
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
## 执行门禁(**全部满足后才允许写脚本**)
|
|
11
11
|
|
|
12
|
-
| # | 门禁 | 命令 / 动作
|
|
13
|
-
| --- | --------------------- |
|
|
14
|
-
| 1 | Read 当次必读 | `agent-conventions.md`、`account-analytics.md`、`yandex-period-report.md`(本文)
|
|
15
|
-
| 2 | **账户 ID 核验** | `siluzan-tso list-accounts -m Yandex -k <porg-xxx> --json-out ./snap-yandex`
|
|
16
|
-
| 3 | 确认 `currency` | 来自 overview 落盘或 list-accounts(Yandex 常用 USD/RUB 等)
|
|
17
|
-
| 4 | **拉数** | `yandex-analysis -a <已核验 id> --start … --end … --json-out <dir>`(全 8 维或用户指定 Sheet 对应维)
|
|
18
|
-
| 5 | **先 outline 后脚本** | 对本次每个 section Read `*.outline.txt`;业务 JSON 仅在脚本内读取
|
|
19
|
-
| 6 | 写脚本 | 字段名只来自 outline;`ctr`/`conversionRate` 为 **0~1 小数**
|
|
20
|
-
| 7 | 交付前审阅 | 按 `agent-conventions.md` §七;xlsx 无法 Read 时贴自检表 + 脚本 stdout 摘要
|
|
12
|
+
| # | 门禁 | 命令 / 动作 |
|
|
13
|
+
| --- | --------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| 1 | Read 当次必读 | `agent-conventions.md`、`account-analytics.md`、`yandex-period-report.md`(本文) |
|
|
15
|
+
| 2 | **账户 ID 核验** | `siluzan-tso list-accounts -m Yandex -k <porg-xxx> --json-out ./snap-yandex` |
|
|
16
|
+
| 3 | 确认 `currency` | 来自 overview 落盘或 list-accounts(Yandex 常用 USD/RUB 等) |
|
|
17
|
+
| 4 | **拉数** | `yandex-analysis -a <已核验 id> --start … --end … --json-out <dir>`(全 8 维或用户指定 Sheet 对应维) |
|
|
18
|
+
| 5 | **先 outline 后脚本** | 对本次每个 section Read `*.outline.txt`;业务 JSON 仅在脚本内读取 |
|
|
19
|
+
| 6 | 写脚本 | 字段名只来自 outline;`ctr`/`conversionRate` 为 **0~1 小数** |
|
|
20
|
+
| 7 | 交付前审阅 | 按 `agent-conventions.md` §七;xlsx 无法 Read 时贴自检表 + 脚本 stdout 摘要 |
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
|
|
32
32
|
用户已列出 Sheet 名时以用户清单为准;未列出时可用下表默认 7 Sheet(周报由脚本从 daily 聚合,不必单独拉):
|
|
33
33
|
|
|
34
|
-
| Sheet(建议名) | `yandex-analysis` section | 读法
|
|
35
|
-
| --------------- | ------------------------- |
|
|
36
|
-
| 账户总览 | `overview` | 对象:`totals` / `balance` …
|
|
37
|
-
| 日报表 | `daily` | `items[]`
|
|
34
|
+
| Sheet(建议名) | `yandex-analysis` section | 读法 |
|
|
35
|
+
| --------------- | ------------------------- | ------------------------------- |
|
|
36
|
+
| 账户总览 | `overview` | 对象:`totals` / `balance` … |
|
|
37
|
+
| 日报表 | `daily` | `items[]` |
|
|
38
38
|
| 周报表 | `daily` 的 `weekly[]` | **读落盘 weekly,禁止自行聚周** |
|
|
39
|
-
| Search 网络 | `search` | `items[]`
|
|
40
|
-
| 广告系列 | `campaigns` | `items[]`
|
|
41
|
-
| 关键词 | `keywords` | `items[]`
|
|
42
|
-
| 搜索词 | `search-terms` | `items[]`(区间 ≤180 天)
|
|
43
|
-
| 地域 | `geo` | `items[]`
|
|
44
|
-
| 设备 | `devices` | `items[]`
|
|
39
|
+
| Search 网络 | `search` | `items[]` |
|
|
40
|
+
| 广告系列 | `campaigns` | `items[]` |
|
|
41
|
+
| 关键词 | `keywords` | `items[]` |
|
|
42
|
+
| 搜索词 | `search-terms` | `items[]`(区间 ≤180 天) |
|
|
43
|
+
| 地域 | `geo` | `items[]` |
|
|
44
|
+
| 设备 | `devices` | `items[]` |
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
mkdir -p ./snap-yandex
|
|
@@ -56,43 +56,43 @@ siluzan-tso yandex-analysis -a <porg-xxx> --start <S> --end <E> --json-out ./sna
|
|
|
56
56
|
|
|
57
57
|
## 统一度量列(列表 Sheet)
|
|
58
58
|
|
|
59
|
-
| Excel 列名 | API 字段
|
|
60
|
-
| ---------- |
|
|
61
|
-
| 消耗 | `spend`
|
|
62
|
-
| 展示 | `impressions`
|
|
63
|
-
| 点击 | `clicks`
|
|
64
|
-
| CTR | `ctr`
|
|
65
|
-
| CPC | `averageCpc`
|
|
66
|
-
| 转化 | `conversions`
|
|
67
|
-
| 转化率 | `conversionRate`
|
|
68
|
-
| CPA | `costPerConversion`
|
|
59
|
+
| Excel 列名 | API 字段 | 说明 |
|
|
60
|
+
| ---------- | ------------------- | ---------------------------- |
|
|
61
|
+
| 消耗 | `spend` | 账户币种小数,2 位 |
|
|
62
|
+
| 展示 | `impressions` | 整数 |
|
|
63
|
+
| 点击 | `clicks` | 整数 |
|
|
64
|
+
| CTR | `ctr` | 0~1;单元格 `0.00%` 或文案 % |
|
|
65
|
+
| CPC | `averageCpc` | 小数 |
|
|
66
|
+
| 转化 | `conversions` | 小数/整数按 outline |
|
|
67
|
+
| 转化率 | `conversionRate` | 0~1 |
|
|
68
|
+
| CPA | `costPerConversion` | 可为 null |
|
|
69
69
|
|
|
70
70
|
### 维度列(按 Sheet)
|
|
71
71
|
|
|
72
|
-
| Sheet | 维度列(API)
|
|
73
|
-
| -------- |
|
|
74
|
-
| Search | `network`
|
|
75
|
-
| 广告系列 | `campaignId`(文本)、`campaignName`、`status`/`state`、`campaignType`
|
|
76
|
-
| 关键词 | `keyword`、`campaignName`、`criteriaType`、`adGroupId`(文本)
|
|
77
|
-
| 搜索词 | `searchQuery`、`matchedKeyword`、`campaignName`
|
|
78
|
-
| 地域 | `locationName` / `targetingLocationName`
|
|
79
|
-
| 设备 | `device`
|
|
80
|
-
| 日报 | `date`
|
|
72
|
+
| Sheet | 维度列(API) |
|
|
73
|
+
| -------- | --------------------------------------------------------------------------- |
|
|
74
|
+
| Search | `network` |
|
|
75
|
+
| 广告系列 | `campaignId`(文本)、`campaignName`、`status`/`state`、`campaignType` |
|
|
76
|
+
| 关键词 | `keyword`、`campaignName`、`criteriaType`、`adGroupId`(文本) |
|
|
77
|
+
| 搜索词 | `searchQuery`、`matchedKeyword`、`campaignName` |
|
|
78
|
+
| 地域 | `locationName` / `targetingLocationName` |
|
|
79
|
+
| 设备 | `device` |
|
|
80
|
+
| 日报 | `date` |
|
|
81
81
|
| 周报 | `daily.weekly[]` 的 `weekLabel`、`startDate`、`endDate`、`days`(CLI 已算) |
|
|
82
82
|
|
|
83
|
-
**账户总览 Sheet**:KPI 区(余额、本期消耗、日均、点击、CTR、CPC、转化)+
|
|
83
|
+
**账户总览 Sheet**:KPI 区(余额、本期消耗、日均、点击、CTR、CPC、转化)+ **全部叙事**(各维总结/建议、≥3 条跨维优化建议)写在本 Sheet;列表 Sheet 仅数据表。不写「一句话数据概况 / 执行摘要」。
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
87
|
## 禁止猜的字段 / 口径
|
|
88
88
|
|
|
89
|
-
| ❌ 禁止
|
|
90
|
-
|
|
|
91
|
-
| 把 `ctr` 当已是百分数再 ÷100
|
|
92
|
-
| 编造学习期、搜索词分类等无接口硬事实
|
|
89
|
+
| ❌ 禁止 | ✅ 正确 |
|
|
90
|
+
| ---------------------------------------------- | ------------------------------------------------------------------ |
|
|
91
|
+
| 把 `ctr` 当已是百分数再 ÷100 | 落盘为 0~1;Excel 用百分比格式或 `*100` 后加 `%` |
|
|
92
|
+
| 编造学习期、搜索词分类等无接口硬事实 | 无字段且算不出则不写该列;关键词翻译走 rowInsights |
|
|
93
93
|
| 自行按 `daily.date` 聚周(易出 `NaN-NaN-NaN`) | 读 `daily.weekly[]`;`date` 已是 YYYY-MM-DD,禁止再拼 `T00:00:00Z` |
|
|
94
|
-
| `campaignId` 写成数字
|
|
95
|
-
| search-terms 拉超过 180 天
|
|
94
|
+
| `campaignId` 写成数字 | `String(id)` + 文本格式 |
|
|
95
|
+
| search-terms 拉超过 180 天 | 缩短区间或排除该维 |
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|