siluzan-tso-cli 1.1.26 → 1.1.27-beta.1

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.27-beta.1),供内部测试使用。正式发布后安装命令将改为 `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
 
@@ -121637,15 +121637,34 @@ async function runWebsiteDiagnosisCollect(opts) {
121637
121637
  }
121638
121638
 
121639
121639
  // src/commands/website-diagnosis/render-report.ts
121640
- import fs12 from "fs/promises";
121640
+ import fs12 from "fs";
121641
+ import fsPromises from "fs/promises";
121641
121642
  import path17 from "path";
121642
121643
  import { fileURLToPath as fileURLToPath4 } from "url";
121643
- function websiteDiagnosisReportTemplatePath() {
121644
+ var TEMPLATE_BASENAMES = {
121645
+ html: "website-diagnosis-report.html",
121646
+ runtime: "website-diagnosis-report.runtime.js"
121647
+ };
121648
+ function resolveSkillTemplatePath(basename11) {
121644
121649
  const dir = path17.dirname(fileURLToPath4(import.meta.url));
121645
- return path17.join(dir, "skill", "siluzan-ads", "report-templates", "website-diagnosis-report.html");
121650
+ const candidates = [
121651
+ path17.join(dir, "skill", "report-templates", basename11),
121652
+ path17.join(dir, "skill", "siluzan-ads", "report-templates", basename11),
121653
+ path17.join(dir, "..", "..", "assets", "siluzan-ads", "report-templates", basename11)
121654
+ ];
121655
+ for (const p of candidates) {
121656
+ if (fs12.existsSync(p)) return p;
121657
+ }
121658
+ return candidates[0];
121659
+ }
121660
+ function websiteDiagnosisReportTemplatePath() {
121661
+ return resolveSkillTemplatePath(TEMPLATE_BASENAMES.html);
121662
+ }
121663
+ function websiteDiagnosisRuntimePath() {
121664
+ return resolveSkillTemplatePath(TEMPLATE_BASENAMES.runtime);
121646
121665
  }
121647
121666
  function readJsonFile(filePath) {
121648
- const raw = fs12.readFile(filePath, "utf8");
121667
+ const raw = fsPromises.readFile(filePath, "utf8");
121649
121668
  return raw.then((text) => {
121650
121669
  try {
121651
121670
  return JSON.parse(text);
@@ -121688,7 +121707,7 @@ async function runWebsiteDiagnosisRender(opts) {
121688
121707
  const templatePath = websiteDiagnosisReportTemplatePath();
121689
121708
  let html;
121690
121709
  try {
121691
- html = await fs12.readFile(templatePath, "utf8");
121710
+ html = await fsPromises.readFile(templatePath, "utf8");
121692
121711
  } catch {
121693
121712
  console.error(`
121694
121713
  \u274C \u672A\u627E\u5230\u62A5\u544A\u6A21\u677F\uFF1A${templatePath}
@@ -121699,12 +121718,26 @@ async function runWebsiteDiagnosisRender(opts) {
121699
121718
  const outPath = path17.resolve(
121700
121719
  opts.out ?? path17.join(path17.dirname(dataPath), "website-diagnosis-report.html")
121701
121720
  );
121702
- await fs12.mkdir(path17.dirname(outPath), { recursive: true });
121703
- await fs12.writeFile(outPath, injectReportData(html, data), "utf8");
121721
+ const outDir = path17.dirname(outPath);
121722
+ await fsPromises.mkdir(outDir, { recursive: true });
121723
+ await fsPromises.writeFile(outPath, injectReportData(html, data), "utf8");
121724
+ const runtimeSrc = websiteDiagnosisRuntimePath();
121725
+ const runtimeOut = path17.join(outDir, TEMPLATE_BASENAMES.runtime);
121726
+ try {
121727
+ await fsPromises.copyFile(runtimeSrc, runtimeOut);
121728
+ } catch {
121729
+ console.error(`
121730
+ \u274C \u672A\u627E\u5230\u62A5\u544A\u8FD0\u884C\u65F6\uFF1A${runtimeSrc}
121731
+ \u8BF7\u5148\u6267\u884C npm run build
121732
+ `);
121733
+ process.exit(1);
121734
+ }
121704
121735
  console.log(`
121705
121736
  \u2705 \u7F51\u7AD9\u8BCA\u65AD HTML \u62A5\u544A\u5DF2\u751F\u6210\uFF1A${outPath}
121706
121737
  `);
121707
- console.log("\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u8BE5\u6587\u4EF6\u5373\u53EF\u67E5\u770B\u56FE\u8868\u4E0E\u5B8C\u6574\u7AE0\u8282\u3002\n");
121738
+ console.log(` \u8FD0\u884C\u65F6\u811A\u672C\uFF1A${runtimeOut}
121739
+ `);
121740
+ console.log("\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 HTML \u6587\u4EF6\u5373\u53EF\u67E5\u770B\u56FE\u8868\u4E0E\u5B8C\u6574\u7AE0\u8282\uFF08\u9700\u8054\u7F51\u52A0\u8F7D ECharts CDN\uFF09\u3002\n");
121708
121741
  }
