@optima-chat/optima-agent 0.7.5 → 0.7.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.
@@ -102,7 +102,9 @@
102
102
  "Bash(/private/tmp/claude/-Users-verypro-optima-agent/68a9ac2c-def2-44e1-b42b-e53bd9022ab6/scratchpad/test-canUseTool.sh)",
103
103
  "Bash(optima --help:*)",
104
104
  "Bash(npx @optima-chat/ads-cli:*)",
105
- "Bash(head:*)"
105
+ "Bash(head:*)",
106
+ "Bash(git pull:*)",
107
+ "Bash(pnpm build:*)"
106
108
  ],
107
109
  "deny": [],
108
110
  "ask": []
@@ -121,6 +121,32 @@ google-ads keyword add --ad-group-id <id> -k "精确词" --match-type EXACT
121
121
  google-ads keyword add --ad-group-id <id> -k "词组匹配" --match-type PHRASE
122
122
  ```
123
123
 
124
+ ### 场景6:设置定向条件
125
+
126
+ **用户说**:"只投放给美国用户" / "针对年轻人投放"
127
+
128
+ ```bash
129
+ # 查看当前定向条件
130
+ google-ads campaign targeting list --campaign-id <id>
131
+
132
+ # 添加地理位置定向(美国)
133
+ google-ads campaign targeting add --campaign-id <id> --type location --geo-target 2840
134
+
135
+ # 添加设备定向(移动端,出价+20%)
136
+ google-ads campaign targeting add --campaign-id <id> --type device --device MOBILE --bid-modifier 1.2
137
+
138
+ # 添加时间定向(周一至周五 9-18 点)
139
+ google-ads campaign targeting add --campaign-id <id> --type schedule --day MONDAY --start-hour 9 --end-hour 18
140
+
141
+ # 广告组级别:针对 25-34 岁用户出价+30%
142
+ google-ads ad-group targeting add --ad-group-id <id> --type age_range --age-range AGE_RANGE_25_34 --bid-modifier 1.3
143
+
144
+ # 删除定向条件
145
+ google-ads campaign targeting remove --campaign-id <id> --criterion-id <criterion-id>
146
+ ```
147
+
148
+ **注意**:人口统计定向(年龄、性别)在 Campaign 级别只能排除,正向定向需在 Ad-Group 级别设置。
149
+
124
150
  ## 场景决策表
125
151
 
126
152
  | 用户需求 | 推荐命令 | 关键注意点 |
@@ -131,6 +157,8 @@ google-ads keyword add --ad-group-id <id> -k "词组匹配" --match-type PHRASE
131
157
  | 调整预算 | `campaign update --budget` | 单位美元 |
132
158
  | 调整出价 | `ad-group update --cpc-bid` | 单位美元 |
133
159
  | 添加关键词 | `keyword add` | 注意匹配类型 |
160
+ | 地理定向 | `campaign targeting add --type location` | geo-target ID |
161
+ | 人群定向 | `ad-group targeting add` | Campaign 级别只能排除 |
134
162
  | 删除广告 | `campaign delete` / `ad delete` | 不可恢复,建议先暂停 |
135
163
 
136
164
  ## 自然语言映射
@@ -142,6 +170,9 @@ google-ads keyword add --ad-group-id <id> -k "词组匹配" --match-type PHRASE
142
170
  - "启用广告" → `campaign update --status ENABLED`
143
171
  - "调整预算到 XX" → `campaign update --budget XX`
144
172
  - "添加关键词 XX" → `keyword add -k "XX"`
173
+ - "只投放美国/中国" → `campaign targeting add --type location`
174
+ - "针对年轻人/男性" → `ad-group targeting add --type age_range/gender`
175
+ - "移动端出价加 20%" → `campaign targeting add --type device --bid-modifier 1.2`
145
176
  - "删除广告" → 先确认,再执行删除
146
177
 
147
178
  ## 关键概念
@@ -215,6 +246,9 @@ google-ads query -q "
215
246
  - `google-ads campaign create -n "名称" -b 预算` - 创建
216
247
  - `google-ads campaign update --campaign-id <id> [--status|--budget|--name]` - 更新
217
248
  - `google-ads campaign delete --campaign-id <id>` - 删除
249
+ - `google-ads campaign targeting list --campaign-id <id>` - 列出定向条件
250
+ - `google-ads campaign targeting add --campaign-id <id> --type <type> [options]` - 添加定向
251
+ - `google-ads campaign targeting remove --campaign-id <id> --criterion-id <id>` - 删除定向
218
252
 
219
253
  ### 广告组
220
254
  - `google-ads ad-group list [--campaign-id <id>]` - 列出
@@ -222,19 +256,22 @@ google-ads query -q "
222
256
  - `google-ads ad-group create --campaign-id <id> -n "名称" [--cpc-bid 出价]` - 创建
223
257
  - `google-ads ad-group update --ad-group-id <id> [--status|--cpc-bid|--name]` - 更新
224
258
  - `google-ads ad-group delete --ad-group-id <id>` - 删除
259
+ - `google-ads ad-group targeting list --ad-group-id <id>` - 列出定向条件
260
+ - `google-ads ad-group targeting add --ad-group-id <id> --type <type> [options]` - 添加定向
261
+ - `google-ads ad-group targeting remove --ad-group-id <id> --criterion-id <id>` - 删除定向
225
262
 
226
263
  ### 关键词
227
264
  - `google-ads keyword list [--campaign-id <id>]` - 列出
228
265
  - `google-ads keyword add --ad-group-id <id> -k "词1,词2" [--match-type BROAD|PHRASE|EXACT]` - 添加
229
- - `google-ads keyword update --keyword-id <id> --status` - 更新
230
- - `google-ads keyword delete --keyword-id <id>` - 删除
266
+ - `google-ads keyword update --ad-group-id <id> --criterion-id <id> --status` - 更新
267
+ - `google-ads keyword delete --ad-group-id <id> --criterion-id <id>` - 删除
231
268
 
232
269
  ### 广告
233
270
  - `google-ads ad list [--ad-group-id <id>]` - 列出
234
271
  - `google-ads ad info <id>` - 详情
235
272
  - `google-ads ad create --ad-group-id <id> --headlines "..." --descriptions "..." --final-url "..."` - 创建
236
- - `google-ads ad update --ad-id <id> --status` - 更新
237
- - `google-ads ad delete --ad-id <id>` - 删除
273
+ - `google-ads ad update --ad-group-id <id> --ad-id <id> --status` - 更新
274
+ - `google-ads ad delete --ad-group-id <id> --ad-id <id>` - 删除
238
275
 
239
276
  ### GAQL 查询
240
277
  - `google-ads query -q "SELECT ... FROM ..."` - 执行查询
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import "@optima-chat/google-ads-cli";
2
+ import "@optima-chat/ads-cli";
3
3
  //# sourceMappingURL=google-ads.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google-ads.d.ts","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,6BAA6B,CAAC"}
1
+ {"version":3,"file":"google-ads.d.ts","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,sBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import "@optima-chat/google-ads-cli";
2
+ import "@optima-chat/ads-cli";
3
3
  //# sourceMappingURL=google-ads.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"google-ads.js","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,6BAA6B,CAAC"}
1
+ {"version":3,"file":"google-ads.js","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/optima-agent",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "基于 Claude Agent SDK 的电商运营 AI 助手",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -45,7 +45,7 @@
45
45
  "@optima-chat/bi-cli": "latest",
46
46
  "@optima-chat/comfy-cli": "latest",
47
47
  "@optima-chat/commerce-cli": "latest",
48
- "@optima-chat/google-ads-cli": "latest",
48
+ "@optima-chat/ads-cli": "latest",
49
49
  "@optima-chat/scout-cli": "latest",
50
50
  "open": "^10.1.0",
51
51
  "ws": "^8.18.3",