siluzan-tso-cli 1.1.21 → 1.1.22-beta.2

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 CHANGED
@@ -43,7 +43,7 @@ HTML 报告模板引用以下 CDN:`cdn.tailwindcss.com`、`cdnjs.cloudflare.co
43
43
  在**用户的目标项目根目录**执行(根据用户使用的助手选择 `--ai`):
44
44
 
45
45
  ```bash
46
- npm install -g siluzan-tso-cli
46
+ npm install -g siluzan-tso-cli@beta
47
47
  siluzan-tso init --ai cursor # 写入 Cursor(默认)
48
48
  siluzan-tso init --ai cursor,claude # 同时写入多个平台
49
49
  siluzan-tso init --ai all # 写入所有支持的平台
@@ -51,6 +51,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
51
51
  siluzan-tso init --force # 强制覆盖已存在文件
52
52
  ```
53
53
 
54
+ > **注意**:当前为测试版(1.1.22-beta.2),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
54
55
 
55
56
  | 助手 | 建议 `--ai` |
56
57
  | ----------------------- | ------------------------------------ |
package/dist/index.js CHANGED
@@ -3328,7 +3328,7 @@ var DEFAULT_API_BASE;
3328
3328
  var init_defaults = __esm({
3329
3329
  "src/config/defaults.ts"() {
3330
3330
  "use strict";
3331
- DEFAULT_API_BASE = "https://tso-api.siluzan.com";
3331
+ DEFAULT_API_BASE = "https://tso-api-ci.siluzan.com";
3332
3332
  }
3333
3333
  });
3334
3334
 
@@ -114340,26 +114340,8 @@ function buildPmaxCreateUrl(googleApiUrl, accountId) {
114340
114340
  return `${base}/accounts/${accountId}/campaign/pmax`;
114341
114341
  }
114342
114342
 
114343
- // src/commands/ad/pmax-feature-guard.ts
114344
- var ENV_KEY = "SILUZAN_PMAX_SETUP";
114345
- function isPmaxSetupEnabled() {
114346
- const v = process.env[ENV_KEY]?.trim();
114347
- return v === "1" || v?.toLowerCase() === "true";
114348
- }
114349
- function assertPmaxSetupEnabled(feature) {
114350
- if (isPmaxSetupEnabled()) return;
114351
- console.error(
114352
- `
114353
- \u274C PMax\u300C${feature}\u300D\u6682\u672A\u5728\u751F\u4EA7\u73AF\u5883\u5F00\u653E\uFF08\u642D\u5EFA\u80FD\u529B\u4ECD\u5728\u6D4B\u8BD5\uFF09\u3002
114354
- \u8BF7\u5728 Google Ads UI \u64CD\u4F5C\uFF0C\u6216\u672C\u5730\u8054\u8C03\u65F6\u8BBE\u7F6E ${ENV_KEY}=1 \u540E\u91CD\u8BD5\u3002
114355
- `
114356
- );
114357
- process.exit(1);
114358
- }
114359
-
114360
114343
  // src/commands/ad/pmax-create.ts
114361
114344
  async function runAdPmaxCreate(opts) {
114362
- assertPmaxSetupEnabled("pmax-create");
114363
114345
  const cfg = loadPmaxCreateConfig(opts.configFile);
114364
114346
  const { errors: cfgErrors, warnings: cfgWarnings } = runPmaxCreateValidation(cfg);
114365
114347
  const { errors: imgErrors, warnings: imgWarnings } = await runPmaxImageValidation(
@@ -114449,7 +114431,6 @@ async function runAdPmaxCreate(opts) {
114449
114431
  import { writeFileSync as writeFileSync3 } from "fs";
114450
114432
  init_cli_json_snapshot();
114451
114433
  async function runAdPmaxValidate(opts) {
114452
- assertPmaxSetupEnabled("pmax-validate");
114453
114434
  const cfg = loadPmaxCreateConfig(opts.configFile);
114454
114435
  const { errors: cfgErrors, warnings: cfgWarnings } = runPmaxCreateValidation(cfg);
114455
114436
  const { errors: imgErrors, warnings: imgWarnings } = await runPmaxImageValidation(
@@ -114691,7 +114672,6 @@ async function runAdPmaxGet(opts) {
114691
114672
  });
114692
114673
  }
114693
114674
  async function runAdPmaxEdit(opts) {
114694
- assertPmaxSetupEnabled("pmax-edit");
114695
114675
  const accountId = requireAccountId(opts.account);
114696
114676
  const campaignId = opts.campaignId.trim();
114697
114677
  let body;
@@ -114753,7 +114733,6 @@ async function runAdPmaxEdit(opts) {
114753
114733
  });
114754
114734
  }
114755
114735
  async function runAdPmaxAssetGroupCreate(opts) {
114756
- assertPmaxSetupEnabled("pmax-asset-group-create");
114757
114736
  const cfg = loadPmaxJsonFile(opts.configFile);
114758
114737
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
114759
114738
  const campaignId = String(cfg["campaignId"] ?? "").trim();
@@ -114839,7 +114818,6 @@ async function runAdPmaxAssetGroupCreate(opts) {
114839
114818
  });
114840
114819
  }
114841
114820
  async function runAdPmaxAssetGroupEdit(opts) {
114842
- assertPmaxSetupEnabled("pmax-asset-group-edit");
114843
114821
  const accountId = requireAccountId(opts.account);
114844
114822
  const assetGroupId = opts.assetGroupId.trim();
114845
114823
  let body;
@@ -114891,7 +114869,6 @@ async function runAdPmaxAssetGroupEdit(opts) {
114891
114869
  });
114892
114870
  }
114893
114871
  async function runAdPmaxAssetsUpdate(opts) {
114894
- assertPmaxSetupEnabled("pmax-assets-update");
114895
114872
  const cfg = loadPmaxJsonFile(opts.configFile);
114896
114873
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
114897
114874
  const assetGroupId = String(cfg["assetGroupId"] ?? "").trim();
@@ -114952,7 +114929,6 @@ async function runAdPmaxAssetsUpdate(opts) {
114952
114929
  });
114953
114930
  }
114954
114931
  async function runAdPmaxYoutubeLink(opts) {
114955
- assertPmaxSetupEnabled("pmax-youtube-link");
114956
114932
  const accountId = requireAccountId(opts.account);
114957
114933
  const assetGroupId = opts.assetGroupId.trim();
114958
114934
  let body;
@@ -115042,7 +115018,6 @@ async function runAdPmaxSignalsGet(opts) {
115042
115018
  });
115043
115019
  }
115044
115020
  async function runAdPmaxSignalsSet(opts) {
115045
- assertPmaxSetupEnabled("pmax-signals-set");
115046
115021
  const cfg = loadPmaxJsonFile(opts.configFile);
115047
115022
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
115048
115023
  const assetGroupId = String(cfg["assetGroupId"] ?? "").trim();
@@ -115162,7 +115137,6 @@ PMax \u53D7\u4F17\u6570\u636E\u6E90\uFF08\u8D26\u6237 ${accountId}\uFF09
115162
115137
  });
115163
115138
  }
115164
115139
  async function runAdPmaxImageUpload(opts) {
115165
- assertPmaxSetupEnabled("pmax-image-upload");
115166
115140
  const accountId = requireAccountId(opts.account);
115167
115141
  await withGoogleApi(opts, async (config, googleApiUrl) => {
115168
115142
  let data;
@@ -115392,7 +115366,6 @@ async function convertOne(sharpFn, inputPath, outputPath, spec, quality) {
115392
115366
  await pipeline.toFile(outputPath);
115393
115367
  }
115394
115368
  async function runAdPmaxImageConvert(opts) {
115395
- assertPmaxSetupEnabled("pmax-image-convert");
115396
115369
  const { input, inputMarketing, inputSquare, inputLogo } = opts;
115397
115370
  if (!input && !inputMarketing && !inputSquare && !inputLogo) {
115398
115371
  console.error("\n\u274C \u8BF7\u81F3\u5C11\u6307\u5B9A --input \u6216 --input-marketing / --input-square / --input-logo\n");
@@ -42,7 +42,9 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
42
42
  | `references/currency.md` | 账户币种 CNY/USD:字段来源、符号、跨币种禁止求和 |
43
43
  | `references/open-account-by-media.md` | 各媒体开户、参数与资料要求 |
44
44
  | `references/google-ads-campaign-plan.md` | Google 新建搜索系列:双轨入口、7 步流水线、`campaign-validate/create` |
45
- | `references/google-ads.md` | Google Ads 命令:CRUD、batch、拒审字段(**PMax 搭建暂未开放**,见硬规范) |
45
+ | `assets/pmax-create-template.md` | PMax 新建:`pmax-validate` / `pmax-create`(JSON 契约,非 Search batch|
46
+ | `references/pmax-api.md` | PMax 网关路径、金额口径、与 Search API 边界 |
47
+ | `references/google-ads.md` | Google Ads 命令:CRUD、batch、PMax 创建、拒审字段 |
46
48
  | `references/keyword-planner-workflows.md` | `keyword` / `google-analysis` 拓词编排(不含建户 JSON 流程) |
47
49
  | `references/rag.md` | 知识库检索(`rag list` + `rag query`):客户产品/行业事实 |
48
50
  | `references/reporting.md` | TSO 优化报告(Google/TikTok)生成、推送、查看 |
@@ -103,7 +105,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
103
105
  | 拉数 / 报告 / 周报 / 分析 / `google-analysis` | `references/account-analytics.md` + `references/tips.md`;多账户批处理加 `google-analysis-batch.md` |
104
106
  | Google 新建搜索系列 | `references/google-ads-campaign-plan.md`(再按需 `google-ads.md`、模板 JSON) |
105
107
  | Google 广告 CRUD / 拒审 / 系列组关键词 | `references/google-ads.md` |
106
- | PMax 搭建 / 管理 | **暂未开放** — 勿调用 `ad pmax-*` 写入命令;见下方硬规范 |
108
+ | PMax | `assets/pmax-create-template.md` + `references/pmax-api.md` |
107
109
  | 拓词 / keyword | `references/keyword-planner-workflows.md`;要客户背景先 `rag.md` |
108
110
  | 优化报告(TSO 平台) | `references/reporting.md` |
109
111
  | 预警 | `references/forewarning.md` |
@@ -145,7 +147,6 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
145
147
  - **破坏性操作必须确认 + `--commit`**:账户解绑/关闭/取消分享、BC/MCC 解绑、删除预警/报告/广告/关键词、发票申请、广告发布等。所有写/修改命令的 `--commit` 字段填写修改前后的值,便于排查或恢复。
146
148
  - **不确定时读文档**:先读对应 references 或用 `-h` 查看帮助,不要猜参数。
147
149
  - **Google 新建搜索系列**:流程仅在 `references/google-ads-campaign-plan.md` 维护。
148
- - **PMax 暂未开放**:**禁止**调用任何 `ad pmax-*` 搭建/写入命令(含 `pmax-create`、`pmax-validate`、`pmax-edit`、`pmax-asset-group-*`、`pmax-assets-update` 等)。用户要新建或改 PMax 时,说明 CLI 能力仍在测试,请在 **Google Ads UI** 操作;数据分析可用 `google-analysis` / `ad campaigns`(读 `channelTypeV2=PERFORMANCE_MAX`),运营建议可读 `references/google-ads-rules/google-ads-pmax-guide.md`(只读参考,不含 CLI 搭建步骤)。
149
150
  - **Google 开户**:`open-account google-wizard` 仅限真实 TTY;Agent/自动化用非交互 `open-account google ...`,审核进度用 `account-history`。
150
151
  - **主动更新**:详见 `references/setup.md`。
151
152
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.21",
4
- "publishedAt": 1779760187569
3
+ "version": "1.1.22-beta.2",
4
+ "publishedAt": 1779779249285
5
5
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  ## invoice-info — 发票抬头管理
9
9
 
10
- 对应页面:`https://www.siluzan.com/v3/foreign_trade/settings/invoiceInformation`
10
+ 对应页面:`https://www-ci.siluzan.com/v3/foreign_trade/settings/invoiceInformation`
11
11
 