121709
121742
 
121710
121743
  // src/commands/website-diagnosis/register.ts
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: siluzan-tso
3
- description: Operates Siluzan TSO ad accounts via siluzan-tso-cli Google/Bing/Yandex/TikTok/Kwai/Meta account management, Google Ads CRUD and PMax, analytics, optimization reports, forewarning, leads, invoicing, and RAG knowledge lookup. Use when the user mentions ad accounts, balance, spend, campaigns, keywords, open account, MCC/BC binding, or TSO reporting. On each new user task or topic switch, re-read routed references per references/core/agent-conventions.md do not reuse prior task memory.
3
+ description: Operates Siluzan TSO ad accounts via siluzan-tso-cli (Google/Bing/Yandex/TikTok/Kwai/MetaAd). Tasks: (accounts) list, balance, stats, spend, active-bills, history, balance-scan P2, accounts-digest P3, share/unshare, delink, OAuth, MCC/BC/BM bind-unbind, email invite, TikTok close, suspend withdraw; (open-account) apply on 6 media; (Google Ads) campaign/adgroup/ad/keyword CRUD, extensions, geo, PMax, search campaign-plan validate/create, batch async create; (analytics) google-analysis, google-analysis-batch P5, facebook-analysis P4-FB, website-diagnosis P8, ads diagnosis; (reports) P1 profile, P4 period, P6 OKKI weekly, P7 inquiry; (tools) keyword suggest, RAG query, TSO report list/create/push, AI optimize records, forewarning rules, TikTok/Meta leads, transfer/invoice/invoice-info, audit restore. Use when user mentions ad accounts, balance, spend, campaigns, keywords, open account, MCC/BC, reports, diagnosis, invoicing, or TSO. Re-read references/core/agent-conventions.md each new task.
4
4
  license: MIT
5
5
  compatibility: Requires Node.js 18+, siluzan-tso-cli installed, authenticated via send-login-code + login or config set
6
6
  metadata:
@@ -87,7 +87,7 @@ Windows:部分 Agent 通过 PowerShell 代执行时可能失败,改在 [Git
87
87
  | 账户列表 / 余额 / 消耗 / 分享 / MCC / 多账户汇总 | `accounts/accounts.md`;金额加 `accounts/currency.md` |
88
88
  | 拉数 / 报告 / 周报 / `google-analysis` | `analytics/account-analytics.md` + `core/tips.md` + **`core/deliverable-preflight.md`**;多账户加 `analytics/google-analysis-batch.md` |
89
89
  | Meta/Facebook 周期或诊断报告 / `facebook-analysis` | `analytics/facebook-analysis-guide.md` + `report-templates/meta-period-report.md`(或 `meta-account-diagnosis-report.md`)+ `core/playbooks.md` P4-FB |
90
- | 网站诊断 / 落地页评分 / `website-diagnosis` | `analytics/website-diagnosis-guide.md` + `assets/website-diagnosis-rules.md` + `report-templates/website-diagnosis-report.md`(**终稿 HTML**)+ `core/playbooks.md` P8 |
90
+ | 网站诊断 / 落地页评分 / `website-diagnosis` | `analytics/website-diagnosis-guide.md` + `assets/website-diagnosis-rules.md` + `core/playbooks.md` P8;Agent 只写 JSON,`website-diagnosis render` 出 HTML |
91
91
  | Google 新建搜索系列 | `google-ads/google-ads-campaign-plan.md` |
92
92
  | Google 广告 CRUD / 拒审 | `google-ads/google-ads.md` |
93
93
  | PMax | `assets/pmax-create-template.md` + `google-ads/pmax-api.md` |
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "slug": "siluzan-tso",
3
- "version": "1.1.26",
4
- "publishedAt": 1780540766602
3
+ "version": "1.1.27-beta.1",
4
+ "publishedAt": 1780630877715
5
5
  }
