@optima-chat/optima-agent 0.7.4 → 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": []
|
|
@@ -14,9 +14,14 @@ CLI 命令: `google-ads`(或 `ads`)
|
|
|
14
14
|
google-ads account check
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
**返回状态及处理**:
|
|
18
|
+
| 状态 | 含义 | 处理方式 |
|
|
19
|
+
|------|------|----------|
|
|
20
|
+
| `active` | 已连接,可访问 | 继续操作 |
|
|
21
|
+
| `pending` | 邀请已发送,等待接受 | 告知用户去 Google Ads 后台接受邀请 |
|
|
22
|
+
| `refused` | 用户拒绝了邀请 | 输出:`[重新关联 Google Ads 账号](action://link-google-ads-account)` |
|
|
23
|
+
| `canceled` | 邀请已取消 | 输出:`[关联 Google Ads 账号](action://link-google-ads-account)` |
|
|
24
|
+
| `not_linked` | 未关联 | 输出:`[关联 Google Ads 账号](action://link-google-ads-account)` |
|
|
20
25
|
|
|
21
26
|
## 典型场景
|
|
22
27
|
|
|
@@ -116,6 +121,32 @@ google-ads keyword add --ad-group-id <id> -k "精确词" --match-type EXACT
|
|
|
116
121
|
google-ads keyword add --ad-group-id <id> -k "词组匹配" --match-type PHRASE
|
|
117
122
|
```
|
|
118
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
|
+
|
|
119
150
|
## 场景决策表
|
|
120
151
|
|
|
121
152
|
| 用户需求 | 推荐命令 | 关键注意点 |
|
|
@@ -126,6 +157,8 @@ google-ads keyword add --ad-group-id <id> -k "词组匹配" --match-type PHRASE
|
|
|
126
157
|
| 调整预算 | `campaign update --budget` | 单位美元 |
|
|
127
158
|
| 调整出价 | `ad-group update --cpc-bid` | 单位美元 |
|
|
128
159
|
| 添加关键词 | `keyword add` | 注意匹配类型 |
|
|
160
|
+
| 地理定向 | `campaign targeting add --type location` | geo-target ID |
|
|
161
|
+
| 人群定向 | `ad-group targeting add` | Campaign 级别只能排除 |
|
|
129
162
|
| 删除广告 | `campaign delete` / `ad delete` | 不可恢复,建议先暂停 |
|
|
130
163
|
|
|
131
164
|
## 自然语言映射
|
|
@@ -137,6 +170,9 @@ google-ads keyword add --ad-group-id <id> -k "词组匹配" --match-type PHRASE
|
|
|
137
170
|
- "启用广告" → `campaign update --status ENABLED`
|
|
138
171
|
- "调整预算到 XX" → `campaign update --budget XX`
|
|
139
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`
|
|
140
176
|
- "删除广告" → 先确认,再执行删除
|
|
141
177
|
|
|
142
178
|
## 关键概念
|
|
@@ -210,6 +246,9 @@ google-ads query -q "
|
|
|
210
246
|
- `google-ads campaign create -n "名称" -b 预算` - 创建
|
|
211
247
|
- `google-ads campaign update --campaign-id <id> [--status|--budget|--name]` - 更新
|
|
212
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>` - 删除定向
|
|
213
252
|
|
|
214
253
|
### 广告组
|
|
215
254
|
- `google-ads ad-group list [--campaign-id <id>]` - 列出
|
|
@@ -217,19 +256,22 @@ google-ads query -q "
|
|
|
217
256
|
- `google-ads ad-group create --campaign-id <id> -n "名称" [--cpc-bid 出价]` - 创建
|
|
218
257
|
- `google-ads ad-group update --ad-group-id <id> [--status|--cpc-bid|--name]` - 更新
|
|
219
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>` - 删除定向
|
|
220
262
|
|
|
221
263
|
### 关键词
|
|
222
264
|
- `google-ads keyword list [--campaign-id <id>]` - 列出
|
|
223
265
|
- `google-ads keyword add --ad-group-id <id> -k "词1,词2" [--match-type BROAD|PHRASE|EXACT]` - 添加
|
|
224
|
-
- `google-ads keyword update --
|
|
225
|
-
- `google-ads keyword delete --
|
|
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>` - 删除
|
|
226
268
|
|
|
227
269
|
### 广告
|
|
228
270
|
- `google-ads ad list [--ad-group-id <id>]` - 列出
|
|
229
271
|
- `google-ads ad info <id>` - 详情
|
|
230
272
|
- `google-ads ad create --ad-group-id <id> --headlines "..." --descriptions "..." --final-url "..."` - 创建
|
|
231
|
-
- `google-ads ad update --ad-id <id> --status` - 更新
|
|
232
|
-
- `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>` - 删除
|
|
233
275
|
|
|
234
276
|
### GAQL 查询
|
|
235
277
|
- `google-ads query -q "SELECT ... FROM ..."` - 执行查询
|
package/dist/bin/google-ads.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-ads.d.ts","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"google-ads.d.ts","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,sBAAsB,CAAC"}
|
package/dist/bin/google-ads.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-ads.js","sourceRoot":"","sources":["../../bin/google-ads.ts"],"names":[],"mappings":";AACA,OAAO,
|
|
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.
|
|
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/
|
|
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",
|