siluzan-tso-cli 1.1.21-beta.3 → 1.1.21-beta.4

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 CHANGED
@@ -51,7 +51,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
51
51
  siluzan-tso init --force # 强制覆盖已存在文件
52
52
  ```
53
53
 
54
- > **注意**:当前为测试版(1.1.21-beta.3),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
54
+ > **注意**:当前为测试版(1.1.21-beta.4),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
55
55
 
56
56
  | 助手 | 建议 `--ai` |
57
57
  | ----------------------- | ------------------------------------ |
package/dist/index.js CHANGED
@@ -5066,6 +5066,20 @@ var init_normalize_money = __esm({
5066
5066
  }
5067
5067
  });
5068
5068
 
5069
+ // src/commands/google-analysis/normalize-overview.ts
5070
+ function normalizeOverviewPayload(payload) {
5071
+ const obj = payload;
5072
+ if (typeof obj.balance === "number" && obj.balance === 0) {
5073
+ delete obj.balance;
5074
+ }
5075
+ return payload;
5076
+ }
5077
+ var init_normalize_overview = __esm({
5078
+ "src/commands/google-analysis/normalize-overview.ts"() {
5079
+ "use strict";
5080
+ }
5081
+ });
5082
+
5069
5083
  // src/commands/google-analysis/match-type-en2zh.json
5070
5084
  var match_type_en2zh_default;
5071
5085
  var init_match_type_en2zh = __esm({
@@ -100731,13 +100745,13 @@ async function fetchSectionPayload(def, opts, config, id) {
100731
100745
  !!opts.verbose,
100732
100746
  def.name
100733
100747
  );
100734
- return annotateZhFields(
100735
- normalizeMoneyScales(
100736
- normalizeRateScales(stripLegacyGoogleFieldsIfV2Present(data), def.name),
100737
- def.name
100738
- ),
100739
- def.name
100740
- );
100748
+ let payload = stripLegacyGoogleFieldsIfV2Present(data);
100749
+ payload = normalizeRateScales(payload, def.name);
100750
+ payload = normalizeMoneyScales(payload, def.name);
100751
+ if (def.name === "overview") {
100752
+ payload = normalizeOverviewPayload(payload);
100753
+ }
100754
+ return annotateZhFields(payload, def.name);
100741
100755
  }
100742
100756
  function endpointHintForSection(def) {
100743
100757
  if (def.name === "materials") return "CampaignAssetView+Videos";
@@ -100779,6 +100793,7 @@ var init_fetch = __esm({
100779
100793
  init_sections();
100780
100794
  init_normalize_rates();
100781
100795
  init_normalize_money();
100796
+ init_normalize_overview();
100782
100797
  init_translate_fields();
100783
100798
  }
100784
100799
  });
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: siluzan-tso
3
3
  description: >-
4
- Siluzan TSO 广告 skill(siluzan-tso-cli):Google/Bing/Yandex/TikTok/Kwai 账户开户与管理、Google Ads CRUD、数据分析、优化报告、智能预警、TikTok/Meta 线索、发票财务,并提供 RAG 知识库查询,google广告关键词推荐,
4
+ Siluzan TSO 广告 skill(siluzan-tso-cli):Google/Bing/Yandex/TikTok/Kwai 账户开户与管理、Google Ads CRUD、数据分析、优化报告、智能预警、TikTok/Meta 线索、发票财务,并提供 RAG 知识库查询,google广告关键词推荐;当你发现你的上下文被压缩过后,你需要根据用户的需求,重新阅读本skill相关的文件,保证skill功能正常。
5
5
  license: MIT
6
6
  metadata:
7
7
  requires: nodejs,siluzan-tso-cli
@@ -153,7 +153,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
153
153
  - **常用字段**:
154
154
  - `ad campaigns --json/--json-out` → `budget`(元,与 `campaign-edit --budget` 同口径)
155
155
  - `ad groups --json` → `maxCPCAmountYuan` / `targetCpaAmountYuan`(元)
156
- - `google-analysis overview-*.json` → **余额取 `remainingAccountBudget`,禁止取 `balance`**(`balance` Google 原始字段,多数账户恒为 0)
156
+ - `google-analysis overview-*.json` → **余额只认 `remainingAccountBudget`**(`balance` 0 CLI 已剔除该字段)
157
157
  - `google-analysis campaigns-*.json` → `budgetAmountYuan` / `campaignTargetCpaYuan` / `maximizeConversionsTargetCpaYuan` / `spend` / `averageCpc` / `costPerConversion`(均元)
158
158
  - `keyword --json` → `averageCpc` / `lowTopOfPageBid` / `highTopOfPageBid` + 根级与每条 `bidAmountCurrency`(无 `-a` 为 USD;有 `-a` 为账户 `currencyCode`);`-a <mediaCustomerId>` 走账户级推荐接口;限定市场用 `keyword geo-list` + `--geo <id>`(**多 id = 汇总指标**;分市场须多次调用、每次一个 `--geo`,见 `references/keyword-planner-workflows.md`)
159
159
  - **品牌名优先级**:(1) 用户明确提供 → (2) `list-accounts.mag.advertiserName` → (3) 用户提供网址 → 域名占位并标注 `[待确认品牌名]`。**严禁**把英文域名翻译为虚构中文品牌。
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.21-beta.3",
4
- "publishedAt": 1779689350731
3
+ "version": "1.1.21-beta.4",
4
+ "publishedAt": 1779697477475
5
5
  }
@@ -84,7 +84,7 @@ CLI 出口的所有 JSON / 表格金额已统一为**元**,关键字段:
84
84
  | `ad groups --json` | `maxCPCAmountYuan`、`targetCpaAmountYuan` |
85
85
  | `google-analysis campaigns` 落盘 `campaigns-*.json` | `budgetAmountYuan`、`campaignTargetCpaYuan`、`maximizeConversionsTargetCpaYuan`;同行 `spend` / `averageCpc` / `costPerConversion` 也是元 |
86
86
  | `keyword suggest --json` | `averageCpc`、`lowTopOfPageBid`、`highTopOfPageBid`;根级与每条 `bidAmountCurrency`(有 `-a` 为账户币;无 `-a` 为 USD) |
87
- | `balance` 等账户余额接口 | `remainingAccountBudget`(元);**注意:`google-analysis overview` 同时返回 `balance`(Google 原始字段,多数账户恒为 0)和 `remainingAccountBudget`(真实余额),余额取值必须用后者** |
87
+ | `balance` 等账户余额接口 | 余额字段为`remainingAccountBudget`(元) |
88
88
 
89
89
  旧字段 `budgetAmount`(分)、`maxCPCAmountDisplay`、`*Micros`(微元)**已不再落盘**,下游脚本无需做单位换算。金额保留 2 位小数,带货币代码(如 `¥50.00 CNY`、`$50.00 USD`),`currencyCode` 从响应读取,跨币种账户分表;细则见 `references/currency.md`。
90
90
 
@@ -43,7 +43,7 @@ siluzan-tso balance -m Google --accounts <mediaCustomerId> --json
43
43
  mkdir -p ./snap-monitor && siluzan-tso google-analysis -a <mediaCustomerId> --sections overview --start <YYYY-MM-DD> --end <YYYY-MM-DD> --json-out ./snap-monitor
44
44
  ```