@@ -257,7 +257,7 @@ siluzan-tso account-history --start 2026-03-01 --end 2026-03-31 --json-out ./sna
257
257
  | 状态 | 含义 | 下一步操作 |
258
258
  | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
259
259
  | `Pending` | 审核中 | 等待,可反复运行此命令轮询;审核周期因媒体而异 |
260
- | `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Kwai、Yandex 当前没有对应充值界面) |
260
+ | `Approved` | 审核通过 | 运行 `list-accounts -m <媒体>` 确认账户已出现;引导用户充值激活(`config show` 取 `webUrl`,按 `finance.md` 打开对应媒体充值页;例如 Google 为 `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google`;Kwai、Yandex 当前没有对应充值界面) |
261
261
  | `Rejected` | 被拒 | 查看 `--json-out` 落盘中的 `reason` 字段了解拒绝原因;修改资料后重新提交;若原因不明,引导用户联系丝路赞客服 |
262
262
 
263
263
  ---
@@ -810,7 +810,7 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
810
810
 
811
811
  | 功能 | 媒体 | 网页路径 |
812
812
  | --------------------------------------- | ------ | ---------------------------------------------- |
813
- | **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
813
+ | **账户激活**(邀请他人激活 / 充值激活) | Google | `https://www-ci.siluzan.com/v3/foreign_trade/tso/manageAccounts` |
814
814
 
815
815
  **Agent 建议话术**:
816
816
 
@@ -819,5 +819,5 @@ siluzan-tso account email-deauth -c <mediaCustomerId> --invitation-id <id> --res
819
819
  siluzan-tso config show # 查看 webUrl 字段
820
820
 
821
821
  # 账户激活(Google)→ 引导至账户管理页
822
- # https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts
822
+ # https://www-ci.siluzan.com/v3/foreign_trade/tso/manageAccounts
823
823
  ```
@@ -121,10 +121,10 @@ siluzan-tso config show
121
121
 
122
122
  | 媒体 | `mediaType` 参数 | 传统充值/现金充值链接 |
123
123
  | ---- | ---------------- | ------------ |
124
- | Google | `Google` | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google` |
125
- | TikTok | `TikTok` | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=TikTok` |
126
- | Meta / Facebook | `MetaAd` | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MetaAd` |
127
- | Microsoft / Bing | `MicrosoftAd` | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MicrosoftAd` |
124
+ | Google | `Google` | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google` |
125
+ | TikTok | `TikTok` | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=TikTok` |
126
+ | Meta / Facebook | `MetaAd` | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MetaAd` |
127
+ | Microsoft / Bing | `MicrosoftAd` | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MicrosoftAd` |
128
128
 
129
129
  > Yandex、Kwai 当前没有传统充值/现金充值界面;用户询问这些媒体充值时,不要拼接充值页链接,应说明当前网页不提供对应充值入口,并建议联系丝路赞客服或业务负责人确认处理方式。
130
130
 
@@ -132,8 +132,8 @@ siluzan-tso config show
132
132
 
133
133
  | 媒体 | 批量充值链接 |
134
134
  | ---- | ------------ |
135
- | Google | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=Google` |
136
- | TikTok | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=TikTok` |
135
+ | Google | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=Google` |
136
+ | TikTok | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=TikTok` |
137
137
 
138
138
  > Meta、Microsoft/Bing、Yandex、Kwai 当前不要引导到批量充值页。
139
139
 
@@ -141,10 +141,10 @@ siluzan-tso config show
141
141
 
142
142
  | 媒体 | 月结充值链接 |
143
143
  | ---- | ------------ |
144
- | Google | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=Google` |
145
- | TikTok | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=TikTok` |
146
- | Meta / Facebook | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MetaAd` |
147
- | Microsoft / Bing | `https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MicrosoftAd` |
144
+ | Google | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=Google` |
145
+ | TikTok | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=TikTok` |
146
+ | Meta / Facebook | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MetaAd` |
147
+ | Microsoft / Bing | `https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MicrosoftAd` |
148
148
 
149
149
  > Yandex、Kwai 当前不要引导到月结充值页。
150
150
 
@@ -155,17 +155,17 @@ siluzan-tso config show
155
155
  ```
