siluzan-tso-cli 1.1.48 → 1.1.49-beta.1

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
@@ -43,7 +43,7 @@ HTML 报告模板外部资源:**ECharts** 统一使用 `https://staticpn.siluz
43
43
  在**用户的目标项目根目录**执行(根据用户使用的助手选择 `--ai`):
44
44
 
45
45
  ```bash
46
- npm install -g siluzan-tso-cli
46
+ npm install -g siluzan-tso-cli@beta
47
47
  siluzan-tso init --ai cursor # 写入 Cursor(默认)
48
48
  siluzan-tso init --ai cursor,claude # 同时写入多个平台
49
49
  siluzan-tso init --ai all # 写入所有支持的平台
@@ -51,6 +51,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
51
51
  siluzan-tso init --force # 强制覆盖已存在文件
52
52
  ```
53
53
 
54
+ > **注意**:当前为测试版(1.1.49-beta.1),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
54
55
 
55
56
  | 助手 | 建议 `--ai` |
56
57
  | ----------------------- | ------------------------------------ |
package/dist/index.js CHANGED
@@ -4018,7 +4018,7 @@ var DEFAULT_API_BASE;
4018
4018
  var init_defaults = __esm({
4019
4019
  "src/config/defaults.ts"() {
4020
4020
  "use strict";
4021
- DEFAULT_API_BASE = "https://tso-api.siluzan.com";
4021
+ DEFAULT_API_BASE = "https://tso-api-ci.siluzan.com";
4022
4022
  }
4023
4023
  });
4024
4024
 
@@ -5732,6 +5732,9 @@ function buildOutlineHints(section) {
5732
5732
  if (RATE_BEARING_SECTIONS.has(section)) {
5733
5733
  hints.push(...GOOGLE_ANALYSIS_RATE_NORMALIZED_OUTLINE_HINTS);
5734
5734
  }
5735
+ if (section === "overview") {
5736
+ hints.push(...GOOGLE_ANALYSIS_OVERVIEW_ACTIVE_DAYS_HINTS);
5737
+ }
5735
5738
  if (section === "campaigns") {
5736
5739
  hints.push(
5737
5740
  ...GOOGLE_ANALYSIS_CAMPAIGNS_OUTLINE_BUDGET_HINTS,
@@ -5857,7 +5860,7 @@ async function writeGoogleAnalysisSnapshot(params) {
5857
5860
  agentHint: OUTLINE_AGENT_HINT
5858
5861
  };
5859
5862
  }
5860
- var LEGACY_MANIFEST_FILE, CLI_PACKAGE, SCHEMA_VERSION2, DEFAULT_FIELD_GUIDE, GOOGLE_ANALYSIS_CAMPAIGNS_OUTLINE_BUDGET_HINTS, GOOGLE_ANALYSIS_ADS_OUTLINE_BUDGET_HINTS, GOOGLE_ANALYSIS_CAMPAIGNS_COMPETITIVE_METRICS_HINTS, RATE_BEARING_SECTIONS, GOOGLE_ANALYSIS_RATE_NORMALIZED_OUTLINE_HINTS, GOOGLE_ANALYSIS_ENVELOPE_OUTLINE_HINTS, GOOGLE_ANALYSIS_ZH_FIELD_HINTS_BY_SECTION;
5863
+ var LEGACY_MANIFEST_FILE, CLI_PACKAGE, SCHEMA_VERSION2, DEFAULT_FIELD_GUIDE, GOOGLE_ANALYSIS_CAMPAIGNS_OUTLINE_BUDGET_HINTS, GOOGLE_ANALYSIS_ADS_OUTLINE_BUDGET_HINTS, GOOGLE_ANALYSIS_CAMPAIGNS_COMPETITIVE_METRICS_HINTS, RATE_BEARING_SECTIONS, GOOGLE_ANALYSIS_RATE_NORMALIZED_OUTLINE_HINTS, GOOGLE_ANALYSIS_ENVELOPE_OUTLINE_HINTS, GOOGLE_ANALYSIS_OVERVIEW_ACTIVE_DAYS_HINTS, GOOGLE_ANALYSIS_ZH_FIELD_HINTS_BY_SECTION;
5861
5864
  var init_google_analysis = __esm({
5862
5865
  "src/utils/snapshot/google-analysis.ts"() {
5863
5866
  "use strict";
@@ -5914,6 +5917,10 @@ var init_google_analysis = __esm({
5914
5917
  "// \u7EDF\u4E00\u8BBF\u95EE\u5C42\uFF08manifest / \u6587\u4EF6\u5185\u5747\u4E3A `schemaVersion: 3`\uFF09\uFF1A\u5224\u522B\u53EA\u6709\u4E00\u6761\u2014\u2014`record` \u975E null \u5373**\u6C47\u603B\u7EF4\u5EA6**\uFF08overview/resource-counts/gold-account/ads-index/dimension-summary/final-urls/campaign-types\uFF09\uFF0C\u8BFB `record`\uFF1B\u5426\u5219\u8BFB `items[]`\uFF08\u6240\u6709\u5217\u8868\u7EF4\u5EA6\uFF0C\u542B materials\uFF0C\u884C\u5DF2\u7EDF\u4E00\u642C\u5165\uFF0C`itemCount` = `items.length`\uFF09\u3002",
5915
5918
  "// \u7EF4\u5EA6\u4E13\u5C5E\u539F\u952E\u540D\uFF08keywords/campaigns/countries/data \u7B49\uFF09\u5DF2**\u79FB\u9664**\uFF0C\u4E0D\u8981\u518D\u6309\u7EF4\u5EA6\u731C\u952E\u540D\uFF1B`search-terms`/`ads` \u7684\u7F51\u5173 `code`/`message` \u5728 `meta`\uFF08\u4E0E\u6570\u636E\u65E0\u5173\uFF09\uFF1Bmaterials \u884C\u5E26 `assetType: 'image'|'video'`\u3002"
5916
5919
  ];
5920
+ GOOGLE_ANALYSIS_OVERVIEW_ACTIVE_DAYS_HINTS = [
5921
+ "// \u6D3B\u8DC3\u5929\u6570 / \u65E5\u5747\u6D88\u8017\uFF1A\u53EA\u5728 `record` \u6839\u4E0A\uFF0C\u8BFB `record.activeDays` / `record.averageDailyCost`\u3002**\u7981\u6B62** `currentPeriod.activeDays` / `previousPeriod.activeDays`\uFF08period \u5757\u6CA1\u6709\u8FD9\u4E24\u4E2A\u5B57\u6BB5\uFF0C\u5199\u6210\u300C\u2014\u300D\u662F\u9519\u7684\uFF09\u3002",
5922
+ "// `activeDays` = \u672C\u671F\u6D88\u8017>0 \u7684\u81EA\u7136\u65E5\u6570\uFF1B`averageDailyCost` = `record.totalCost` / `activeDays`\uFF08activeDays=0 \u65F6\u4E3A 0\uFF09\u3002\u4E0A\u671F\u6CA1\u6709\u8FD9\u4E24\u4E2A\u5B57\u6BB5\uFF1B\u8981\u73AF\u6BD4\u987B\u53E6\u62C9\u4E0A\u671F `daily-metrics` \u6570 `spend>0` \u7684\u5929\u6570\uFF0C\u7981\u6B62\u7F16\u9020\u3002"
5923
+ ];
5917
5924
  GOOGLE_ANALYSIS_ZH_FIELD_HINTS_BY_SECTION = {
5918
5925
  keywords: [
5919
5926
  "// \u4E2D\u6587\u8BD1\u540D\uFF1A`keywordMatchTypeZh`\uFF08\u7531 `keywordMatchType` \u7ECF match-type-en2zh.json \u7FFB\u8BD1\uFF0C\u8986\u76D6 BROAD/PHRASE/EXACT \u4E0E Broad/Phrase/Exact \u5927\u5C0F\u5199\uFF1B\u672A\u547D\u4E2D\u65F6\u8BE5\u5B57\u6BB5\u7F3A\u7701\uFF09\u3002"
@@ -102514,6 +102521,12 @@ async function mergeGoogleAnalysisSnapshotIntoReport(payload, snapshotDir) {
102514
102521
  kpis.costPerConversion = currentKpiSource.costPerConversion;
102515
102522
  }
102516
102523
  }
102524
+ if (overviewRecord) {
102525
+ const activeDays = num2(overviewRecord.activeDays);
102526
+ if (activeDays != null) kpis.activeDays = Math.round(activeDays);
102527
+ const averageDailyCost = num2(overviewRecord.averageDailyCost);
102528
+ if (averageDailyCost != null) kpis.averageDailyCost = round22(averageDailyCost);
102529
+ }
102517
102530
  if (previousPeriod) {
102518
102531
  kpis.previousPeriod = {
102519
102532
  cost: num2(previousPeriod.spend),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.48",
4
- "publishedAt": 1787911822172
3
+ "version": "1.1.49-beta.1",
4
+ "publishedAt": 1788225241174
5
5
  }
@@ -30,6 +30,14 @@
30
30
  "ctr": { "type": "number", "description": "0~1 小数" },
31
31
  "averageCpc": { "type": "number" },
32
32
  "costPerConversion": { "type": "number" },
33
+ "activeDays": {
34
+ "type": "number",
35
+ "description": "本期消耗>0 的自然日数;来自 overview.record.activeDays,不在 currentPeriod"
36
+ },
37
+ "averageDailyCost": {
38
+ "type": "number",
39
+ "description": "本期日均消耗;来自 overview.record.averageDailyCost,不在 currentPeriod"
40
+ },
33
41
  "previousPeriod": {
34
42
  "type": "object",
35
43
  "description": "环比上期(用于 KPI 卡片环比箭头),可省略",
@@ -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`;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`;Yandex 当前没有对应充值界面) |
171
171
  | `Rejected` | 被拒 | 查看 `--json-out` 落盘中的 `reason` 字段了解拒绝原因;修改资料后重新提交;若原因不明,引导用户联系丝路赞客服 |
172
172
 
173
173
  ---
@@ -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
  ---
@@ -157,6 +157,8 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
157
157
 
158
158
  **唯一判别规则**:`record` 非 `null` → 读 `record`(汇总维度);否则 → 读 `items[]`(列表维度)。
159
159
 
160
+ `overview` 的 `activeDays` / `averageDailyCost` **只在 `record` 根上**(本期、消耗>0 的自然日;日均=`totalCost/activeDays`)。`currentPeriod` / `previousPeriod` **没有**这两个字段——禁止 `cur.get("activeDays")`(会整行写成「—」)。上期活跃天数接口不返回;要环比另拉上期 `daily-metrics` 数 `spend>0` 的天数,禁止编造。`google-analysis render --snapshot-dir` 会把这两个字段并进 `kpis`。
161
+
160
162
  | 桶 | 维度 | 读法 |
161
163
  | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
162
164
  | **列表** | `keywords`、`search-terms`、`campaigns`、`campaign-hour`、`ads`、`extensions`、`devices`、`geographic`、`geo-matched`、`campaign-geo`、`campaign-geo-matched`、`campaign-device`、`audience`、`asset-images`、`videos`、`materials`、`daily-metrics`、`conversion-actions` | `d.items[]` |
@@ -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
  ```