12
12
  发票抬头是开票申请时使用的公司/企业信息模板,支持三种类型:
13
13
 
@@ -133,10 +133,10 @@ siluzan-tso config show
133
133
  **示例:**
134
134
 
135
135
  ```
136
- - 现金充值(单笔):https://www.siluzan.com/recharge/pay
137
- - 现金充值(批量):https://www.siluzan.com/recharge/pay_batch
138
- - 月结充值: https://www.siluzan.com/recharge/accountBillingQuota
139
- - 丝路赞钱包: https://www.siluzan.com/recharge/siluzanWallet
136
+ - 现金充值(单笔):https://www-ci.siluzan.com/recharge/pay
137
+ - 现金充值(批量):https://www-ci.siluzan.com/recharge/pay_batch
138
+ - 月结充值: https://www-ci.siluzan.com/recharge/accountBillingQuota
139
+ - 丝路赞钱包: https://www-ci.siluzan.com/recharge/siluzanWallet
140
140
  ```
141
141
 
142
142
  ---
@@ -13,7 +13,7 @@
13
13
 
14
14
  - 可执行真相只有 **JSON**(`assets/campaign-create-template.json` 同构);Markdown 只读投影。
15
15
  - 改需求 **只改 JSON**,再 `campaign-validate`,再刷新 Markdown。