156
156
  需要进行充值,请访问丝路赞平台对应页面完成操作:
157
157
 
158
- - Google 充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
159
- - TikTok 充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=TikTok
160
- - Meta 充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MetaAd
161
- - Microsoft/Bing 充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MicrosoftAd
162
- - Google 批量充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=Google
163
- - TikTok 批量充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=TikTok
164
- - Google 月结充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=Google
165
- - TikTok 月结充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=TikTok
166
- - Meta 月结充值: https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MetaAd
167
- - Microsoft/Bing 月结充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MicrosoftAd
168
- - 丝路赞钱包: https://www.siluzan.com/v3/foreign_trade/tso/recharge/siluzanWallet
158
+ - Google 充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
159
+ - TikTok 充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=TikTok
160
+ - Meta 充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MetaAd
161
+ - Microsoft/Bing 充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MicrosoftAd
162
+ - Google 批量充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=Google
163
+ - TikTok 批量充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=TikTok
164
+ - Google 月结充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=Google
165
+ - TikTok 月结充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=TikTok
166
+ - Meta 月结充值: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MetaAd
167
+ - Microsoft/Bing 月结充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MicrosoftAd
168
+ - 丝路赞钱包: https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/siluzanWallet
169
169
 
170
170
  Yandex、Kwai 当前没有传统充值/现金充值和月结充值界面,需联系丝路赞客服或业务负责人确认处理方式。
171
171
  批量充值当前仅支持 Google 和 TikTok;Meta、Microsoft/Bing、Yandex、Kwai 不要引导到批量充值页。
@@ -174,17 +174,17 @@ Yandex、Kwai 当前没有传统充值/现金充值和月结充值界面,需
174
174
  **示例:**
175
175
 
176
176
  ```
177
- - Google 充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
178
- - TikTok 充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=TikTok
179
- - Meta 充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MetaAd
180
- - Microsoft/Bing 充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MicrosoftAd
181
- - Google 批量充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=Google
182
- - TikTok 批量充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=TikTok
183
- - Google 月结充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=Google
184
- - TikTok 月结充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=TikTok
185
- - Meta 月结充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MetaAd
186
- - Microsoft/Bing 月结充值:https://www.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MicrosoftAd
187
- - 丝路赞钱包:https://www.siluzan.com/v3/foreign_trade/tso/recharge/siluzanWallet
177
+ - Google 充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
178
+ - TikTok 充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=TikTok
179
+ - Meta 充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MetaAd
180
+ - Microsoft/Bing 充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=MicrosoftAd
181
+ - Google 批量充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=Google
182
+ - TikTok 批量充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay_batch?mediaType=TikTok
183
+ - Google 月结充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=Google
184
+ - TikTok 月结充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=TikTok
185
+ - Meta 月结充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MetaAd
186
+ - Microsoft/Bing 月结充值:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/accountBillingQuota?mediaType=MicrosoftAd
187
+ - 丝路赞钱包:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/siluzanWallet
188
188
  ```
189
189
 
190
190
  ---
@@ -60,7 +60,7 @@ siluzan-tso open-account google-wizard
60
60
 
61
61
  ```bash
62
62
  siluzan-tso account-history -m Google
63
- # 审核通过后:config show → https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
63
+ # 审核通过后:config show → https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
64
64
  ```
65
65
 
66
66
  ---
@@ -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
 
@@ -192,9 +192,9 @@ siluzan-tso report push receive-emails -m Google [--json-out ./snap]
192
192
 
193
193
  | 媒体 | 报告类型 | URL 模板 |
194
194
  | ------ | ---------------- | -------------------------------------------------------- |
