siluzan-tso-cli 1.1.29-beta.5 → 1.1.29-beta.7
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 -1
- package/dist/index.js +108 -4
- package/dist/skill/AGENTS.md +29 -30
- package/dist/skill/SKILL.md +9 -26
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/README.md +59 -61
- package/dist/skill/references/accounts/accounts.md +73 -107
- package/dist/skill/references/accounts/finance.md +23 -79
- package/dist/skill/references/accounts/open-account-by-media.md +4 -2
- package/dist/skill/references/analytics/account-analytics.md +94 -103
- package/dist/skill/references/core/agent-conventions.md +100 -107
- package/dist/skill/references/core/cli-enums.md +8 -0
- package/dist/skill/references/core/playbooks.md +39 -40
- package/dist/skill/references/core/tips.md +18 -61
- package/dist/skill/references/core/workflows.md +24 -25
- package/dist/skill/report-templates/REPORT-WORKFLOW.md +13 -13
- package/dist/skill/report-templates/google-period-report-excel.md +24 -24
- package/dist/skill/scripts/install.ps1 +1 -1
- package/dist/skill/scripts/install.sh +1 -1
- package/package.json +1 -1
- package/dist/skill/references/core/deliverable-preflight.md +0 -109
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
|
|
|
51
51
|
siluzan-tso init --force # 强制覆盖已存在文件
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
> **注意**:当前为测试版(1.1.29-beta.
|
|
54
|
+
> **注意**:当前为测试版(1.1.29-beta.7),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
55
|
|
|
56
56
|
| 助手 | 建议 `--ai` |
|
|
57
57
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -2338,6 +2338,18 @@ function decodeJwtClaims(token) {
|
|
|
2338
2338
|
function decodeJwtSub(token) {
|
|
2339
2339
|
return decodeJwtClaims(token)?.sub ?? null;
|
|
2340
2340
|
}
|
|
2341
|
+
function sleep(ms) {
|
|
2342
|
+
return new Promise((resolve32) => setTimeout(resolve32, ms));
|
|
2343
|
+
}
|
|
2344
|
+
async function pollUntil(fn, intervalMs, timeoutMs) {
|
|
2345
|
+
const deadline = Date.now() + timeoutMs;
|
|
2346
|
+
while (Date.now() < deadline) {
|
|
2347
|
+
const result = await fn();
|
|
2348
|
+
if (result !== null) return result;
|
|
2349
|
+
await sleep(intervalMs);
|
|
2350
|
+
}
|
|
2351
|
+
return null;
|
|
2352
|
+
}
|
|
2341
2353
|
function getCurrentVersion(importMetaUrl) {
|
|
2342
2354
|
try {
|
|
2343
2355
|
const __dirname3 = path2.dirname(fileURLToPath(importMetaUrl));
|
|
@@ -121345,6 +121357,35 @@ BingV2 \u884C\u4E1A\u5217\u8868\uFF08\u7B2C 1 \u9875\uFF0C\u672C\u9875 ${list.le
|
|
|
121345
121357
|
init_auth();
|
|
121346
121358
|
import * as fs10 from "fs";
|
|
121347
121359
|
import * as path15 from "path";
|
|
121360
|
+
|
|
121361
|
+
// src/commands/open-account/kwai-licence-id-type.ts
|
|
121362
|
+
var KWAI_LICENCE_ID_TYPE_LABELS = {
|
|
121363
|
+
"1": "\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801 / Business license Uniform social credit code",
|
|
121364
|
+
"2": "DUNS / Data Universal Numbering System",
|
|
121365
|
+
"3": "CNPJ"
|
|
121366
|
+
};
|
|
121367
|
+
var VALID = new Set(Object.keys(KWAI_LICENCE_ID_TYPE_LABELS));
|
|
121368
|
+
var LEGACY_ALIASES = {
|
|
121369
|
+
ENTERPRISE: "1",
|
|
121370
|
+
INDIVIDUAL: "1"
|
|
121371
|
+
};
|
|
121372
|
+
function normalizeKwaiLicenceIdType(raw) {
|
|
121373
|
+
const trimmed = raw.trim();
|
|
121374
|
+
const upper = trimmed.toUpperCase();
|
|
121375
|
+
const legacy = LEGACY_ALIASES[upper];
|
|
121376
|
+
if (legacy) {
|
|
121377
|
+
return { value: legacy, legacyAlias: trimmed };
|
|
121378
|
+
}
|
|
121379
|
+
if (VALID.has(trimmed)) {
|
|
121380
|
+
return { value: trimmed };
|
|
121381
|
+
}
|
|
121382
|
+
const options = Object.entries(KWAI_LICENCE_ID_TYPE_LABELS).map(([k, v]) => `${k}=${v.split(" / ")[0]}`).join("\uFF1B");
|
|
121383
|
+
throw new Error(
|
|
121384
|
+
`\u65E0\u6548\u7684 --licence-id-type\uFF1A${JSON.stringify(raw)}\u3002Kwai \u987B\u4F7F\u7528\u6570\u5B57\u4EE3\u7801\uFF08\u4E0E\u7F51\u9875\u4E00\u81F4\uFF09\uFF1A${options}\u3002\u52FF\u4F7F\u7528 ENTERPRISE / INDIVIDUAL\u3002`
|
|
121385
|
+
);
|
|
121386
|
+
}
|
|
121387
|
+
|
|
121388
|
+
// src/commands/open-account/kwai.ts
|
|
121348
121389
|
async function uploadToKwai(filePath, apiBaseUrl, config, verbose) {
|
|
121349
121390
|
const ext = path15.extname(filePath).toLowerCase().replace(".", "").replace("jpg", "jpeg");
|
|
121350
121391
|
const imageType = ext || "jpeg";
|
|
@@ -121365,8 +121406,51 @@ async function uploadToKwai(filePath, apiBaseUrl, config, verbose) {
|
|
|
121365
121406
|
}
|
|
121366
121407
|
return blobstoreKey;
|
|
121367
121408
|
}
|
|
121409
|
+
async function waitForKwaiAccountInHistory(config, accountName, verbose) {
|
|
121410
|
+
return pollUntil(
|
|
121411
|
+
async () => {
|
|
121412
|
+
const params = new URLSearchParams({
|
|
121413
|
+
MediaType: "Kwai",
|
|
121414
|
+
mediaAccountState: "Created,Approved,Denied",
|
|
121415
|
+
pageNo: "1",
|
|
121416
|
+
pageSize: "5",
|
|
121417
|
+
mediaCustomerName: accountName
|
|
121418
|
+
});
|
|
121419
|
+
const res = await apiFetchWithHeaders2(
|
|
121420
|
+
`${config.apiBaseUrl}/query/media-account/?${params}`,
|
|
121421
|
+
config,
|
|
121422
|
+
{},
|
|
121423
|
+
verbose
|
|
121424
|
+
);
|
|
121425
|
+
const hits = parseInt(res.headers["s-total-hits"] ?? "0", 10);
|
|
121426
|
+
if (hits > 0 && res.data?.length) {
|
|
121427
|
+
return res.data[0] ?? null;
|
|
121428
|
+
}
|
|
121429
|
+
return null;
|
|
121430
|
+
},
|
|
121431
|
+
2e3,
|
|
121432
|
+
3e4
|
|
121433
|
+
);
|
|
121434
|
+
}
|
|
121368
121435
|
async function runOpenAccountKwai(opts) {
|
|
121369
121436
|
const config = loadConfig(opts.token);
|
|
121437
|
+
let licenceIdType;
|
|
121438
|
+
try {
|
|
121439
|
+
const normalized = normalizeKwaiLicenceIdType(opts.licenceIdType);
|
|
121440
|
+
licenceIdType = normalized.value;
|
|
121441
|
+
if (normalized.legacyAlias) {
|
|
121442
|
+
console.error(
|
|
121443
|
+
`
|
|
121444
|
+
\u26A0\uFE0F --licence-id-type ${normalized.legacyAlias} \u5DF2\u5E9F\u5F03\uFF0C\u5DF2\u81EA\u52A8\u6620\u5C04\u4E3A ${licenceIdType}\uFF08\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801\uFF09\u3002\u8BF7\u6539\u7528\u6570\u5B57\u4EE3\u7801\uFF0C\u89C1 open-account-by-media.md \xA7 Kwai\u3002
|
|
121445
|
+
`
|
|
121446
|
+
);
|
|
121447
|
+
}
|
|
121448
|
+
} catch (err) {
|
|
121449
|
+
console.error(`
|
|
121450
|
+
\u274C ${err instanceof Error ? err.message : String(err)}
|
|
121451
|
+
`);
|
|
121452
|
+
process.exit(1);
|
|
121453
|
+
}
|
|
121370
121454
|
if (!fs10.existsSync(opts.licenseFile)) {
|
|
121371
121455
|
console.error(`
|
|
121372
121456
|
\u274C \u8425\u4E1A\u6267\u7167\u6587\u4EF6\u4E0D\u5B58\u5728\uFF1A${opts.licenseFile}
|
|
@@ -121424,7 +121508,7 @@ async function runOpenAccountKwai(opts) {
|
|
|
121424
121508
|
advertisementType: opts.adType,
|
|
121425
121509
|
productUrl: opts.productUrl,
|
|
121426
121510
|
currencyCode: "USD",
|
|
121427
|
-
licenceIdType
|
|
121511
|
+
licenceIdType,
|
|
121428
121512
|
accountName: opts.accountName,
|
|
121429
121513
|
legalEntityName: opts.companyName,
|
|
121430
121514
|
newIndustryId1: opts.industryId1,
|
|
@@ -121446,14 +121530,31 @@ async function runOpenAccountKwai(opts) {
|
|
|
121446
121530
|
{ method: "POST", body: JSON.stringify(body) },
|
|
121447
121531
|
opts.verbose
|
|
121448
121532
|
);
|
|
121449
|
-
console.log("\n\u2705 Kwai \u5F00\u6237\u7533\u8BF7\u5DF2\u63D0\u4EA4\u6210\u529F\uFF0C\u8BF7\u5728\u300C\u5F00\u6237\u8BB0\u5F55\u300D\u9875\u9762\u67E5\u770B\u5BA1\u6838\u72B6\u6001\u3002\n");
|
|
121450
|
-
logAccountOpeningHistoryWebUrl(config.apiBaseUrl, "Kwai");
|
|
121451
121533
|
} catch (err) {
|
|
121452
121534
|
console.error(`
|
|
121453
121535
|
\u274C \u63D0\u4EA4\u5931\u8D25\uFF1A${err instanceof Error ? err.message : String(err)}
|
|
121454
121536
|
`);
|
|
121455
121537
|
process.exit(1);
|
|
121456
121538
|
}
|
|
121539
|
+
console.log("\n \u5DF2\u6536\u5230\u670D\u52A1\u7AEF\u53D7\u7406\uFF08HTTP 202\uFF09\uFF0C\u6B63\u5728\u786E\u8BA4\u5F00\u6237\u8BB0\u5F55\u662F\u5426\u843D\u5E93\u2026");
|
|
121540
|
+
const record = await waitForKwaiAccountInHistory(config, opts.accountName, opts.verbose);
|
|
121541
|
+
if (!record) {
|
|
121542
|
+
console.error(
|
|
121543
|
+
`
|
|
121544
|
+
\u274C \u5F00\u6237\u8BF7\u6C42\u5DF2\u53D7\u7406\uFF0C\u4F46\u5728 30 \u79D2\u5185\u672A\u5728\u300C\u5F00\u6237\u8BB0\u5F55\u300D\u4E2D\u67E5\u5230\u8D26\u6237\u300C${opts.accountName}\u300D\u3002
|
|
121545
|
+
\u5E38\u89C1\u539F\u56E0\uFF1A--licence-id-type \u975E\u6CD5\uFF08\u987B\u4E3A 1/2/3\uFF0C\u4E0E\u7F51\u9875 KwaiOpenAnAccount \u4E00\u81F4\uFF09\u3001\u884C\u4E1A ID \u65E0\u6548\u6216\u8D44\u8D28\u5B57\u6BB5\u88AB Kwai \u5F02\u6B65\u62D2\u7EDD\u3002
|
|
121546
|
+
\u8BF7\u6838\u5BF9\u53C2\u6570\u540E\u91CD\u8BD5\uFF0C\u6216\u6267\u884C\uFF1Asiluzan-tso account-history -m Kwai -k ${opts.accountName}
|
|
121547
|
+
`
|
|
121548
|
+
);
|
|
121549
|
+
process.exit(1);
|
|
121550
|
+
}
|
|
121551
|
+
const state = record.ma.mediaAccountState ?? "Unknown";
|
|
121552
|
+
console.log(
|
|
121553
|
+
`
|
|
121554
|
+
\u2705 Kwai \u5F00\u6237\u7533\u8BF7\u5DF2\u843D\u5E93\uFF08\u72B6\u6001\uFF1A${state}\uFF0C\u8D26\u6237\u540D\uFF1A${opts.accountName}\uFF09\u3002\u8BF7\u5728\u300C\u5F00\u6237\u8BB0\u5F55\u300D\u67E5\u770B\u5BA1\u6838\u8FDB\u5EA6\u3002
|
|
121555
|
+
`
|
|
121556
|
+
);
|
|
121557
|
+
logAccountOpeningHistoryWebUrl(config.apiBaseUrl, "Kwai");
|
|
121457
121558
|
}
|
|
121458
121559
|
|
|
121459
121560
|
// src/commands/open-account/google.ts
|
|
@@ -122347,7 +122448,10 @@ function register24(program2) {
|
|
|
122347
122448
|
});
|
|
122348
122449
|
}
|
|
122349
122450
|
);
|
|
122350
|
-
openAccountCmd.command("kwai").description("\u63D0\u4EA4 Kwai \u5F00\u6237\u7533\u8BF7\uFF08\u9700\u4E0A\u4F20\u8425\u4E1A\u6267\u7167\u56FE\u7247\uFF0C\u6309\u516C\u53F8\u540D\u81EA\u52A8\u521B\u5EFA/\u5173\u8054\u5E7F\u544A\u4E3B\u7EC4\uFF09").requiredOption("--licence-id <id>", "\u8425\u4E1A\u6267\u7167\u53F7\uFF08\u4E3B\u4F53\u4EE3\u7801\uFF09").requiredOption("--licence-country <code>", "\u4E3B\u4F53\u6CE8\u518C\u56FD\u5BB6\u4EE3\u7801\uFF0C\u5982 CN").requiredOption("--licence-location <address>", "\u4E3B\u4F53\u6CE8\u518C\u5730\uFF08\u7701\u5E02\u533A\u8BE6\u7EC6\u5730\u5740\uFF09").requiredOption("--business-scope <scope>", "\u8425\u4E1A\u8303\u56F4").requiredOption("--product <name>", "\u4EA7\u54C1\u6216\u54C1\u724C\u540D\u79F0").requiredOption("--ad-type <n>", "\u8D26\u6237\u7C7B\u578B\uFF1A1=\u6548\u679C\u5E7F\u544A 2=\u54C1\u724C\u5E7F\u544A", parseInt).requiredOption("--product-url <url>", "\u4EA7\u54C1\u6216\u54C1\u724C\u7F51\u5740").requiredOption(
|
|
122451
|
+
openAccountCmd.command("kwai").description("\u63D0\u4EA4 Kwai \u5F00\u6237\u7533\u8BF7\uFF08\u9700\u4E0A\u4F20\u8425\u4E1A\u6267\u7167\u56FE\u7247\uFF0C\u6309\u516C\u53F8\u540D\u81EA\u52A8\u521B\u5EFA/\u5173\u8054\u5E7F\u544A\u4E3B\u7EC4\uFF09").requiredOption("--licence-id <id>", "\u8425\u4E1A\u6267\u7167\u53F7\uFF08\u4E3B\u4F53\u4EE3\u7801\uFF09").requiredOption("--licence-country <code>", "\u4E3B\u4F53\u6CE8\u518C\u56FD\u5BB6\u4EE3\u7801\uFF0C\u5982 CN").requiredOption("--licence-location <address>", "\u4E3B\u4F53\u6CE8\u518C\u5730\uFF08\u7701\u5E02\u533A\u8BE6\u7EC6\u5730\u5740\uFF09").requiredOption("--business-scope <scope>", "\u8425\u4E1A\u8303\u56F4").requiredOption("--product <name>", "\u4EA7\u54C1\u6216\u54C1\u724C\u540D\u79F0").requiredOption("--ad-type <n>", "\u8D26\u6237\u7C7B\u578B\uFF1A1=\u6548\u679C\u5E7F\u544A 2=\u54C1\u724C\u5E7F\u544A", parseInt).requiredOption("--product-url <url>", "\u4EA7\u54C1\u6216\u54C1\u724C\u7F51\u5740").requiredOption(
|
|
122452
|
+
"--licence-id-type <code>",
|
|
122453
|
+
"\u6267\u7167/\u8BC1\u4EF6\u7C7B\u578B\uFF1A1=\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801 2=DUNS 3=CNPJ\uFF08\u4E0E\u7F51\u9875 KwaiOpenAnAccount \u4E0B\u62C9 value \u4E00\u81F4\uFF09"
|
|
122454
|
+
).requiredOption("--account-name <name>", "\u8D26\u6237\u540D\u79F0").requiredOption("--company-name <name>", "\u516C\u53F8\u4E3B\u4F53\u540D\u79F0").requiredOption("--industry-id1 <id>", "\u4E00\u7EA7\u884C\u4E1A ID").requiredOption("--industry-id2 <id>", "\u4E8C\u7EA7\u884C\u4E1A ID").requiredOption("--expire-type <n>", "\u6709\u6548\u671F\u7C7B\u578B\uFF1A1=\u6709\u9650\u671F 2=\u957F\u671F\u6709\u6548", parseInt).requiredOption("--target-country <code>", "\u6295\u653E\u5730\u533A\u56FD\u5BB6\u4EE3\u7801\uFF0C\u5982 US").requiredOption("--license-file <path>", "\u8425\u4E1A\u6267\u7167\u56FE\u7247\u672C\u5730\u8DEF\u5F84\uFF08JPG/PNG\uFF09").option("--expire-at <ms>", "\u5230\u671F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\uFF0Cexpire-type=1 \u65F6\u586B\u5199", parseInt).option("--advertiser-id <magKey>", "\u53EF\u9009\uFF1A\u624B\u52A8\u6307\u5B9A\u5E7F\u544A\u4E3B\u7EC4 magKey\uFF08\u4E00\u822C\u65E0\u9700\u586B\u5199\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
|
|
122351
122455
|
async (opts) => {
|
|
122352
122456
|
await runOpenAccountKwai({
|
|
122353
122457
|
token: opts.token,
|
package/dist/skill/AGENTS.md
CHANGED
|
@@ -14,48 +14,47 @@
|
|
|
14
14
|
|
|
15
15
|
## 文档域(gstack-style domains)
|
|
16
16
|
|
|
17
|
-
| 域
|
|
18
|
-
|
|
|
19
|
-
| **Core**
|
|
20
|
-
| **Handoff**
|
|
21
|
-
| **Accounts**
|
|
22
|
-
| **Google Ads** | `references/google-ads/`
|
|
23
|
-
| **Analytics**
|
|
24
|
-
| **Operations** | `references/operations/`
|
|
25
|
-
| **Templates**
|
|
17
|
+
| 域 | 路径 | 何时 Read |
|
|
18
|
+
| -------------- | ------------------------------ | -------------------------------------------------------------- |
|
|
19
|
+
| **Core** | `references/core/` | 纪律、安装、tips、playbooks、workflows、subagent-orchestration |
|
|
20
|
+
| **Handoff** | `snippets/` | P5/P6/P7 Task 派发模板(与 SKILL 同级) |
|
|
21
|
+
| **Accounts** | `references/accounts/` | 列表、余额、开户、财务、审计 |
|
|
22
|
+
| **Google Ads** | `references/google-ads/` | CRUD、PMax、搜索系列流水线;`rules/` 为优化 SOP |
|
|
23
|
+
| **Analytics** | `references/analytics/` | 拉数、批处理、拓词、RAG、TSO 报告 |
|
|
24
|
+
| **Operations** | `references/operations/` | 预警、线索、优化记录、宿主编排自动化 |
|
|
25
|
+
| **Templates** | `assets/`、`report-templates/` | JSON 契约、报告纲要 |
|
|
26
26
|
|
|
27
27
|
## 工作流目录
|
|
28
28
|
|
|
29
|
-
| 类别
|
|
30
|
-
|
|
|
31
|
-
| 分析 / 报告类 | `references/core/playbooks.md` | P1–P9
|
|
29
|
+
| 类别 | 文档 | 编号 |
|
|
30
|
+
| ------------- | ------------------------------ | ------ |
|
|
31
|
+
| 分析 / 报告类 | `references/core/playbooks.md` | P1–P9 |
|
|
32
32
|
| 操作 / 管理类 | `references/core/workflows.md` | W1–W12 |
|
|
33
33
|
|
|
34
34
|
专用报告模板(被工作流卡片引用):
|
|
35
35
|
|
|
36
|
-
| ID
|
|
37
|
-
|
|
|
38
|
-
| 网站诊断
|
|
39
|
-
| 战略市场分析
|
|
36
|
+
| ID | 文档 |
|
|
37
|
+
| ----------------- | ------------------------------------------------------------------------- |
|
|
38
|
+
| 网站诊断 | `report-templates/website-diagnosis-report.md` |
|
|
39
|
+
| 战略市场分析 | `report-templates/market-analysis-report.md` |
|
|
40
40
|
| Google 周期 Excel | `report-templates/google-period-report-excel.md`(P4,先 outline 后脚本) |
|
|
41
|
-
| OKKI 周报
|
|
42
|
-
| 询盘分析
|
|
41
|
+
| OKKI 周报 | `report-templates/okki-weekly-google-client.md` |
|
|
42
|
+
| 询盘分析 | `report-templates/google-inquiry-analysis.md` |
|
|
43
43
|
|
|
44
44
|
## 维护
|
|
45
45
|
|
|
46
|
-
- 结构规范:`references/core/skill-authoring.md`
|
|
47
|
-
- 人类深读:`docs/skill-guide.md`
|
|
48
46
|
- 源码唯一真相:`tso-cli/assets/siluzan-ads/`(勿编辑 `skills/siluzan-tso/` 副本)
|
|
47
|
+
- 通用纪律唯一真相源:`references/core/agent-conventions.md`(其他文档只单行指向,不复制规则)
|
|
49
48
|
|
|
50
49
|
## CLI 代码域(与文档对齐)
|
|
51
50
|
|
|
52
|
-
| CLI 模块
|
|
53
|
-
|
|
|
54
|
-
| `src/commands/list-accounts/`、`accounts-digest/`、`balance-scan/` | accounts
|
|
55
|
-
| `src/commands/open-account/`、`account-manage-register.ts`
|
|
56
|
-
| `src/commands/ad/`
|
|
57
|
-
| `src/commands/google-analysis/`、`google-analysis-batch.ts`
|
|
58
|
-
| `src/commands/website-diagnosis/`
|
|
59
|
-
| `src/commands/market-analysis/`
|
|
60
|
-
| `src/commands/report/`
|
|
61
|
-
| `src/commands/forewarning/`、`optimize/`、`clue.ts`
|
|
51
|
+
| CLI 模块 | 文档域 |
|
|
52
|
+
| ------------------------------------------------------------------ | ---------------------------- |
|
|
53
|
+
| `src/commands/list-accounts/`、`accounts-digest/`、`balance-scan/` | accounts |
|
|
54
|
+
| `src/commands/open-account/`、`account-manage-register.ts` | accounts |
|
|
55
|
+
| `src/commands/ad/` | google-ads |
|
|
56
|
+
| `src/commands/google-analysis/`、`google-analysis-batch.ts` | analytics |
|
|
57
|
+
| `src/commands/website-diagnosis/` | analytics(网站诊断) |
|
|
58
|
+
| `src/commands/market-analysis/` | analytics(战略市场分析) |
|
|
59
|
+
| `src/commands/report/` | analytics + report-templates |
|
|
60
|
+
| `src/commands/forewarning/`、`optimize/`、`clue.ts` | operations |
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -20,17 +20,9 @@ allowed-tools: Bash(siluzan-tso:*) Read Write
|
|
|
20
20
|
|
|
21
21
|
<!-- 注入到 SKILL.md.tmpl 的 {{AGENT_PREAMBLE}};构建时由 gen-skill-docs.mjs 合并 -->
|
|
22
22
|
|
|
23
|
-
> **Agent
|
|
23
|
+
> **Agent 纪律(每个新任务必读)**:先 Read `references/core/agent-conventions.md`(唯一规则真相源:加载纪律、数据处理协议、时间/币种、批量约束、交付前自检),再按下方路由表 Read「必读文档」与对应工作流卡片。禁止跨话题复用参数记忆;数据类任务一律 `--json-out` + **仅用代码**读落盘 JSON(脚本示例见 `references/core/tips.md`)。
|
|
24
24
|
>
|
|
25
|
-
>
|
|
26
|
-
>
|
|
27
|
-
> **Google Excel(P4)**:Read `report-templates/google-period-report-excel.md`;`list-accounts -k` 核验用户 ID;拉数后**先读齐**各 `*.outline.txt` 再写脚本;禁止 `cat|head` 预览业务 JSON、禁止第三方 xlsx Skill、禁止猜字段名。
|
|
28
|
-
>
|
|
29
|
-
> **HTML 终稿类报告(用户未指定格式时默认 HTML)**:网站诊断 P8(`website-diagnosis render`)、Meta 周期 P4-FB(`facebook-analysis render`)、战略市场 P9(`market-analysis render`)。Agent 只写 JSON,**禁止**仅交付 Markdown 摘要或纯 JSON 充当终稿。
|
|
30
|
-
>
|
|
31
|
-
> **开户**:首次进入开户话题须先向用户罗列该媒体(或未指明媒体时六平台)**全部必填项**,见 `references/accounts/open-account-by-media.md` §「首次响应硬规范」。
|
|
32
|
-
>
|
|
33
|
-
> **Subagent(可选)**:若宿主支持 Task / 子会话,复杂报告(P5/P6/P7)或长 CLI 输出前 Read `references/core/subagent-orchestration.md`,**自行决定**是否委派;写操作确认与对用户的最终交付留在主 Agent。
|
|
25
|
+
> **默认交付格式**:用户未指定格式时,网站诊断 P8、Meta 周期 P4-FB、战略市场 P9 默认 **HTML**(各自 `render` 子命令),Google 周期 P4 默认 HTML;**禁止**仅交付 Markdown 摘要或纯 JSON 充当终稿。
|
|
34
26
|
|
|
35
27
|
---
|
|
36
28
|
|
|
@@ -71,11 +63,11 @@ siluzan-tso -h # 查看帮助
|
|
|
71
63
|
|
|
72
64
|
| 用户意图(关键词) | 工作流 | 必读文档 |
|
|
73
65
|
| ------------------ | ------ | -------- |
|
|
74
|
-
| 账户列表 / 有哪些 / 有多少 / 列出全部某媒体 | W1 | `accounts/accounts.md`(§ list-accounts
|
|
75
|
-
| 单户实时余额 | W1 | `accounts/accounts.md`(balance
|
|
76
|
-
| 多账户余额 / 续航不足预警 | **P2** | `accounts/accounts.md`(balance-scan
|
|
77
|
-
| 单户消耗 / 投放数据 | W1 / **P1** | `accounts/accounts.md`(stats
|
|
78
|
-
| 多账户消耗/对比汇总 | **P3** | `accounts/accounts.md`(accounts-digest
|
|
66
|
+
| 账户列表 / 有哪些 / 有多少 / 列出全部某媒体 | W1 | `accounts/accounts.md`(§ list-accounts 意图速查) |
|
|
67
|
+
| 单户实时余额 | W1 | `accounts/accounts.md`(balance) |
|
|
68
|
+
| 多账户余额 / 续航不足预警 | **P2** | `accounts/accounts.md`(balance-scan) |
|
|
69
|
+
| 单户消耗 / 投放数据 | W1 / **P1** | `accounts/accounts.md`(stats) |
|
|
70
|
+
| 多账户消耗/对比汇总 | **P3** | `accounts/accounts.md`(accounts-digest) |
|
|
79
71
|
| 激活/充值账单明细 | W1 | `accounts/accounts.md`(account-active-bills) |
|
|
80
72
|
| 开户(六大媒体)/ 开户进度 | W2 | `accounts/open-account-by-media.md`(**首次须列全必填项**;Google 加 `accounts/open-account-google-ui.md`) |
|
|
81
73
|
| 账户权限:分享/取消/解绑/重授权/MCC/BC/BM/关闭/提现/邮箱授权 | W9 | `accounts/accounts.md`(account 子命令) |
|
|
@@ -100,8 +92,8 @@ siluzan-tso -h # 查看帮助
|
|
|
100
92
|
|
|
101
93
|
| 用户意图(关键词) | 工作流 | 必读文档 |
|
|
102
94
|
| ------------------ | ------ | -------- |
|
|
103
|
-
| 单账户投放画像 / 诊断 | **P1** | `analytics/account-analytics.md`
|
|
104
|
-
| Google 账户周期报告 | **P4** | `report-templates/google-period-report.md` + `analytics/account-analytics.md
|
|
95
|
+
| 单账户投放画像 / 诊断 | **P1** | `analytics/account-analytics.md` |
|
|
96
|
+
| Google 账户周期报告 | **P4** | `report-templates/google-period-report.md` + `analytics/account-analytics.md`;要 **Excel** 加 `report-templates/google-period-report-excel.md` |
|
|
105
97
|
| Meta/Facebook 周期或诊断报告 | **P4-FB** | `report-templates/meta-period-report.md` + `assets/meta-period-report-rules.md` + `analytics/facebook-analysis-guide.md`;要 Excel 加 `meta-period-report-excel.md` |
|
|
106
98
|
| TikTok / Bing 周期报告 | **P4** | `analytics/account-analytics.md`(report tiktok-*/bing-*)+ 对应 `report-templates/*-period-report.md` |
|
|
107
99
|
| 多账户 × 多维度批处理 | **P5** | `analytics/google-analysis-batch.md` + `analytics/account-analytics.md` |
|
|
@@ -122,8 +114,6 @@ siluzan-tso -h # 查看帮助
|
|
|
122
114
|
| 日/周巡检 | W12 | `core/workflows.md`(W12)+ `accounts/accounts.md` |
|
|
123
115
|
| 宿主编排 / 投放自控 / 异常监控 / 自动优化 | — | `operations/hosted-automation-user-catalog.md`(索引)→ `operations/hosted-automation-*.md` |
|
|
124
116
|
|
|
125
|
-
> **数据/报告类任务通用纪律**:一律 `--json-out` 落盘 + **仅用脚本**读 JSON(见 `core/tips.md`);交付前 Read 最终产物按 `core/deliverable-preflight.md` 自检(币种/章节)。
|
|
126
|
-
|
|
127
117
|
---
|
|
128
118
|
|
|
129
119
|
## Subagent 自主委派(可选)
|
|
@@ -142,10 +132,3 @@ siluzan-tso -h # 查看帮助
|
|
|
142
132
|
| references 与命令对齐 | 批处理循环、限速、重试;**可选** subagent 并行 |
|
|
143
133
|
|
|
144
134
|
详见 `operations/hosted-automation-self-control.md`、`operations/hosted-automation-monitoring-json.md`、`operations/hosted-automation-optimize-index.md`。
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 维护者
|
|
149
|
-
|
|
150
|
-
- `references/core/skill-authoring.md` — 规范与检查清单
|
|
151
|
-
- `docs/skill-guide.md` — 人类导读
|
package/dist/skill/_meta.json
CHANGED
|
@@ -1,81 +1,79 @@
|
|
|
1
1
|
# References 索引
|
|
2
2
|
|
|
3
|
-
> Agent 按 `SKILL.md` 路由表(意图 → 工作流 → 必读文档)定位:分析/报告类线性步骤在 `core/playbooks.md`(P1–P9),操作/管理类在 `core/workflows.md`(W1–W12),命令参数在各域 reference
|
|
3
|
+
> Agent 按 `SKILL.md` 路由表(意图 → 工作流 → 必读文档)定位:分析/报告类线性步骤在 `core/playbooks.md`(P1–P9),操作/管理类在 `core/workflows.md`(W1–W12),命令参数在各域 reference。
|
|
4
4
|
|
|
5
5
|
## 基础与纪律
|
|
6
6
|
|
|
7
|
-
| 文件
|
|
8
|
-
|
|
|
9
|
-
| `core/setup.md`
|
|
10
|
-
| `core/agent-conventions.md`
|
|
11
|
-
| `core/tips.md`
|
|
12
|
-
| `core/
|
|
13
|
-
| `core/
|
|
14
|
-
| `core/
|
|
15
|
-
| `core/skill-authoring.md` | Skill 文档维护最佳实践(维护者) |
|
|
16
|
-
| `core/subagent-orchestration.md` | **可选**:主 Agent 自主决定是否委派 subagent(P5/P6/P7) |
|
|
7
|
+
| 文件 | 用途 |
|
|
8
|
+
| -------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `core/setup.md` | 安装、登录(手机验证码优先)、配置、更新 |
|
|
10
|
+
| `core/agent-conventions.md` | **Agent 必读 · 唯一规则真相源**:加载纪律、数据处理协议、硬规范、时间/币种/批量、交付前自检 |
|
|
11
|
+
| `core/tips.md` | `--json-out` 脚本食谱(node -e 示例、文件命名、分页) |
|
|
12
|
+
| `core/playbooks.md` | **工作流目录 · 分析/报告类**(P1–P9,统一卡片:触发/必读/步骤/交付) |
|
|
13
|
+
| `core/workflows.md` | **工作流目录 · 操作/管理类**(W1–W12,同卡片格式) |
|
|
14
|
+
| `core/subagent-orchestration.md` | **可选**:主 Agent 自主决定是否委派 subagent(P5/P6/P7) |
|
|
17
15
|
|
|
18
16
|
## 账户与财务
|
|
19
17
|
|
|
20
|
-
| 文件
|
|
21
|
-
|
|
|
22
|
-
| `accounts/accounts.md`
|
|
23
|
-
| `accounts/currency.md`
|
|
24
|
-
| `accounts/open-account-by-media.md`
|
|
25
|
-
| `accounts/open-account-google-ui.md` | Google 开户字段与 Agent 流程
|
|
26
|
-
| `accounts/finance.md`
|
|
27
|
-
| `accounts/write-audit-restore.md`
|
|
18
|
+
| 文件 | 用途 |
|
|
19
|
+
| ------------------------------------ | ---------------------------------------------------------------- |
|
|
20
|
+
| `accounts/accounts.md` | 列表、余额、消耗、分享、MCC/BC/BM、balance-scan、accounts-digest |
|
|
21
|
+
| `accounts/currency.md` | CNY/USD 字段来源、符号、跨币种禁止求和 |
|
|
22
|
+
| `accounts/open-account-by-media.md` | 各媒体开户命令与参数 |
|
|
23
|
+
| `accounts/open-account-google-ui.md` | Google 开户字段与 Agent 流程 |
|
|
24
|
+
| `accounts/finance.md` | 转账、开票、充值 |
|
|
25
|
+
| `accounts/write-audit-restore.md` | 写审计、`--commit`、restore |
|
|
28
26
|
|
|
29
27
|
## Google 广告
|
|
30
28
|
|
|
31
|
-
| 文件
|
|
32
|
-
|
|
|
33
|
-
| `google-ads/google-ads.md`
|
|
29
|
+
| 文件 | 用途 |
|
|
30
|
+
| ---------------------------------------- | ------------------------------------ |
|
|
31
|
+
| `google-ads/google-ads.md` | Google Ads CRUD、batch、拒审字段 |
|
|
34
32
|
| `google-ads/google-ads-campaign-plan.md` | 搜索系列 7 步流水线、validate/create |
|
|
35
|
-
| `google-ads/pmax-api.md`
|
|
36
|
-
| `analytics/keyword-planner-workflows.md` | keyword / google-analysis 拓词
|
|
37
|
-
| `google-ads/rules/README.md`
|
|
33
|
+
| `google-ads/pmax-api.md` | PMax 网关路径、金额口径 |
|
|
34
|
+
| `analytics/keyword-planner-workflows.md` | keyword / google-analysis 拓词 |
|
|
35
|
+
| `google-ads/rules/README.md` | 优化/合规 SOP 索引 |
|
|
38
36
|
|
|
39
37
|
## 分析与报告
|
|
40
38
|
|
|
41
|
-
| 文件
|
|
42
|
-
|
|
|
43
|
-
| `analytics/account-analytics.md`
|
|
44
|
-
| `analytics/website-diagnosis-guide.md` | 网站诊断 CLI、6 模块规则、对齐 tso_agent
|
|
45
|
-
| `analytics/market-analysis-guide.md`
|
|
46
|
-
| `assets/market-analysis-rules.md`
|
|
39
|
+
| 文件 | 用途 |
|
|
40
|
+
| -------------------------------------- | ------------------------------------------- |
|
|
41
|
+
| `analytics/account-analytics.md` | 拉数、数据时效性、诊断模板 |
|
|
42
|
+
| `analytics/website-diagnosis-guide.md` | 网站诊断 CLI、6 模块规则、对齐 tso_agent |
|
|
43
|
+
| `analytics/market-analysis-guide.md` | 战略市场分析 CLI、Agent 调研流程 |
|
|
44
|
+
| `assets/market-analysis-rules.md` | 市场分析报告章节与 HTML 版式(Agent 必读) |
|
|
47
45
|
| `analytics/facebook-analysis-guide.md` | Facebook 字段、与 Google 报告对照、撰写清单 |
|
|
48
|
-
| `analytics/google-analysis-batch.md`
|
|
49
|
-
| `analytics/reporting.md`
|
|
50
|
-
| `analytics/rag.md`
|
|
51
|
-
| `analytics/geo-continents.json`
|
|
46
|
+
| `analytics/google-analysis-batch.md` | 多账户批处理 run/resume/status |
|
|
47
|
+
| `analytics/reporting.md` | TSO 优化报告生成与推送 |
|
|
48
|
+
| `analytics/rag.md` | 知识库 list/query |
|
|
49
|
+
| `analytics/geo-continents.json` | 国家→大洲映射(询盘分析) |
|
|
52
50
|
|
|
53
51
|
## 运营工具
|
|
54
52
|
|
|
55
|
-
| 文件
|
|
56
|
-
|
|
|
57
|
-
| `operations/optimize.md`
|
|
58
|
-
| `operations/forewarning.md`
|
|
59
|
-
| `operations/clue.md`
|
|
60
|
-
| `operations/hosted-automation-user-catalog.md`
|
|
61
|
-
| `operations/hosted-automation-self-control.md`
|
|
62
|
-
| `operations/hosted-automation-monitoring-json.md` | 异常监控 JSON 键名
|
|
63
|
-
| `operations/hosted-automation-optimize-index.md`
|
|
64
|
-
| `operations/hosted-automation-scenarios.md`
|
|
53
|
+
| 文件 | 用途 |
|
|
54
|
+
| ------------------------------------------------- | ---------------------- |
|
|
55
|
+
| `operations/optimize.md` | AI 优化建议记录 |
|
|
56
|
+
| `operations/forewarning.md` | 智能预警 |
|
|
57
|
+
| `operations/clue.md` | TikTok / Meta 线索表单 |
|
|
58
|
+
| `operations/hosted-automation-user-catalog.md` | 高阶自动化能力目录 |
|
|
59
|
+
| `operations/hosted-automation-self-control.md` | 预算/CPA/空耗自控 SOP |
|
|
60
|
+
| `operations/hosted-automation-monitoring-json.md` | 异常监控 JSON 键名 |
|
|
61
|
+
| `operations/hosted-automation-optimize-index.md` | 自动优化 SOP 索引 |
|
|
62
|
+
| `operations/hosted-automation-scenarios.md` | 宿主编排场景索引 |
|
|
65
63
|
|
|
66
64
|
## Assets 模板(`../assets/`)
|
|
67
65
|
|
|
68
|
-
| 文件
|
|
69
|
-
|
|
|
70
|
-
| `campaign-create-template.md` / `.json` | 搜索系列 batch 契约
|
|
71
|
-
| `website-diagnosis-rules.md`
|
|
72
|
-
| `meta-period-report-rules.md`
|
|
73
|
-
| `meta-period-report.schema.json`
|
|
74
|
-
| `pmax-create-template.md` / `.json`
|
|
75
|
-
| `pmax-asset-group-template.json`
|
|
76
|
-
| `pmax-signals-template.json`
|
|
77
|
-
| `pmax-assets-update-template.json`
|
|
78
|
-
| `pmax-patch-campaign-template.json`
|
|
66
|
+
| 文件 | 用途 |
|
|
67
|
+
| --------------------------------------- | ------------------------------------- |
|
|
68
|
+
| `campaign-create-template.md` / `.json` | 搜索系列 batch 契约 |
|
|
69
|
+
| `website-diagnosis-rules.md` | 网站诊断评分项与 JSON Schema |
|
|
70
|
+
| `meta-period-report-rules.md` | Meta 周期报告内容丰富度与建议撰写规则 |
|
|
71
|
+
| `meta-period-report.schema.json` | Meta 周期报告 Agent JSON Schema |
|
|
72
|
+
| `pmax-create-template.md` / `.json` | PMax 新建契约 |
|
|
73
|
+
| `pmax-asset-group-template.json` | PMax 素材组 |
|
|
74
|
+
| `pmax-signals-template.json` | PMax 信号 |
|
|
75
|
+
| `pmax-assets-update-template.json` | PMax 素材更新 |
|
|
76
|
+
| `pmax-patch-campaign-template.json` | PMax 系列 patch |
|
|
79
77
|
|
|
80
78
|
## 报告模板(`../report-templates/`)
|
|
81
79
|
|
|
@@ -83,10 +81,10 @@
|
|
|
83
81
|
|
|
84
82
|
## Handoff 模板(`../snippets/`,随 skill 安装)
|
|
85
83
|
|
|
86
|
-
| 文件
|
|
87
|
-
|
|
|
88
|
-
| `handoff-p5-batch.md`
|
|
89
|
-
| `handoff-p6-okki.md`
|
|
90
|
-
| `handoff-p7-inquiry.md` | P7 询盘拉数与 xlsx
|
|
84
|
+
| 文件 | 用途 |
|
|
85
|
+
| ----------------------- | --------------------------------- |
|
|
86
|
+
| `handoff-p5-batch.md` | P5 batch 与按账户聚合 Task prompt |
|
|
87
|
+
| `handoff-p6-okki.md` | P6 OKKI 拉数 / 写 xlsx |
|
|
88
|
+
| `handoff-p7-inquiry.md` | P7 询盘拉数与 xlsx |
|
|
91
89
|
|
|
92
90
|
`agent-preamble.md` 仅用于构建时注入 `SKILL.md`,不复制到 `dist/skill/snippets/`。
|