16
- - **PMax 系列创建暂未开放**:勿用 `ad pmax-*` 搭建命令;请在 Google Ads UI 操作。运营诊断(只读)见 `google-ads-rules/google-ads-pmax-guide.md`。
16
+ - **PMax 系列创建**走独立流水线(勿用本文件 JSON 模板):`assets/pmax-create-template.md` + `ad pmax-validate` / `ad pmax-create`;运营诊断见 `google-ads-rules/google-ads-pmax-guide.md`。
17
17
  - 搜索网络:仅 Google 搜索(`TargetSearchNetwork`/`TargetContentNetwork`/`TargetPartnerSearchNetwork` 均为 false)。
18
18
 
19
19
  ---
@@ -63,8 +63,8 @@
63
63
  | `google-ads-rules/google-ads-keyword-optimization.md` | 上线后优化,非首建 |
64
64
  | `google-ads-rules/google-ads-account-audit.md` | 账户诊断,非首建 |
65
65
  | `google-ads-rules/google-ads-audience-strategy.md` | 受众/RLSA |
66
- | `google-ads-rules/google-ads-pmax-guide.md` | PMax 运营/诊断(只读参考;**CLI 搭建暂未开放**) |
67
- | `references/pmax-api.md` | PMax 网关路径(开发参考;生产勿调用搭建命令) |
66
+ | `google-ads-rules/google-ads-pmax-guide.md` | PMax 运营/诊断;**创建**见 `assets/pmax-create-template.md` |
67
+ | `references/pmax-api.md` | PMax 网关路径与 Search API 边界 |
68
68
 
