siluzan-tso-cli 1.1.40-beta.5 → 1.1.40-beta.6
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 +1 -1
- package/dist/index.js +8 -6
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/accounts/accounts-balance-stats.md +1 -1
- package/dist/skill/references/analytics/account-analytics.md +3 -3
- package/dist/skill/scripts/install.ps1 +1 -1
- package/dist/skill/scripts/install.sh +1 -1
- package/package.json +1 -1
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.40-beta.
|
|
54
|
+
> **注意**:当前为测试版(1.1.40-beta.6),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
55
|
|
|
56
56
|
| 助手 | 建议 `--ai` |
|
|
57
57
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -5518,12 +5518,14 @@ function resolveDailyMetricsQueryTimes(startDate, endDate, now = /* @__PURE__ */
|
|
|
5518
5518
|
const endInstant = endOfDay.getTime() > now.getTime() ? formatChinaOffsetDateTime(now) : formatChinaOffsetDateTime(endOfDay);
|
|
5519
5519
|
return { startInstant, endInstant };
|
|
5520
5520
|
}
|
|
5521
|
-
|
|
5521
|
+
function resolveChinaQueryTimes(startDate, endDate, _now = /* @__PURE__ */ new Date()) {
|
|
5522
|
+
return { startInstant: startDate, endInstant: endDate };
|
|
5523
|
+
}
|
|
5524
|
+
var CHINA_OFFSET_MS;
|
|
5522
5525
|
var init_daily_metrics_range = __esm({
|
|
5523
5526
|
"src/commands/google-analysis/daily-metrics-range.ts"() {
|
|
5524
5527
|
"use strict";
|
|
5525
5528
|
CHINA_OFFSET_MS = 8 * 36e5;
|
|
5526
|
-
resolveChinaQueryTimes = resolveDailyMetricsQueryTimes;
|
|
5527
5529
|
}
|
|
5528
5530
|
});
|
|
5529
5531
|
|
|
@@ -6035,7 +6037,7 @@ var init_sections = __esm({
|
|
|
6035
6037
|
name: "daily-metrics",
|
|
6036
6038
|
description: "\u6309\u65E5\u6307\u6807\uFF08\u4E3B\u5E73\u53F0 /report/media-account/google/account-daily-reports\uFF0C\u542B\u641C\u7D22\u4EFD\u989D\u7B49\uFF09",
|
|
6037
6039
|
dateMode: "range",
|
|
6038
|
-
/** 仅用于 manifest endpointHint;实际请求走 fetchSectionPayload 专用分支(apiBaseUrl +
|
|
6040
|
+
/** 仅用于 manifest endpointHint;实际请求走 fetchSectionPayload 专用分支(apiBaseUrl + YYYY-MM-DD) */
|
|
6039
6041
|
path: () => "/report/media-account/google/account-daily-reports"
|
|
6040
6042
|
},
|
|
6041
6043
|
{
|
|
@@ -102130,7 +102132,7 @@ async function fetchSectionPayload(def, opts, config, id, http2) {
|
|
|
102130
102132
|
}
|
|
102131
102133
|
if (def.name === "daily-metrics") {
|
|
102132
102134
|
const { startDate, endDate } = resolveDateRange(opts.start, opts.end);
|
|
102133
|
-
const { startInstant, endInstant } =
|
|
102135
|
+
const { startInstant, endInstant } = resolveChinaQueryTimes(startDate, endDate);
|
|
102134
102136
|
const params = new URLSearchParams({
|
|
102135
102137
|
mediaCustomerIds: id,
|
|
102136
102138
|
startDate: startInstant,
|
|
@@ -104088,10 +104090,10 @@ function registerRunCommand() {
|
|
|
104088
104090
|
"\u7ED3\u679C\u843D\u76D8\u76EE\u5F55\uFF1B\u6BCF\u7EF4\u5EA6\u4E00\u4E2A <section>-<accountId>.json\uFF0C\u4E0E manifest-<accountId>.json \u540C\u7EA7"
|
|
104089
104091
|
).option("-t, --token <token>", "Auth Token").option(
|
|
104090
104092
|
"--start <date>",
|
|
104091
|
-
"\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\
|
|
104093
|
+
"\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08google-analysis \u53EA\u4F20\u5E74\u6708\u65E5\uFF1B\u7701\u7565=\u8FD1 7 \u5929\u622A\u81F3\u6628\u5929\uFF0C\u9ED8\u8BA4\u6309 UTC+8 \u65E5\u5386\uFF1B\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\uFF09"
|
|
104092
104094
|
).option(
|
|
104093
104095
|
"--end <date>",
|
|
104094
|
-
"\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\
|
|
104096
|
+
"\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u53EA\u4F20\u5E74\u6708\u65E5\uFF1B\u7701\u7565=\u6628\u5929\uFF09"
|
|
104095
104097
|
).option("--start-date <date>", "\u540C --start\uFF08\u6587\u6863/Playbook \u517C\u5BB9\u522B\u540D\uFF09").option("--end-date <date>", "\u540C --end\uFF08\u6587\u6863/Playbook \u517C\u5BB9\u522B\u540D\uFF09").option(
|
|
104096
104098
|
"--sections <list>",
|
|
104097
104099
|
"\u4EC5\u6267\u884C\u6307\u5B9A\u7EF4\u5EA6\uFF08\u9017\u53F7\u5206\u9694\uFF09\uFF0C\u5982 overview,keywords,ads\uFF1B\u7701\u7565=\u5168\u90E8 25 \u4E2A"
|
package/dist/skill/_meta.json
CHANGED
|
@@ -152,7 +152,7 @@ siluzan-tso accounts-digest -m Google --start 2026-07-20 --end 2026-07-20 \
|
|
|
152
152
|
## stats — 查询投放消耗数据
|
|
153
153
|
|
|
154
154
|
> **数据时效性**:
|
|
155
|
-
> - **Google**:走 `account-spend-overview`;`--start` / `--end` 日历日按 **UTC+8** 转为 `YYYY-MM-DDTHH:mm:ss+08:00` 再请求(起 00:00:00、止 23:59:59,含今天时 end
|
|
155
|
+
> - **Google**:走 `account-spend-overview`;`--start` / `--end` 日历日按 **UTC+8** 转为 `YYYY-MM-DDTHH:mm:ss+08:00` 再请求(起 00:00:00、止 23:59:59,含今天时 end 截到当前时刻)。与 `google-analysis`(只传年月日)口径不同。
|
|
156
156
|
> - 窗口完全在历史 → `database` 模式;窗口含今天 → `googleCombined` 模式(仅实时消耗,无余额/状态/币种/账户名)。
|
|
157
157
|
> - **TikTok / Yandex / BingV2 / Kwai**:走旧版 `accountsoverview`,每日凌晨同步昨天数据,**不能查今天**。判断这几家的「今天/当天/今日消耗」仍需走 `google-analysis(-batch) --sections overview`(仅 Google)。
|
|
158
158
|
> - 完整时效性表见 `references/analytics/account-analytics.md` 顶部。
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
| 命令 / 接口 | 时效性 | 能否查"今天" | 典型用途 |
|
|
25
25
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------------------------------------ |
|
|
26
|
-
| `google-analysis --sections overview`(Google 网关 `OverviewSectionData`) |
|
|
26
|
+
| `google-analysis --sections overview`(Google 网关 `OverviewSectionData`) | **实时**;请求起止为 **YYYY-MM-DD**(不附加时区) | ✅ 可查当天 | 当天/今日消耗、当天高消耗账号排行 |
|
|
27
27
|
| `google-analysis --sections campaign-types`(`types-summary`) | **实时** | ✅ 可查当天 | 当天系列类型分布 |
|
|
28
|
-
| `google-analysis` 其他 range 维度(`campaigns` / `keywords` / `devices` / `geographic` / `daily-metrics` / …) | 实时(受 Google Ads API
|
|
28
|
+
| `google-analysis` 其他 range 维度(`campaigns` / `keywords` / `devices` / `geographic` / `daily-metrics` / …) | 实时(受 Google Ads API 同步延迟影响);**一律 YYYY-MM-DD**(不附加时区;与 `stats` 的 UTC+8 不同) | 可查当天,但当天可能尚未结算 | 周期分析、报告 |
|
|
29
29
|
| `stats -m Google` / `balance-scan -m Google` / `accounts-digest -m Google` / `list-accounts -m Google` 合并消耗(TSO `account-spend-overview`,2026-05 起) | **后端自动分流**:窗口完全在历史 → `database`;含今天 → `googleCombined`。**`stats` 请求起止按 UTC+8 墙钟**(`…T00:00:00+08:00` ~ `…T23:59:59+08:00`) | ✅ 可查当天(含今天时切实时聚合) | 历史回溯、巡检、周报 KPI、余额续航估算 |
|
|
30
30
|
| `stats` / `balance-scan` / `accounts-digest` / `list-accounts` 的 **TikTok / Yandex / BingV2 / Kwai / MetaAd** 合并消耗(TSO `accountsoverview`;MetaAd OAuth 户走 `FacebookAds` 段) | **每日同步昨天** | ❌ 查今天会全为 0 | 历史回溯、巡检、余额续航估算(口径为"截至昨天") |
|
|
31
31
|
| `balance`(`GetMediaAccountInfo`) | 实时 | — | 仅当前余额,不反映消耗 |
|
|
@@ -102,7 +102,7 @@ siluzan-tso google-analysis -a <id> --exclude materials,gold-account --json-out
|
|
|
102
102
|
| `--json-out <dir>` | 必填;每维一个 `<section>-<accountId>.json` + `manifest-<accountId>.json` |
|
|
103
103
|
| `--sections <list>` | 仅执行指定维度(逗号分隔);省略=全部 25 个 |
|
|
104
104
|
| `--exclude <list>` | 排除指定维度;与 `--sections` 可叠加 |
|
|
105
|
-
| `--start` / `--end` | 统计区间(YYYY-MM-DD
|
|
105
|
+
| `--start` / `--end` | 统计区间(YYYY-MM-DD,**只传年月日**;默认区间按 UTC+8 日历)。与 `stats -m Google`(会加成 `+08:00`)不同;省略=近 7 天截至昨天;`final-urls`/`campaign-types` 自动忽略 |
|
|
106
106
|
| `--concurrency <n>` | 并发数,默认 5,上限 16 |
|
|
107
107
|
| `--limit <n>` | 透传给 `keywords`/`search-terms`(默认 **0**=不封顶;`orderByCost=true`) |
|
|
108
108
|
| `--level <lvl>` | 透传给 `extensions`(Account/Campaign/Ad Group) |
|
|
@@ -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.40-beta.
|
|
12
|
+
$PKG_VERSION = '1.1.40-beta.6'
|
|
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.40-beta.
|
|
12
|
+
readonly PKG_VERSION="1.1.40-beta.6"
|
|
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"
|