siluzan-tso-cli 1.1.21-beta.6 → 1.1.21

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@beta
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.21-beta.6),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
55
54
 
56
55
  | 助手 | 建议 `--ai` |
57
56
  | ----------------------- | ------------------------------------ |
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-ci.siluzan.com";
3331
+ DEFAULT_API_BASE = "https://tso-api.siluzan.com";
3332
3332
  }
3333
3333
  });
3334
3334
 
@@ -114340,8 +114340,26 @@ 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
+
114343
114360
  // src/commands/ad/pmax-create.ts
114344
114361
  async function runAdPmaxCreate(opts) {
114362
+ assertPmaxSetupEnabled("pmax-create");
114345
114363
  const cfg = loadPmaxCreateConfig(opts.configFile);
114346
114364
  const { errors: cfgErrors, warnings: cfgWarnings } = runPmaxCreateValidation(cfg);
114347
114365
  const { errors: imgErrors, warnings: imgWarnings } = await runPmaxImageValidation(
@@ -114431,6 +114449,7 @@ async function runAdPmaxCreate(opts) {
114431
114449
  import { writeFileSync as writeFileSync3 } from "fs";
114432
114450
  init_cli_json_snapshot();
114433
114451
  async function runAdPmaxValidate(opts) {
114452
+ assertPmaxSetupEnabled("pmax-validate");
114434
114453
  const cfg = loadPmaxCreateConfig(opts.configFile);
114435
114454
  const { errors: cfgErrors, warnings: cfgWarnings } = runPmaxCreateValidation(cfg);
114436
114455
  const { errors: imgErrors, warnings: imgWarnings } = await runPmaxImageValidation(
@@ -114672,6 +114691,7 @@ async function runAdPmaxGet(opts) {
114672
114691
  });
114673
114692
  }
114674
114693
  async function runAdPmaxEdit(opts) {
114694
+ assertPmaxSetupEnabled("pmax-edit");
114675
114695
  const accountId = requireAccountId(opts.account);
114676
114696
  const campaignId = opts.campaignId.trim();
114677
114697
  let body;
@@ -114733,6 +114753,7 @@ async function runAdPmaxEdit(opts) {
114733
114753
  });
114734
114754
  }
114735
114755
  async function runAdPmaxAssetGroupCreate(opts) {
114756
+ assertPmaxSetupEnabled("pmax-asset-group-create");
114736
114757
  const cfg = loadPmaxJsonFile(opts.configFile);
114737
114758
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
114738
114759
  const campaignId = String(cfg["campaignId"] ?? "").trim();
@@ -114818,6 +114839,7 @@ async function runAdPmaxAssetGroupCreate(opts) {
114818
114839
  });
114819
114840
  }
114820
114841
  async function runAdPmaxAssetGroupEdit(opts) {
114842
+ assertPmaxSetupEnabled("pmax-asset-group-edit");
114821
114843
  const accountId = requireAccountId(opts.account);
114822
114844
  const assetGroupId = opts.assetGroupId.trim();
114823
114845
  let body;
@@ -114869,6 +114891,7 @@ async function runAdPmaxAssetGroupEdit(opts) {
114869
114891
  });
114870
114892
  }
114871
114893
  async function runAdPmaxAssetsUpdate(opts) {
114894
+ assertPmaxSetupEnabled("pmax-assets-update");
114872
114895
  const cfg = loadPmaxJsonFile(opts.configFile);
114873
114896
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
114874
114897
  const assetGroupId = String(cfg["assetGroupId"] ?? "").trim();
@@ -114929,6 +114952,7 @@ async function runAdPmaxAssetsUpdate(opts) {
114929
114952
  });
114930
114953
  }
114931
114954
  async function runAdPmaxYoutubeLink(opts) {
114955
+ assertPmaxSetupEnabled("pmax-youtube-link");
114932
114956
  const accountId = requireAccountId(opts.account);
114933
114957
  const assetGroupId = opts.assetGroupId.trim();
114934
114958
  let body;
@@ -115018,6 +115042,7 @@ async function runAdPmaxSignalsGet(opts) {
115018
115042
  });