195
- | Google | 日报(Daily) | `https://www.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
196
- | Google | 小时报(Hourly) | `https://www.siluzan.com/media-report/hour/{entityId}?culture=zh-CN` |
197
- | TikTok | 日报 | `https://www.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
195
+ | Google | 日报(Daily) | `https://www-ci.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
196
+ | Google | 小时报(Hourly) | `https://www-ci.siluzan.com/media-report/hour/{entityId}?culture=zh-CN` |
197
+ | TikTok | 日报 | `https://www-ci.siluzan.com/media-report/publish/{entityId}?culture=zh-CN` |
198
198
 
199
199
  `entityId` 来自 `siluzan-tso report list --json-out ./snap` 中每条记录的 `entityId` 字段。
200
200
 
@@ -207,8 +207,8 @@ siluzan-tso report list -m Google --json-out ./snap
207
207
 
208
208
  # 第二步:查看 webUrl
209
209
  siluzan-tso config show
210
- # webUrl: https://www.siluzan.com
210
+ # webUrl: https://www-ci.siluzan.com
211
211
 
212
212
  # 第三步:拼接链接(Google 日报)
213
- # https://www.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
213
+ # https://www-ci.siluzan.com/media-report/publish/rpt_abc123?culture=zh-CN
214
214
  ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 对齐 Aiagent-Server `agent/tso_agent`:`getWebsiteDiagnosisData`(`website_diagnosis_tools.py` + `data/website_guide.py`)。
4
4
  > **CLI 负责拉数**;**6 模块 × 29 子项评分**由 Agent 按规则 + 采集数据生成 JSON。
5
- > **最终交付**:与线上一致,为**一份可浏览器打开、含 ECharts 图表的单文件 HTML 报告**(雷达图、模块得分条形图、Lighthouse 对比图等)。TSO 网页由 Vue `WebsiteAnalysisReport/v3` 渲染;Skill/CLI 场景用 `website-diagnosis render` 或按 `report-templates/website-diagnosis-report.html` 注入 JSON。
5
+ > **最终交付**:与线上一致,为**一份可浏览器打开、含 ECharts 图表的单文件 HTML 报告**(雷达图、模块得分条形图、Lighthouse 对比图等)。TSO 网页由 Vue `WebsiteAnalysisReport/v3` 渲染;Skill/CLI 场景 **Agent 只写诊断 JSON,HTML 一律由 `website-diagnosis render` 生成**(禁止 Agent 手写 HTML)。
6
6
 
7
7
  ---
8
8
 
@@ -55,11 +55,11 @@ siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-we
55
55
  2. `website-diagnosis collect --url <url> --json-out ./snap-web`(**必须** `--json-out`)。
56
56
  3. Read `assets/website-diagnosis-rules.md`(评分规则与 JSON Schema)。
57
57
  4. 用脚本读 `writtenFiles[0]` 的 `lighthouse`、`htmlPreview`(或 `--include-html` 时的 `htmlContent`)生成结构化 `data`(见下节输出契约)。
58
- 5. 生成诊断 JSON 后执行:
58
+ 5. 将诊断 JSON 落盘为 `diagnosis.json`(脚本写文件,勿在对话里贴全文),再执行:
59
59
  ```bash
60
60
  siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-web/<collect>.json --out ./snap-web/website-diagnosis-report.html
61
61
  ```
62
- 或按 `report-templates/website-diagnosis-report.html` JSON 写入 `window.__WEBSITE_DIAGNOSIS__`。**禁止**只给 Markdown/纯 JSON 充当终稿。
62
+ **禁止** Agent 手写/拼接 HTML;**禁止**只给 Markdown 或纯 JSON 充当终稿。
63
63
  6. **禁止编造**未在采集 HTML/Lighthouse 中出现的指标。Lighthouse 缺失时须在 HTML 中醒目说明。
64
64
 
65
65
  **在 TSO Copilot 网页内**:工具返回 `rendered: true` 时,前端已渲染卡片 +「查看详情」全页 HTML,Agent 只需简短确认,**勿重复贴报告正文**(见 tso_agent `prompt.py`)。