69
69
  复述给用户:**3–5 条**与本次任务相关的合规/策略要点即可,无需罗列全部文件名。
70
70
 
@@ -31,10 +31,6 @@
31
31
 
32
32
  ## 新建 Performance Max(PMax)
33
33
 
34
- > **⛔ 暂未开放(生产)**:PMax CLI 搭建/写入能力仍在测试,**禁止** Agent 或用户通过 `ad pmax-create` / `pmax-validate` / `pmax-edit` 等命令操作。请在 **Google Ads UI** 新建与管理 PMax。本地联调可设环境变量 `SILUZAN_PMAX_SETUP=1` 后使用 CLI(开发专用)。
35
- >
36
- > 下列命令文档保留供后续上线参考,**当前勿执行**。
37
-
38
34
  > **与 Search 隔离**:勿用 `campaign-create` 或 `campaign-create-template.json`。网关摘录见 `references/pmax-api.md`。
39
35
 
40
36
  | 步骤 | 命令 |
@@ -1,7 +1,5 @@
1
1
  # Performance Max 网关 API(CLI 对照)
2
2
 
3
- > **⛔ 暂未开放(生产)**:PMax CLI 搭建/写入仍在测试。Skill 路由已屏蔽;CLI 默认拒绝 `pmax-create` 等写入命令。请在 Google Ads UI 操作,或本地设 `SILUZAN_PMAX_SETUP=1` 联调。
4
- >
5
3
  > 完整契约:Sammamish `src/GoogleAPI/docs/pmax-frontend-api.md`