@@ -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
 
@@ -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
 
@@ -62,6 +62,7 @@ siluzan-tso google-analysis -a <id> --start <S> --end <E> --json-out ./snap-p4 \
62
62
 
63
63
  | 维度 | ❌ 禁止猜 | ✅ outline 真实字段 |
64
64
  | ----------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
65
+ | `overview` | `currentPeriod.activeDays`、`previousPeriod.activeDays`、`currentPeriod.averageDailyCost` | `record.activeDays`、`record.averageDailyCost`(只在 **record 根**;period 块没有。上期这两字段接口不返回;要环比另拉上期 `daily-metrics` 数 `spend>0` 天数) |
65
66
  | `keywords` | `keywordText`、`status`、`matchType`(单独作展示列) | `keyword`、`userStatus`、`keywordMatchTypeZh`(或 `keywordMatchType`) |
66
67
  | `search-terms` | `query` | `searchTermText`;匹配类型用 `matchTypeZh`;状态用 `queryTargetingStatusZh` |
67
68
  | `geographic` | `geoName`、`countryCriterionIdName` | `countryOrRegion`、`countryNameZh`、`countryCode` |
@@ -33,7 +33,7 @@ siluzan-tso google-analysis render \
33
33
  `google-period-report.json` 顶层结构:
34
34
 