@@ -0,0 +1,140 @@
1
+ <!-- 本文件由 `pnpm --filter siluzan-tso-cli run gen:cli-enums` 自动生成,勿手改。源码:src/cli-enums/registry.ts -->
2
+
3
+ # CLI 枚举速查
4
+
5
+ > **Agent**:不确定 `--sections`、`-m`、`--operator` 等合法值时,**Read 本文件**(按章节)或执行:
6
+ > `siluzan-tso reference enums`(Markdown) / `siluzan-tso reference enums --json`(机器可读)。
7
+ > 各功能 reference 只保留业务说明;枚举与 CLI 校验**以此文件为准**(与源码同源)。
8
+
9
+ ### 媒体类型 `-m` / `--media`(多数命令)
10
+
11
+ | 命令 | 选项 | 合法值 |
12
+ | ---- | ---- | ------ |
13
+ | list-accounts, stats, balance, account-history, open-account, transfer, … | -m, --media | Google \| TikTok \| Yandex \| MetaAd \| BingV2 \| Kwai |
14
+
15
+
16
+ > 区分大小写;Meta 广告账户用 MetaAd,不是 Facebook。
17
+
18
+ ### 媒体类型(仅 forewarning)
19
+
20
+ | 命令 | 选项 | 合法值 |
21
+ | ---- | ---- | ------ |
22
+ | forewarning list, create, records, … | -m, --media | Google \| TikTok |
23
+
24
+
25
+ ### `google-analysis --sections` 维度(25)
26
+
27
+ | 命令 | 选项 | 合法值 |
28
+ | ---- | ---- | ------ |
29
+ | google-analysis, google-analysis-batch run | --sections | overview \| keywords \| search-terms \| campaigns \| campaign-hour \| ads \| extensions \| devices \| geographic \| geo-matched \| campaign-geo \| campaign-geo-matched \| campaign-device \| audience \| asset-images \| videos \| materials \| resource-counts \| conversion-actions \| daily-metrics \| gold-account \| ads-index \| final-urls \| dimension-summary \| campaign-types |
30
+
31
+
32
+ > 逗号分隔;省略=全部。`final-urls`、`campaign-types` 不传日期。
33
+
34
+ ### `google-analysis --level`(extensions 维度)
35
+
36
+ | 命令 | 选项 | 合法值 |
37
+ | ---- | ---- | ------ |
38
+ | google-analysis --sections extensions | --level | Account \| Campaign \| Ad Group |
39
+
40
+
41
+ ### `google-analysis --audience-type`(audience 维度)
42
+
43
+ | 命令 | 选项 | 合法值 |
44
+ | ---- | ---- | ------ |
45
+ | google-analysis --sections audience | --audience-type | SystemDefined \| UserDefined |
46
+
47
+
48
+ ### `facebook-analysis --sections` 维度(7)
49
+
50
+ | 命令 | 选项 | 合法值 |
51
+ | ---- | ---- | ------ |
52
+ | facebook-analysis | --sections | overview \| ad-sets \| platform \| country \| audience \| creative \| material |
53
+
54
+
55
+ > 默认周期报告:overview,ad-sets,platform,country,audience,creative。
56
+
57
+ ### `facebook-analysis --sections` Google 别名
58
+
59
+ | 命令 | 选项 | 合法值 |
60
+ | ---- | ---- | ------ |
61
+ | facebook-analysis | --sections(别名) | — |
62
+
63
+
64
+ > 解析后映射到左侧 canonical 名。
65
+
66
+ **别名**:`campaigns` → `ad-sets`;`ad-groups` → `ad-sets`;`geographic` → `country`;`geo` → `country`;`devices` → `platform`;`network` → `platform`;`networks` → `platform`;`ads` → `creative`;`materials` → `material`;`asset-images` → `material`;`videos` → `material`
67
+
68
+ ### `ad extension * --level`
69
+
70
+ | 命令 | 选项 | 合法值 |
71
+ | ---- | ---- | ------ |
72
+ | ad extension sitelink, callout, snippet, … | --level | Account \| Campaign \| AdGroup |
73
+
74
+
75
+ ### 搜索系列 `BiddingStrategyTypeV2`
76
+
77
+ | 命令 | 选项 | 合法值 |
78
+ | ---- | ---- | ------ |
79
+ | ad campaign-create, campaign-validate(config JSON) | campaign.BiddingStrategyTypeV2 | TARGET_SPEND \| MANUAL_CPC \| TARGET_CPA \| TARGET_ROAS \| MAXIMIZE_CONVERSIONS \| MAXIMIZE_CONVERSION_VALUE |
80
+
81
+
82
+ ### 系列 `ChannelTypeV2`
83
+
84
+ | 命令 | 选项 | 合法值 |
85
+ | ---- | ---- | ------ |
86
+ | ad campaign-create, campaign-validate | campaign.ChannelTypeV2 | SEARCH \| DISPLAY \| VIDEO \| SHOPPING \| MULTI_CHANNEL |
87
+
88
+
89
+ ### 系列 `StatusV2`
90
+
91
+ | 命令 | 选项 | 合法值 |
92
+ | ---- | ---- | ------ |
93
+ | ad campaign-create, campaign-validate | campaign.StatusV2 | Enabled \| Paused |
94
+
95
+
96
+ ### 预算投放 `BudgetBudgetDeliveryMethodV2`
97
+
98
+ | 命令 | 选项 | 合法值 |
99
+ | ---- | ---- | ------ |
100
+ | ad campaign-create, campaign-validate | campaign.BudgetBudgetDeliveryMethodV2 | STANDARD \| ACCELERATED \| UNSPECIFIED \| UNKNOWN |
101
+
102
+
103
+ ### PMax `BiddingStrategyTypeV2`
104
+
105
+ | 命令 | 选项 | 合法值 |
106
+ | ---- | ---- | ------ |
107
+ | ad pmax-create, pmax-validate | campaign.BiddingStrategyTypeV2 | MAXIMIZE_CONVERSIONS \| MAXIMIZE_CONVERSION_VALUE \| TARGET_CPA \| TARGET_ROAS |
108
+
109
+
110
+ ### 预警比较运算符
111
+
112
+ | 命令 | 选项 | 合法值 |
113
+ | ---- | ---- | ------ |
114
+ | forewarning create | --operator | GREATER_EQUALS \| GREATER \| LESS_EQUALS \| LESS \| EQUALS |
115
+
116
+
117
+ ### 开户历史状态筛选
118
+
119
+ | 命令 | 选项 | 合法值 |
120
+ | ---- | ---- | ------ |
121
+ | account-history | --status(mediaAccountState) | Created \| Approved \| Denied \| Inactive |
122
+
123
+
124
+ > Google 默认含 Inactive;其他媒体默认 Created,Approved,Denied。
125
+
126
+ ### 线索表单媒体
127
+
128
+ | 命令 | 选项 | 合法值 |
129
+ | ---- | ---- | ------ |
130
+ | clue | -m, --media | TikTok \| Meta |
131
+
132
+
133
+ ### 网站诊断模块 status
134
+
135
+ | 命令 | 选项 | 合法值 |
136
+ | ---- | ---- | ------ |
137
+ | website-diagnosis collect(响应字段) | modules[].status | Excellent \| Good \| Normal \| Poor \| Full \| NeedImprove \| Absent |
138
+
139
+
140
+ > 撰写报告时转中文展示;细则见 assets/website-diagnosis-rules.md。
@@ -184,7 +184,11 @@ siluzan-tso accounts-digest -m Google -a id1,id2,... --start <S> --end <D> --jso
184
184
  ```
185
185
 
186
186
  3. Read `assets/website-diagnosis-rules.md`;按 outline → JSON 读 `lighthouse` / `htmlPreview`。
187
- 4. 生成与 tso_agent `getWebsiteDiagnosisData` 同结构的 `data`(6 模块、29 子项、`ratingId`、`coreIssuesIds`)。
188
- 5. 执行 `website-diagnosis render --data <diagnosis.json> --collect <collect.json>` 生成 **带图表的** `website-diagnosis-report.html`(模板见 `report-templates/website-diagnosis-report.html`);勿只交付 Markdown。
187
+ 4. 用脚本将诊断结果落盘为 `diagnosis.json`(与 tso_agent `getWebsiteDiagnosisData` 同结构:6 模块、29 子项、`ratingId`、`coreIssuesIds`;可含 `lighthouseResult`、`analyzedAt`)。
188
+ 5. **只调 CLI HTML**(禁止 Agent 手写 HTML):
189
+ ```bash
190
+ siluzan-tso website-diagnosis render --data ./diagnosis.json --collect ./snap-web/<collect>.json --out ./snap-web/website-diagnosis-report.html
191
+ ```
192
+ 向用户交付该 HTML 路径;勿只交付 Markdown 或 JSON。
189
193
  6. Lighthouse 缺失时在 HTML 中说明;Copilot 网页场景若已 `rendered: true` 则勿重复输出报告正文。
190
194
  7. 若用户仅需历史 ARIT 分:`list-accounts` 或 `website-diagnosis search --ids <websiteDiagnoseId>`。
@@ -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
 
@@ -53,7 +53,7 @@ siluzan-tso/ # 安装后目录名
53
53
 
54
54
  - 从 SKILL.md **只链接一层**(`references/foo.md`),避免 A→B→C 链式引用。
55
55
  - 路径用正斜杠,不用 Windows 反斜杠。
56
- - 占位符 `https://www.siluzan.com`、`https://tso-api.siluzan.com`、`npm install -g siluzan-tso-cli` 由构建脚本替换,文档中禁止硬编码环境 URL。
56
+ - 占位符 `https://www-ci.siluzan.com`、`https://tso-api-ci.siluzan.com`、`npm install -g siluzan-tso-cli@beta` 由构建脚本替换,文档中禁止硬编码环境 URL。
57
57
 
