siluzan-tso-cli 1.1.44-beta.4 → 1.1.44
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 -2
- package/dist/index.js +20 -3
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/accounts/accounts-list.md +1 -1
- package/dist/skill/references/accounts/accounts-permissions.md +2 -2
- package/dist/skill/references/accounts/finance.md +1 -1
- package/dist/skill/references/accounts/open-account-by-media.md +1 -1
- package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
- package/dist/skill/references/analytics/rag.md +1 -1
- package/dist/skill/references/analytics/reporting.md +5 -5
- package/dist/skill/references/core/setup.md +5 -5
- package/dist/skill/references/google-ads/google-ads-read.md +4 -1
- package/dist/skill/references/misc/tso-home.md +2 -2
- package/dist/skill/scripts/install.ps1 +3 -3
- package/dist/skill/scripts/install.sh +3 -3
- package/package.json +1 -1
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
|
|
47
47
|
siluzan-tso init --ai cursor # 写入 Cursor(默认)
|
|
48
48
|
siluzan-tso init --ai cursor,claude # 同时写入多个平台
|
|
49
49
|
siluzan-tso init --ai all # 写入所有支持的平台
|
|
@@ -51,7 +51,6 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
|
|
|
51
51
|
siluzan-tso init --force # 强制覆盖已存在文件
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
> **注意**:当前为测试版(1.1.44-beta.4),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
54
|
|
|
56
55
|
| 助手 | 建议 `--ai` |
|
|
57
56
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -4026,7 +4026,7 @@ var DEFAULT_API_BASE;
|
|
|
4026
4026
|
var init_defaults = __esm({
|
|
4027
4027
|
"src/config/defaults.ts"() {
|
|
4028
4028
|
"use strict";
|
|
4029
|
-
DEFAULT_API_BASE = "https://tso-api
|
|
4029
|
+
DEFAULT_API_BASE = "https://tso-api.siluzan.com";
|
|
4030
4030
|
}
|
|
4031
4031
|
});
|
|
4032
4032
|
|
|
@@ -111890,6 +111890,9 @@ function firstKeywordTextFromRecord(k) {
|
|
|
111890
111890
|
}
|
|
111891
111891
|
return "";
|
|
111892
111892
|
}
|
|
111893
|
+
function toNegativeKeywordAppliedLevelQuery(level) {
|
|
111894
|
+
return level === "AdGroup" ? "Ad group" : level;
|
|
111895
|
+
}
|
|
111893
111896
|
function keywordRowToYuan(item) {
|
|
111894
111897
|
const { maxCPC: rawMaxCpc, ...rest } = item;
|
|
111895
111898
|
if (rawMaxCpc == null) return item;
|
|
@@ -111903,7 +111906,7 @@ async function runAdKeywords(opts) {
|
|
|
111903
111906
|
params.set("startDate", toGoogleDate(opts.startDate, -30));
|
|
111904
111907
|
params.set("endDate", toGoogleDate(opts.endDate, 0));
|
|
111905
111908
|
if (opts.negative && opts.level) {
|
|
111906
|
-
params.set("appliedlevel", opts.level);
|
|
111909
|
+
params.set("appliedlevel", toNegativeKeywordAppliedLevelQuery(opts.level));
|
|
111907
111910
|
}
|
|
111908
111911
|
const endpoint = opts.negative ? "negativekeywordmanagement" : "keywordmanagement";
|
|
111909
111912
|
const url = `${googleApiUrl}/${endpoint}/v2/list/${opts.account}?${params}`;
|
|
@@ -112284,7 +112287,21 @@ async function runAdNegativeKeywordEdit(opts) {
|
|
|
112284
112287
|
}
|
|
112285
112288
|
const url = `${googleApiUrl}/negativekeywordmanagement/negativekeyword/${opts.account}/${opts.id}`;
|
|
112286
112289
|
try {
|
|
112287
|
-
|
|
112290
|
+
const raw = await apiFetch2(
|
|
112291
|
+
url,
|
|
112292
|
+
config,
|
|
112293
|
+
{ method: "PUT", body: JSON.stringify(body) },
|
|
112294
|
+
opts.verbose
|
|
112295
|
+
);
|
|
112296
|
+
const returned = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : Array.isArray(raw) && raw[0] && typeof raw[0] === "object" ? raw[0] : null;
|
|
112297
|
+
const returnedId = returned && typeof returned["id"] === "string" ? returned["id"] : void 0;
|
|
112298
|
+
if (returnedId && returnedId !== opts.id) {
|
|
112299
|
+
console.log(
|
|
112300
|
+
`
|
|
112301
|
+
\u2139\uFE0F \u7F51\u5173\u8FD4\u56DE\u7684\u5426\u5B9A\u5173\u952E\u8BCD id \u5DF2\u53D8\u66F4\u4E3A ${returnedId}\uFF08\u8BF7\u6C42\u65F6 id \u4E3A ${opts.id}\uFF09\uFF0C\u540E\u7EED\u67E5\u8BE2/\u5220\u9664\u8BF7\u4F7F\u7528\u65B0 id\u3002
|
|
112302
|
+
`
|
|
112303
|
+
);
|
|
112304
|
+
}
|
|
112288
112305
|
} catch (err) {
|
|
112289
112306
|
console.error(`
|
|
112290
112307
|
\u274C \u7F16\u8F91\u5426\u5B9A\u5173\u952E\u8BCD\u5931\u8D25\uFF1A${err instanceof Error ? err.message : String(err)}
|
package/dist/skill/_meta.json
CHANGED
|
@@ -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
|
|
170
|
+
| `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Kwai、Yandex 当前没有对应充值界面) |
|
|
171
171
|
| `Rejected` | 被拒 | 查看 `--json-out` 落盘中的 `reason` 字段了解拒绝原因;修改资料后重新提交;若原因不明,引导用户联系丝路赞客服 |
|
|
172
172
|
|
|
173
173
|
---
|
|
@@ -488,7 +488,7 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
|
|
|
488
488
|
|
|
489
489
|
| 功能 | 媒体 | 网页路径 |
|
|
490
490
|
| --------------------------------------- | ------ | ------------------------------------------------- |
|
|
491
|
-
| **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www
|
|
491
|
+
| **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
|
|
492
492
|
|
|
493
493
|
**Agent 建议话术**:
|
|
494
494
|
|
|
@@ -497,5 +497,5 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
|
|
|
497
497
|
siluzan-tso config show # 查看 webUrl 字段
|
|
498
498
|
|
|
499
499
|
# 账户激活(Google)→ 引导至账户管理页
|
|
500
|
-
# https://www
|
|
500
|
+
# https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts
|
|
501
501
|
```
|
|
@@ -126,7 +126,7 @@ siluzan-tso config show
|
|
|
126
126
|
|
|
127
127
|
### 充值页链接(按媒体 × 类型)
|
|
128
128
|
|
|
129
|
-
链接模式:`https://www
|
|
129
|
+
链接模式:`https://www.siluzan.com/v3/foreign_trade/tso/recharge/<page>?mediaType=<mediaType>`;丝路赞钱包:`https://www.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
|
|
3
|
+
> 网页链接:`https://www.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
|
|
68
|
+
# 审核通过后:config show → https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -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
|
|
194
|
-
| Google | 小时报(Hourly) | `https://www
|
|
195
|
-
| TikTok | 日报 | `https://www
|
|
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` |
|
|
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
|
|
208
|
+
# webUrl: https://www.siluzan.com
|
|
209
209
|
|
|
210
210
|
# 第三步:拼接链接(Google 日报)
|
|
211
|
-
# https://www
|
|
211
|
+
# https://www.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
|
|
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
|
|
67
|
+
API Key 获取入口:`https://www.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
|
|
131
|
-
googleApiUrl : https://googleapi
|
|
132
|
-
webUrl : https://www
|
|
130
|
+
apiBaseUrl : https://tso-api.siluzan.com
|
|
131
|
+
googleApiUrl : https://googleapi.mysiluzan.com
|
|
132
|
+
webUrl : https://www.siluzan.com
|
|
133
133
|
apiKey : abcd****1234
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -225,15 +225,18 @@ siluzan-tso ad keyword-negative-create \
|
|
|
225
225
|
-a <accountId> --level Account \
|
|
226
226
|
--keywords "free,jobs,DIY"
|
|
227
227
|
|
|
228
|
-
# 查询:--level Account
|
|
228
|
+
# 查询:--level Account|Campaign|AdGroup 按层级过滤;不传则三级都返回(用输出里的「级别」区分)
|
|
229
229
|
siluzan-tso ad keywords -a <accountId> --negative --level Account --json-out ./snap
|
|
230
|
+
siluzan-tso ad keywords -a <accountId> --negative --level AdGroup
|
|
230
231
|
|
|
231
232
|
# 删除/编辑对三级通用(先用 ad keywords --negative --json-out ./snap 获取 id,无需额外传层级)
|
|
233
|
+
# 编辑成功后 id 可能变(网关先建后删),以 CLI 提示的新 id 为准
|
|
232
234
|
siluzan-tso ad keyword-negative-delete -a <accountId> --id <negativeKeywordId>
|
|
233
235
|
```
|
|
234
236
|
|
|
235
237
|
> **禁止**因「多词」就让用户去 Google Ads 后台手工补否词——那是 Agent 误判;用上面命令即可。
|
|
236
238
|
> 账户级否词账户上限约 1000 词;权限不足返回 `403`,Google 侧错误返回 `400`。
|
|
239
|
+
> 查询 `--level AdGroup` 时 CLI 会映射为网关历史值 `appliedlevel=Ad group`(有空格),调用方无需关心。
|
|
237
240
|
|
|
238
241
|
---
|
|
239
242
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
siluzan-tso config show # 取 webUrl
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
首页地址:`https://www
|
|
9
|
+
首页地址:`https://www.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
|
|
28
|
+
1. **「和首页一样的总览」** → 打开 `https://www.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
|
|
|
@@ -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.44
|
|
12
|
+
$PKG_VERSION = '1.1.44'
|
|
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
|
|
15
|
+
$INSTALL_CMD = 'npm install -g siluzan-tso-cli'
|
|
16
|
+
$WEB_BASE = 'https://www.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.44
|
|
12
|
+
readonly PKG_VERSION="1.1.44"
|
|
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
|
|
15
|
+
readonly INSTALL_CMD="npm install -g siluzan-tso-cli"
|
|
16
|
+
readonly WEB_BASE="https://www.siluzan.com"
|
|
17
17
|
|
|
18
18
|
# -- Constants ----------------------------------------------------------------
|
|
19
19
|
readonly NODE_MAJOR_MIN=18
|