6
4
 
7
5
  ---
@@ -1,6 +1,6 @@
1
1
  # rag:知识库检索(TSO 广告投放辅助)
2
2
 
3
- 知识库管理页面在 https://www.siluzan.com/knowledge-base/
3
+ 知识库管理页面在 https://www-ci.siluzan.com/knowledge-base/
4
4
 
5
5
  为 **广告投放、账户分析、拓词、诊断报告** 等 TSO 业务提供**企业已入库**的产品、行业、客户背景事实依据。
6
6
 
@@ -214,8 +214,8 @@ siluzan-tso report list -m Google --json
214
214
 
215
215
  # 第二步:查看 webUrl
216
216
  siluzan-tso config show
217
- # webUrl: https://www.siluzan.com
217
+ # webUrl: https://www-ci.siluzan.com
218
218
 
219
219
  # 第三步:拼接链接(Google 日报)
220
- # https://www.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
220
+ # https://www-ci.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
221
221
  ```
@@ -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@beta
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.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
67
+ API Key 获取入口:`https://www-ci.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
68
68
 
69
69
  ```bash
70
70
  # 第 1 步:让用户报出手机号后,立刻发码(命令立即返回,不会等待输入)
@@ -129,9 +129,9 @@ siluzan-tso config show
129
129
 
130
130
  ```
131
131
  构建环境 : production
132
- apiBaseUrl : https://tso-api.siluzan.com
133
- googleApiUrl : https://googleapi.mysiluzan.com
134
- webUrl : https://www.siluzan.com
132
+ apiBaseUrl : https://tso-api-ci.siluzan.com
133
+ googleApiUrl : https://googleapi-ci.mysiluzan.com
134
+ webUrl : https://www-ci.siluzan.com
135
135
  apiKey : abcd****1234
136
136
  ```
137
137
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  用 `siluzan-tso config show` 读取 **`webUrl`**,再拼接路径:
8
8
 
9
- 首页地址:`https://www.siluzan.com/v3/foreign_trade/tso/home`
9
+ 首页地址:`https://www-ci.siluzan.com/v3/foreign_trade/tso/home`
10
10
 
11
11
  > 若用户已登录 TSO,也可从左侧菜单进入「首页」。
12
12
 
@@ -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.21'
12
+ $PKG_VERSION = '1.1.22-beta.2'
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.siluzan.com'
15
+ $INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
16
+ $WEB_BASE = 'https://www-ci.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.21"
12
+ readonly PKG_VERSION="1.1.22-beta.2"
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.siluzan.com"
15
+ readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
16
+ readonly WEB_BASE="https://www-ci.siluzan.com"
17
17
 
18
18
  # -- Constants ----------------------------------------------------------------
19
19
  readonly NODE_MAJOR_MIN=18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-tso-cli",
3
- "version": "1.1.21",
3
+ "version": "1.1.22-beta.2",
4
4
  "description": "Siluzan 广告账户管理 CLI — 查询账户、余额、消耗数据,管理绑定关系与充值。",
5
5
  "keywords": [
6
6
  "ad-account",