58
58
  ---
59
59
 
@@ -70,7 +70,7 @@ siluzan-tso account-history -m Google
70
70
  siluzan-tso list-accounts -m Google
71
71
 
72
72
  # 第四步:充值激活(必须网页完成)
73
- # siluzan-tso config show 取 webUrl,打开:https://www.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
73
+ # siluzan-tso config show 取 webUrl,打开:https://www-ci.siluzan.com/v3/foreign_trade/tso/recharge/pay?mediaType=Google
74
74
  # 美元账户最低约 100 USD,人民币账户约 700 CNY
75
75
  ```
76
76
 
@@ -790,7 +790,7 @@ siluzan-tso balance -m Google -a <mediaCustomerId>
790
790
  siluzan-tso config show # 取 webUrl
791
791
 
792
792
  # 诊断入口(网页 AICreation 向导内嵌):
793
- # https://www.siluzan.com/v3/foreign_trade/tso/advertising/AICreation
793
+ # https://www-ci.siluzan.com/v3/foreign_trade/tso/advertising/AICreation
794
794
  # → 输入推广链接时,系统会自动触发网站诊断
795
795
  ```
796
796
 
@@ -851,7 +851,7 @@ siluzan-tso account bm-bind \
851
851
  --bm-id <businessManagerId>