45
45
 
46
- 读 **`./snap-monitor/overview-<accountId>.json`**(具体路径见 stdout 摘要的 `writtenFiles[0]` 或 `manifest-<accountId>.json` 的 `artifacts`)。根对象常见字段:**`remainingAccountBudget`**、**`averageDailyCost`**、**`totalCost`**、**`activeDays`**、**`currencyCode`**、**`accountId`**;**`currentPeriod`** / **`previousPeriod`** 为对象块,内含 **`spend`**、`impressions`、`clicks`、`conversions` 等与 `references/account-analytics.md` 总览口径一致的指标(块内还可能出现 **`currencyCode`**)。
46
+ 读 **`./snap-monitor/overview-<accountId>.json`**(具体路径见 stdout 摘要的 `writtenFiles[0]` 或 `manifest-<accountId>.json` 的 `artifacts`)。根对象常见字段:**`remainingAccountBudget`**(余额)、**`averageDailyCost`**、**`totalCost`**、**`activeDays`**、**`currencyCode`**、**`accountId`**(无 **`balance`**,网关为 0 时 CLI 已剔除);**`currentPeriod`** / **`previousPeriod`** 为对象块,内含 **`spend`**、`impressions`、`clicks`、`conversions` 等与 `references/account-analytics.md` 总览口径一致的指标(块内还可能出现 **`currencyCode`**)。
47
47
 
48
48
  ---
49
49
 
@@ -9,7 +9,7 @@ $ErrorActionPreference = 'Stop'
9
9
  # -- Package info (injected at build time) ------------------------------------
10
10
  $PKG_NAME = 'siluzan-tso-cli'
11
11
  # PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
12
- $PKG_VERSION = '1.1.21-beta.3'
12
+ $PKG_VERSION = '1.1.21-beta.4'
13
13
  $CLI_BIN = 'siluzan-tso'
14
14
  $SKILL_LABEL = 'Siluzan TSO'
15
15
  $INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
@@ -9,7 +9,7 @@ set -euo pipefail
9
9
  # -- Package info (injected at build time) ------------------------------------
10
10
  readonly PKG_NAME="siluzan-tso-cli"
11
11
  # PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
12
- readonly PKG_VERSION="1.1.21-beta.3"
12
+ readonly PKG_VERSION="1.1.21-beta.4"
13
13
  readonly CLI_BIN="siluzan-tso"
14
14
  readonly SKILL_LABEL="Siluzan TSO"
15
15
  readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-tso-cli",
3
- "version": "1.1.21-beta.3",
3
+ "version": "1.1.21-beta.4",
4
4
  "description": "Siluzan 广告账户管理 CLI — 查询账户、余额、消耗数据,管理绑定关系与充值。",
5
5
  "keywords": [
6
6
  "ad-account",