35
35
  - `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;可省略由 `--snapshot-dir` 从 `overview` + manifest 自动合并。
36
- - `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。环比仍来自 `overview.previousPeriod`。
36
+ - `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比;另含 `activeDays` / `averageDailyCost`);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。`activeDays` / `averageDailyCost` 来自 `overview.record` 根(**不是** `currentPeriod`);环比仍来自 `overview.previousPeriod`(上期无活跃天数,不编造)。
37
37
  - `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`cpa`);可省略由 `daily-metrics` 自动合并。
38
38
  - `tables.{dimensionSummary,campaigns,devices,geographic,keywords}`:对应 §3~§7 表格数据;可省略由同名 `google-analysis` section 自动合并。
39
39
  - `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
@@ -62,6 +62,7 @@ siluzan-tso google-analysis -a <id> --start <S> --end <E> --json-out ./snap-p4 \
62
62
 
63
63
  | 维度 | ❌ 禁止猜 | ✅ outline 真实字段 |
64
64
  | ----------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
65
+ | `overview` | `currentPeriod.activeDays`、`previousPeriod.activeDays`、`currentPeriod.averageDailyCost` | `record.activeDays`、`record.averageDailyCost`(只在 **record 根**;period 块没有。上期这两字段接口不返回;要环比另拉上期 `daily-metrics` 数 `spend>0` 天数) |
65
66
  | `keywords` | `keywordText`、`status`、`matchType`(单独作展示列) | `keyword`、`userStatus`、`keywordMatchTypeZh`(或 `keywordMatchType`) |
66
67
  | `search-terms` | `query` | `searchTermText`;匹配类型用 `matchTypeZh`;状态用 `queryTargetingStatusZh` |
67
68
  | `geographic` | `geoName`、`countryCriterionIdName` | `countryOrRegion`、`countryNameZh`、`countryCode` |
@@ -768,6 +768,8 @@
768
768
  { key: "ctr", label: "点击率 CTR", fmt: pct },
769
769
  { key: "averageCpc", label: "平均点击费用", fmt: (v) => money(v, currency) },
770
770
  { key: "costPerConversion", label: "每次转化费用 CPA", fmt: (v) => money(v, currency) },
771
+ { key: "activeDays", label: "活跃天数", fmt: int },
772
+ { key: "averageDailyCost", label: "日均消耗", fmt: (v) => money(v, currency) },
771
773
  ];
772
774
  const kpiHtml = kpiDefs
773
775
  .map((def, i) => {
@@ -33,7 +33,7 @@ siluzan-tso google-analysis render \
33
33
  `google-period-report.json` 顶层结构:
34
34
 
35
35
  - `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;可省略由 `--snapshot-dir` 从 `overview` + manifest 自动合并。