852
852
 
853
853
  # 第三步:确认绑定状态(在网页确认)
854
- # https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts → 找到对应账户查看 BM 状态
854
+ # https://www-ci.siluzan.com/v3/foreign_trade/tso/manageAccounts → 找到对应账户查看 BM 状态
855
855
  ```
856
856
 
857
857
  ### 场景 C:TikTok BC 绑定 / 解绑
@@ -875,7 +875,7 @@ siluzan-tso account bc-unbind --customers <mediaCustomerId> --bc-id <bcId>
875
875
  siluzan-tso config show # 取 webUrl
876
876
 
877
877
  # 打开账户管理页:
878
- # https://www.siluzan.com/v3/foreign_trade/tso/manageAccounts
878
+ # https://www-ci.siluzan.com/v3/foreign_trade/tso/manageAccounts
879
879
  # → 选中 Google 账户 → 点击「激活账户」→ 选择激活方式
880
880
  ```
881
881
 
@@ -6,7 +6,7 @@
6
6
  siluzan-tso config show # 取 webUrl
7
7
  ```
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
  ---
12
12
 
@@ -25,7 +25,7 @@ siluzan-tso config show # 取 webUrl
25
25
 
26
26
  ## 推荐话术
27
27
 
28
- 1. **「和首页一样的总览」** → 打开 `https://www.siluzan.com/v3/foreign_trade/tso/home`。
28
+ 1. **「和首页一样的总览」** → 打开 `https://www-ci.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