siluzan-tso-cli 1.1.18-beta.4 → 1.1.18-beta.5
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 +3 -4
- package/dist/skill/SKILL.md +1 -0
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/account-analytics.md +2 -2
- package/dist/skill/references/google-ads.md +4 -4
- package/dist/skill/references/hosted-automation-optimize-scale.md +3 -3
- package/dist/skill/references/hosted-automation-self-control.md +4 -4
- package/eval/cases/budget-display-not-raw-micros.scenario.json +2 -2
- package/eval/cases/hosted-sop-daily-budget-circuit-breaker.scenario.json +1 -1
- package/eval/stub-fixtures/ad-campaigns.json +1 -3
- 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.18-beta.
|
|
54
|
+
> **注意**:当前为测试版(1.1.18-beta.5),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
55
|
|
|
56
56
|
| 助手 | 建议 `--ai` |
|
|
57
57
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -13197,11 +13197,10 @@ async function runAdCampaigns(opts) {
|
|
|
13197
13197
|
}
|
|
13198
13198
|
const rawItems = data.data ?? [];
|
|
13199
13199
|
const items = rawItems.map((item) => {
|
|
13200
|
-
const
|
|
13200
|
+
const budgetYuan = toDisplayMoney(item.budget);
|
|
13201
13201
|
return {
|
|
13202
13202
|
...item,
|
|
13203
|
-
|
|
13204
|
-
budgetUnit: "display",
|
|
13203
|
+
budget: budgetYuan,
|
|
13205
13204
|
statusDisplay: formatGoogleCampaignListStatus(item)
|
|
13206
13205
|
};
|
|
13207
13206
|
});
|
|
@@ -13245,7 +13244,7 @@ async function runAdCampaigns(opts) {
|
|
|
13245
13244
|
const rows = items.map((item) => {
|
|
13246
13245
|
const ctr = item.ctr != null ? (Number(item.ctr) * 100).toFixed(2) + "%" : "\u2014";
|
|
13247
13246
|
const spend = item.spend != null ? Number(item.spend).toFixed(2) : "\u2014";
|
|
13248
|
-
const budget = item.
|
|
13247
|
+
const budget = item.budget != null ? Number(item.budget).toFixed(2) : "\u2014";
|
|
13249
13248
|
return {
|
|
13250
13249
|
name: (item.name ?? "").slice(0, nameW),
|
|
13251
13250
|
status: item.statusDisplay ?? formatGoogleCampaignListStatus(item),
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -129,6 +129,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
|
|
|
129
129
|
### 金额与品牌名
|
|
130
130
|
|
|
131
131
|
- **永远使用 `*Display` 字段或表格展示值**做用户可见金额。报告/表格金额保留 2 位小数,写明货币代码(例如 `¥50.00 CNY`)。
|
|
132
|
+
- **`ad campaigns --json`/`--json-out`**:列表里的 **`budget` 已为 CLI 换算后的主币种「元」**(与 `ad campaign-edit --budget` 写参同口径),可直接作用户可见日预算;**勿再 ÷100**。见 `references/google-ads.md`「ad campaigns」。
|
|
132
133
|
- **`google-analysis` 落盘 `campaigns-*.json`**:常仅有 **`budgetAmount`(分,元=÷100)**,**禁止**误作微元 **÷1_000_000**;同文件 `spend` 等已为元。见 `references/account-analytics.md`、`references/tips.md`「campaigns-*.json」。
|
|
133
134
|
- **品牌名**必须来自(按优先级):(1) 用户明确提供 (2) `list-accounts` 返回的 `mag.advertiserName` (3) 用户提供的网址→域名占位并标注 `[待确认品牌名]`。**严禁**把英文域名自行翻译为虚构中文品牌。
|
|
134
135
|
|
package/dist/skill/_meta.json
CHANGED
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
|
|
75
75
|
### 金额单位
|
|
76
76
|
|
|
77
|
-
- **永远使用 `*Display` 字段**(如 `
|
|
77
|
+
- **永远使用 `*Display` 字段**(如 `maxCPCAmountDisplay`),不得将 `maxCPCAmount` 等 ×100 分单位直接当金额展示。**例外**:`siluzan-tso ad campaigns` 列表的 **`--json`/`--json-out` 中 `budget` 已由 CLI 换为「元」**,可直接作用户可见日预算,勿再 ÷100。
|
|
78
78
|
- **`google-analysis` 落盘 `campaigns-<id>.json`(`CampaignSectionData`)特例**:响应里常见只有 **`budgetAmount`(无 `budgetDisplay`)**。该字段与网关 **`Budget` 同为「分」整数**(主币种 ×100),换算为元须 **÷100**。**禁止**误用 Google Ads API 的**微元**去 **÷1_000_000**,否则日预算会约偏小 **一万倍**(例如 `15000` 应为 ¥150.00,误除微元会得到 ¥0.015)。同文件 **`spend`、`averageCpc`、`costPerConversion` 等已是「元」小数**,与 `budgetAmount` 单位不同,写 Excel/报告脚本时须分支处理。对应 `*.outline.txt` 内写有**同等硬提示**(`campaigns` 维度)。
|
|
79
79
|
- 金额保留 2 位小数,带货币代码(如 `¥50.00 CNY`),`currencyCode` 从响应读取。跨币种账户分表。
|
|
80
80
|
- CNY使用 ¥50,USD使用 $50 不要混用!!!
|
|
81
81
|
|
|
82
82
|
### 预算建议
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
基于当前实际预算(如 `ad campaigns --json` 的 **`budget`(元)** 或报表中的 `*Display`/分析字段)、历史日均消耗、用户给的预算上限给出建议。数据不足以判断时,在报告里写明「建议区间需用户确认」而非直接给高风险数字。
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
@@ -125,7 +125,7 @@ siluzan-tso ad campaigns -a 6326027735 --start 2026-03-01 --end 2026-03-31
|
|
|
125
125
|
siluzan-tso ad campaigns -a 6326027735 --json
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
输出字段:名称、状态、类型、预算、点击数、展示数(具体字段名以 `--json`
|
|
128
|
+
输出字段:名称、状态、类型、预算、点击数、展示数(具体字段名以 `--json` 为准)。**`--json` / `--json-out` 下 `budget` 为日预算,已由 CLI 统一为主币种「元」**(网关列表接口的「分」在 CLI 内 ÷100),与 `ad campaign-edit --budget` 等写参同口径;另有 CLI 派生的 **`statusDisplay`**(状态文案)等便于阅读。
|
|
129
129
|
|
|
130
130
|
---
|
|
131
131
|
|
|
@@ -849,9 +849,9 @@ siluzan-tso ad campaign-edit -a 6326027735 --id 23509626948 \
|
|
|
849
849
|
--name "搜索-春季促销-2026" --budget 5000
|
|
850
850
|
|
|
851
851
|
# 在原预算基础上 +10 元(典型相对运算流程):
|
|
852
|
-
# 1) 先
|
|
853
|
-
# 2) 计算新值(主币种)=
|
|
854
|
-
# 3) 把新值(主币种)作为 --budget 传入;CLI 内部自动 ×100
|
|
852
|
+
# 1) 先 `ad campaigns --json` 读出该系列 `budget`(已为**主币种元**)
|
|
853
|
+
# 2) 计算新值(主币种)= budget + 10
|
|
854
|
+
# 3) 把新值(主币种)作为 --budget 传入;CLI 内部自动 ×100 写入网关「分」
|
|
855
855
|
siluzan-tso ad campaign-edit -a 6326027735 --id 23509626948 --budget 10.01
|
|
856
856
|
|
|
857
857
|
# 切换出价策略为 TARGET_CPA,目标 CPA 2 USD
|
|
@@ -32,7 +32,7 @@ mkdir -p ./snap-scale && siluzan-tso google-analysis -a <mediaCustomerId> --sect
|
|
|
32
32
|
siluzan-tso ad campaigns -a <mediaCustomerId> --start <YYYY-MM-DD> --end <YYYY-MM-DD> --json
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
关注 **`budget
|
|
35
|
+
关注 **`budget`**(`ad campaigns --json` 下**已为元**)、**`statusV2`**、**`id`**(系列 ID),与 `SKILL.md` 金额硬规范一致后再算「+20%」等新预算。
|
|
36
36
|
|
|
37
37
|
### 3. 消耗节奏(可选)
|
|
38
38
|
|
|
@@ -60,7 +60,7 @@ mkdir -p ./snap-scale && siluzan-tso google-analysis -a <mediaCustomerId> --sect
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
# 1) GET 取主币种当前值
|
|
63
|
-
CUR=$(siluzan-tso ad campaigns -a <mediaCustomerId> --json | node -e '...筛选
|
|
63
|
+
CUR=$(siluzan-tso ad campaigns -a <mediaCustomerId> --json | node -e '...筛选 budget(元)')
|
|
64
64
|
# 2) 主币种 + 10
|
|
65
65
|
NEW=$(node -e "console.log((${CUR} + 10).toFixed(2))")
|
|
66
66
|
# 3) 主币种金额传回
|
|
@@ -90,7 +90,7 @@ siluzan-tso ad campaigns -a <mediaCustomerId> --start <…> --end <…> --json
|
|
|
90
90
|
mkdir -p ./snap-scale && siluzan-tso google-analysis -a <mediaCustomerId> --sections campaigns --start <…> --end <…> --json-out ./snap-scale
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
确认 **`budget
|
|
93
|
+
确认 **`budget`**(元)、**`targetCpa_BidingAmount`**(或组上 **`targetCpaAmount`**)与 **`statusV2`** 符合预期。
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**必读交叉引用**:
|
|
8
8
|
|
|
9
|
-
- 金额与展示:`SKILL.md
|
|
9
|
+
- 金额与展示:`SKILL.md`「金额与货币单位硬约束」;**`ad campaigns --json` 的 `budget` 已为元**;组级等 `*Display` 与原始分字段关系见 `references/google-ads.md`、`ad groups` 的 `--json` 说明。
|
|
10
10
|
- `--json` 与 Node 过滤:`references/tips.md`
|
|
11
11
|
- 写命令语法:`references/google-ads.md`(系列编辑、广告组编辑、启停等)
|
|
12
12
|
- 账户/维度分析、时间窗:`references/account-analytics.md`
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| 检查意图 | 可关注的 JSON 字段(键名以实际 stdout 为准) |
|
|
28
28
|
|----------|---------------------------------------------|
|
|
29
29
|
| 周期内费用 | 系列/组/创意列表中的 **`spend`**;报表类子命令中带费用的指标字段 |
|
|
30
|
-
| 日预算与费用比 | **`ad campaigns --json`**:`**budget
|
|
30
|
+
| 日预算与费用比 | **`ad campaigns --json`**:`**budget`**(CLI 已为元)与 **`spend`**;比较时须**统一货币与单位**(见 `SKILL.md` 金额硬规范) |
|
|
31
31
|
| 转化次数 | **`conversions`**(或报表里等价字段名) |
|
|
32
32
|
| 实际 CPA | 宿主侧 **`spend / conversions`**(`conversions` 为 0 时不做 CPA 判断) |
|
|
33
33
|
| 目标 CPA(系列 / 组) | 系列列表 JSON 中的 **`targetCpa_BidingAmount`** 等;组列表 **`ad groups --json`** 中的 **`targetCpaAmount`**(写入口径见 `google-ads.md`「广告组编辑」) |
|
|
@@ -50,7 +50,7 @@ siluzan-tso ad campaigns -a <mediaCustomerId> --start <YYYY-MM-DD> --end <YYYY-M
|
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
3. 对 `items[]` 中每条系列(`id` 为系列 ID):
|
|
53
|
-
- 读取 **`spend`**(或文档约定的费用字段)与 **`
|
|
53
|
+
- 读取 **`spend`**(或文档约定的费用字段)与 **`budget`**(`ad campaigns` JSON 下**已为元**,与 `spend` 同量级口径,见 `SKILL.md` 硬规范)。
|
|
54
54
|
- 计算阈值:`threshold = budget_in_same_unit * (coefficient / 100)`,系数 `coefficient` 建议 **110–120**(配置项)。
|
|
55
55
|
- **IF** `spend >= threshold` **且**宿主策略允许对该系列熔断(如排除白名单),则进入写操作。
|
|
56
56
|
|
|
@@ -125,7 +125,7 @@ siluzan-tso ad adgroup-edit -a <mediaCustomerId> --id <adGroupId> --max-cpc <主
|
|
|
125
125
|
|
|
126
126
|
见 **`references/google-ads.md`**「广告组编辑」。
|
|
127
127
|
|
|
128
|
-
写前**必须**先 **`ad groups --json` / `ad campaigns --json`**
|
|
128
|
+
写前**必须**先 **`ad groups --json` / `ad campaigns --json`** 取当前值,**读取主币种金额**:组侧优先 `*Display`(如 `targetCpaAmountDisplay`、`maxCPCAmountDisplay`);系列列表侧 **`ad campaigns` 的 `budget` 已为元**(与写参 `--budget` 一致),在宿主内按主币种算新值(如下调 12%:`newDisplay = round((oldDisplay * 0.88) * 100) / 100`),再以主币种金额作为 `--target-cpa` / `--max-cpc` / `--budget` 传回。
|
|
129
129
|
**严禁** 把 `targetCpaAmount` / `maxCPCAmount` / `budget` 这些「分」字段直接当作主币种金额传给 CLI——会被再 ×100 一次,金额放大 100 倍。
|
|
130
130
|
|
|
131
131
|
### 写后复核
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "budget-display-not-raw-micros",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "系列日预算须读 ad campaigns JSON 的 budget(CLI 已统一为元)",
|
|
4
4
|
"turns": [
|
|
5
5
|
"用 siluzan-tso 拉 Google 账户 {{EVAL_ACCOUNT_READ}} 在 2026-04-01~2026-04-15 的 ad campaigns --json,告诉我 Search - Brand 这条系列的「给用户看的日预算」应该是多少、依据哪个字段。"
|
|
6
6
|
],
|
|
7
|
-
"judgeExpectation": "
|
|
7
|
+
"judgeExpectation": "路径:`ad campaigns --json` 中 **`budget` 已由 CLI 换算为主币种「元」**(与 `--budget` 写入口径一致),汇报用户可见日预算应直接取该字段;禁止将旧版网关「分」整数再当元展示,也禁止按微元 ÷1e6。\n输出:若引用 JSON,应体现正确金额尺度;不要求数值与真实一致。",
|
|
8
8
|
"skillMapping": "SKILL.md「金额与货币单位硬约束」",
|
|
9
9
|
"commandMustInclude": [
|
|
10
10
|
[
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"turns": [
|
|
5
5
|
"我在给 Google 账户 {{EVAL_ACCOUNT_WRITE}} 写 Cron 宿主编排「单日预算熔断」:当日累计费用相对**日预算**达到 **115%** 就自动暂停对应 Campaign(系数做成可配置,默认区间按文档建议写进方案)。统计日 **2026-04-24**(起止都是这一天)。**请不要在本轮执行任何 siluzan-tso 命令**;只输出一份可落地的**文字方案**:读哪些接口/JSON 字段、阈值公式、命中后的写命令、熔断后人工恢复步骤。可把示例命令写在方案里作说明。"
|
|
6
6
|
],
|
|
7
|
-
"judgeExpectation": "评分对象:仅评 agent 最终回复里的**文字方案**(设计步骤、数据字段、判断条件、拟用写命令、复核与通知),**不**要求本轮对话中真的执行 CLI、也**不**依据命令 trace 给分。\n方案应可交给 Cron/OpenClaw 等宿主落地;示例命令可作为方案的一部分出现。\n方案中应写明:用 `siluzan-tso ad campaigns -a <id> --start/--end`(当日起止一致)加 `--json` 读取 **`spend`** 与 **`
|
|
7
|
+
"judgeExpectation": "评分对象:仅评 agent 最终回复里的**文字方案**(设计步骤、数据字段、判断条件、拟用写命令、复核与通知),**不**要求本轮对话中真的执行 CLI、也**不**依据命令 trace 给分。\n方案应可交给 Cron/OpenClaw 等宿主落地;示例命令可作为方案的一部分出现。\n方案中应写明:用 `siluzan-tso ad campaigns -a <id> --start/--end`(当日起止一致)加 `--json` 读取 **`spend`** 与 **`budget`**(日预算,**CLI 已统一为元**),并与 `SKILL.md` 金额硬规范**统一口径**后再比。\n方案中应写明:阈值 = 日预算(同单位)×(系数/100),系数建议 **110–120**(抗 API 延迟);**IF** spend ≥ 阈值则拟执行 **`ad campaign-status … --status Paused`**。\n方案中应写明:恢复须**人工**检查并调高预算后,再用 **`campaign-status … Enabled`** 或网页启用;不应写成无人值守自动恢复。",
|
|
8
8
|
"skillMapping": "references/hosted-automation-self-control.md · 场景 1",
|
|
9
9
|
"judgeReferencePaths": [
|
|
10
10
|
"references/hosted-automation-self-control.md",
|