36
- - `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。环比仍来自 `overview.previousPeriod`。
36
+ - `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比;另含 `activeDays` / `averageDailyCost`);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。`activeDays` / `averageDailyCost` 来自 `overview.record` 根(**不是** `currentPeriod`);环比仍来自 `overview.previousPeriod`(上期无活跃天数,不编造)。
37
37
  - `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`cpa`);可省略由 `daily-metrics` 自动合并。
38
38
  - `tables.{dimensionSummary,campaigns,devices,geographic,keywords}`:对应 §3~§7 表格数据;可省略由同名 `google-analysis` section 自动合并。
39
39
  - `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
@@ -9,11 +9,11 @@ $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.48'
12
+ $PKG_VERSION = '1.1.49-beta.1'
13
13
  $CLI_BIN = 'siluzan-tso'
14
14
  $SKILL_LABEL = 'Siluzan TSO'
15
- $INSTALL_CMD = 'npm install -g siluzan-tso-cli'
16
- $WEB_BASE = 'https://www.siluzan.com'
15
+ $INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
16
+ $WEB_BASE = 'https://www-ci.siluzan.com'
17
17
 
18
18
  # -- Constants ----------------------------------------------------------------
19
19
  $NODE_MAJOR_MIN = 18
@@ -9,11 +9,11 @@ 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.48"
12
+ readonly PKG_VERSION="1.1.49-beta.1"
13
13
  readonly CLI_BIN="siluzan-tso"
14
14
  readonly SKILL_LABEL="Siluzan TSO"
15
- readonly INSTALL_CMD="npm install -g siluzan-tso-cli"
16
- readonly WEB_BASE="https://www.siluzan.com"
15
+ readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
16
+ readonly WEB_BASE="https://www-ci.siluzan.com"
17
17
 
18
18
  # -- Constants ----------------------------------------------------------------
19
19
  readonly NODE_MAJOR_MIN=18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-tso-cli",
3
- "version": "1.1.48",
3
+ "version": "1.1.49-beta.1",
4
4
  "description": "Siluzan 广告账户管理 CLI — 查询账户、余额、消耗数据,管理绑定关系与充值。",
5
5
  "keywords": [
6
6
  "ad-account",