115019
115043
  }
115020
115044
  async function runAdPmaxSignalsSet(opts) {
115045
+ assertPmaxSetupEnabled("pmax-signals-set");
115021
115046
  const cfg = loadPmaxJsonFile(opts.configFile);
115022
115047
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
115023
115048
  const assetGroupId = String(cfg["assetGroupId"] ?? "").trim();
@@ -115137,6 +115162,7 @@ PMax \u53D7\u4F17\u6570\u636E\u6E90\uFF08\u8D26\u6237 ${accountId}\uFF09
115137
115162
  });
115138
115163
  }
115139
115164
  async function runAdPmaxImageUpload(opts) {
115165
+ assertPmaxSetupEnabled("pmax-image-upload");
115140
115166
  const accountId = requireAccountId(opts.account);
115141
115167
  await withGoogleApi(opts, async (config, googleApiUrl) => {
115142
115168
  let data;
@@ -115366,6 +115392,7 @@ async function convertOne(sharpFn, inputPath, outputPath, spec, quality) {
115366
115392
  await pipeline.toFile(outputPath);
115367
115393
  }
115368
115394
  async function runAdPmaxImageConvert(opts) {
115395
+ assertPmaxSetupEnabled("pmax-image-convert");
115369
115396
  const { input, inputMarketing, inputSquare, inputLogo } = opts;
115370
115397
  if (!input && !inputMarketing && !inputSquare && !inputLogo) {
115371
115398
  console.error("\n\u274C \u8BF7\u81F3\u5C11\u6307\u5B9A --input \u6216 --input-marketing / --input-square / --input-logo\n");
@@ -42,9 +42,7 @@ 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
- | `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 创建、拒审字段 |
45
+ | `references/google-ads.md` | Google Ads 命令:CRUD、batch、拒审字段(**PMax 搭建暂未开放**,见硬规范) |
48
46
  | `references/keyword-planner-workflows.md` | `keyword` / `google-analysis` 拓词编排(不含建户 JSON 流程) |
49
47
  | `references/rag.md` | 知识库检索(`rag list` + `rag query`):客户产品/行业事实 |
50
48
  | `references/reporting.md` | TSO 优化报告(Google/TikTok)生成、推送、查看 |
@@ -105,7 +103,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
105
103
  | 拉数 / 报告 / 周报 / 分析 / `google-analysis` | `references/account-analytics.md` + `references/tips.md`;多账户批处理加 `google-analysis-batch.md` |
106
104
  | Google 新建搜索系列 | `references/google-ads-campaign-plan.md`(再按需 `google-ads.md`、模板 JSON) |
107
105
  | Google 广告 CRUD / 拒审 / 系列组关键词 | `references/google-ads.md` |
108
- | PMax | `assets/pmax-create-template.md` + `references/pmax-api.md` |
106
+ | PMax 搭建 / 管理 | **暂未开放** — 勿调用 `ad pmax-*` 写入命令;见下方硬规范 |
109
107
  | 拓词 / keyword | `references/keyword-planner-workflows.md`;要客户背景先 `rag.md` |
110
108
  | 优化报告(TSO 平台) | `references/reporting.md` |
111
109
  | 预警 | `references/forewarning.md` |
@@ -147,6 +145,7 @@ Windows 注意:部分 Agent 客户端通过 PowerShell / cmd 代执行命令
147
145
  - **破坏性操作必须确认 + `--commit`**:账户解绑/关闭/取消分享、BC/MCC 解绑、删除预警/报告/广告/关键词、发票申请、广告发布等。所有写/修改命令的 `--commit` 字段填写修改前后的值,便于排查或恢复。
148
146
  - **不确定时读文档**:先读对应 references 或用 `-h` 查看帮助,不要猜参数。
149
147
  - **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 搭建步骤)。
150
149
  - **Google 开户**:`open-account google-wizard` 仅限真实 TTY;Agent/自动化用非交互 `open-account google ...`,审核进度用 `account-history`。
151
150
  - **主动更新**:详见 `references/setup.md`。
152
151
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.21-beta.6",
4
- "publishedAt": 1779702256218
3
+ "version": "1.1.21",
4
+ "publishedAt": 1779760187569
5
5
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  ## invoice-info — 发票抬头管理
9
9
 
10
- 对应页面:`https://www-ci.siluzan.com/v3/foreign_trade/settings/invoiceInformation`
10
+ 对应页面:`https://www.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-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
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
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 系列创建**走独立流水线(勿用本文件 JSON 模板):`assets/pmax-create-template.md` + `ad pmax-validate` / `ad pmax-create`;运营诊断见 `google-ads-rules/google-ads-pmax-guide.md`。
16
+ - **PMax 系列创建暂未开放**:勿用 `ad pmax-*` 搭建命令;请在 Google Ads UI 操作。运营诊断(只读)见 `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 运营/诊断;**创建**见 `assets/pmax-create-template.md` |
67
- | `references/pmax-api.md` | PMax 网关路径与 Search API 边界 |
66
+ | `google-ads-rules/google-ads-pmax-guide.md` | PMax 运营/诊断(只读参考;**CLI 搭建暂未开放**) |
67
+ | `references/pmax-api.md` | PMax 网关路径(开发参考;生产勿调用搭建命令) |
68
68
 
69
69
  复述给用户:**3–5 条**与本次任务相关的合规/策略要点即可,无需罗列全部文件名。
70
70
 
@@ -31,6 +31,10 @@
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
+
34
38
  > **与 Search 隔离**:勿用 `campaign-create` 或 `campaign-create-template.json`。网关摘录见 `references/pmax-api.md`。
35
39
 
36
40
  | 步骤 | 命令 |
@@ -1,5 +1,7 @@
1
1
  # Performance Max 网关 API(CLI 对照)
2
2
 
3
+ > **⛔ 暂未开放(生产)**:PMax CLI 搭建/写入仍在测试。Skill 路由已屏蔽;CLI 默认拒绝 `pmax-create` 等写入命令。请在 Google Ads UI 操作,或本地设 `SILUZAN_PMAX_SETUP=1` 联调。
4
+ >
3
5
  > 完整契约:Sammamish `src/GoogleAPI/docs/pmax-frontend-api.md`
4
6
 
5
7
  ---
@@ -1,6 +1,6 @@
1
1
  # rag:知识库检索(TSO 广告投放辅助)
2
2
 
3
- 知识库管理页面在 https://www-ci.siluzan.com/knowledge-base/
3
+ 知识库管理页面在 https://www.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-ci.siluzan.com
217
+ # webUrl: https://www.siluzan.com
218
218
 
219
219
  # 第三步:拼接链接(Google 日报)
220
- # https://www-ci.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
220
+ # https://www.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@beta
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-ci.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
67
+ API Key 获取入口:`https://www.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-ci.siluzan.com
133
- googleApiUrl : https://googleapi-ci.mysiluzan.com
134
- webUrl : https://www-ci.siluzan.com
132
+ apiBaseUrl : https://tso-api.siluzan.com
133
+ googleApiUrl : https://googleapi.mysiluzan.com
134
+ webUrl : https://www.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-ci.siluzan.com/v3/foreign_trade/tso/home`
9
+ 首页地址:`https://www.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-beta.6'
12
+ $PKG_VERSION = '1.1.21'
13
13
  $CLI_BIN = 'siluzan-tso'
14
14
  $SKILL_LABEL = 'Siluzan TSO'
15
- $INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
16
- $WEB_BASE = 'https://www-ci.siluzan.com'
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.21-beta.6"
12
+ readonly PKG_VERSION="1.1.21"
13
13
  readonly CLI_BIN="siluzan-tso"
14
14
  readonly SKILL_LABEL="Siluzan TSO"
15
- readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
16
- readonly WEB_BASE="https://www-ci.siluzan.com"
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-tso-cli",
3
- "version": "1.1.21-beta.6",
3
+ "version": "1.1.21",
4
4
  "description": "Siluzan 广告账户管理 CLI — 查询账户、余额、消耗数据,管理绑定关系与充值。",
5
5
  "keywords": [
6
6
  "ad-account",