siluzan-tso-cli 1.1.48 → 1.1.49-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.
Files changed (38) hide show
  1. package/README.md +2 -1
  2. package/dist/index.js +2511 -1680
  3. package/dist/skill/SKILL.md +2 -2
  4. package/dist/skill/_meta.json +2 -2
  5. package/dist/skill/assets/google-period-report.schema.json +8 -0
  6. package/dist/skill/assets/okki-weekly-report.schema.json +78 -0
  7. package/dist/skill/references/README.md +1 -1
  8. package/dist/skill/references/accounts/accounts-list.md +1 -1
  9. package/dist/skill/references/accounts/accounts-permissions.md +2 -2
  10. package/dist/skill/references/accounts/finance.md +1 -1
  11. package/dist/skill/references/accounts/open-account-by-media.md +1 -1
  12. package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
  13. package/dist/skill/references/analytics/account-analytics.md +3 -1
  14. package/dist/skill/references/analytics/rag.md +1 -1
  15. package/dist/skill/references/analytics/reporting.md +5 -5
  16. package/dist/skill/references/core/agent-conventions.md +1 -1
  17. package/dist/skill/references/core/intent-routing.md +2 -2
  18. package/dist/skill/references/core/playbooks.md +5 -3
  19. package/dist/skill/references/core/setup.md +5 -5
  20. package/dist/skill/references/core/subagent-orchestration.md +3 -3
  21. package/dist/skill/references/misc/tso-home.md +2 -2
  22. package/dist/skill/references/report-templates/README.md +1 -1
  23. package/dist/skill/references/report-templates/REPORT-WORKFLOW.md +3 -3
  24. package/dist/skill/references/report-templates/excel-style-guide.md +1 -1
  25. package/dist/skill/references/report-templates/google-period-report-excel.md +2 -1
  26. package/dist/skill/references/report-templates/google-period-report.md +1 -1
  27. package/dist/skill/references/report-templates/okki-weekly-google-client.md +37 -18
  28. package/dist/skill/report-templates/README.md +1 -1
  29. package/dist/skill/report-templates/REPORT-WORKFLOW.md +3 -3
  30. package/dist/skill/report-templates/excel-style-guide.md +1 -1
  31. package/dist/skill/report-templates/google-period-report-excel.md +2 -1
  32. package/dist/skill/report-templates/google-period-report.html +2 -0
  33. package/dist/skill/report-templates/google-period-report.md +1 -1
  34. package/dist/skill/report-templates/okki-weekly-google-client.md +37 -18
  35. package/dist/skill/scripts/install.ps1 +3 -3
  36. package/dist/skill/scripts/install.sh +3 -3
  37. package/dist/skill/snippets/handoff-p6-okki.md +15 -6
  38. package/package.json +1 -1
@@ -33,7 +33,7 @@
33
33
  | `bing-period-report.md` / `.html` | **Bing(BingV2)分析报告(默认)**:四步流程 → `bing-analysis render` 出 HTML |
34
34
  | `yandex-period-report.md` / `.html` | **Yandex Direct 周期报告(默认)**:四步流程 → `yandex-analysis render` 出 HTML(样式对齐开发样例) |
35
35
  | `yandex-period-report-excel.md` | **仅用户要 Excel 时**:Agent 脚本写 xlsx;无 CLI excel 子命令 |
36
- | `okki-weekly-google-client.md` | **OKKI 周报**:Google 发客户固定话术 + 精简维度 CLI;**默认必产 5 Sheet Excel**(「表格形式」= xlsx,禁止 Markdown/HTML 代替),见 `references/core/playbooks.md` P6 |
36
+ | `okki-weekly-google-client.md` | **OKKI 周报**:写 `okki-weekly-report.json` → `google-analysis okki-render` 出 5 Sheet Excel + 客户话术,见 `references/core/playbooks.md` P6 |
37
37
  | `google-inquiry-analysis.md` | **Google 询盘分析**:严格 3 个月 + 用户询盘 + 8 Sheet xlsx,见 `references/core/playbooks.md` P7 |
38
38
  | `website-diagnosis-report.md` / `.html` | **网站诊断**:终稿为 **HTML**(对齐 TSO `WebsiteAnalysisReport/v3`);配合 `website-diagnosis collect`,见 P8 |
39
39
 
@@ -84,7 +84,7 @@
84
84
  - **TikTok 周期报告**:产出 `tiktok-period-report.json`(见 `tiktok-period-report.md`,`meta` 可由 `--snapshot-dir` 自动合并)。
85
85
  - **Bing 周期报告**:产出 `bing-period-report.json`(见 `bing-period-report.md`,`meta`/`kpis` 可由 `--snapshot-dir` 自动合并)。
86
86
  - **Yandex 周期报告**:产出 `yandex-period-report.json`(见 `yandex-period-report.md`,`meta`/`kpis`/`tables` 可由 `--snapshot-dir` 自动合并)。
87
- - **OKKI(P6)/ 询盘(P7)**:Agent 脚本写 **多 Sheet `.xlsx`**(必产);对话 Markdown 表 / 手写 HTML **不能**代替终稿。
87
+ - **OKKI(P6)**:产出 `okki-weekly-report.json` 后走 `google-analysis okki-render` 出 **5 Sheet `.xlsx`**(必产);**询盘(P7)**仍由 Agent 脚本写 8 Sheet `.xlsx`。对话 Markdown 表 / 手写 HTML **不能**代替终稿。
88
88
 
89
89
  ### 步骤 5b:生成终稿(按媒体与格式)
90
90
 
@@ -97,7 +97,7 @@
97
97
  | **Bing 周期报告** | `bing-analysis render` → **HTML**(必做) | Agent 脚本写 xlsx;**不**默认 `render` |
98
98
  | **Yandex 周期报告** | `yandex-analysis render` → **HTML**(必做) | Agent 脚本按 `yandex-period-report-excel.md` 写 xlsx;**不**默认 `render` |
99
99
  | **Google 诊断** | 按 `report-template*.html` 写 HTML(默认 `report-template.html`) | 同左;用户要 Excel 时 Agent 脚本写 xlsx |
100
- | **OKKI 周报(P6)** | **必产 5 Sheet `.xlsx`**(Agent 脚本;「表格形式」= xlsx) | 同左;仅用户明确「只要话术 / 不要文件」才省略 |
100
+ | **OKKI 周报(P6)** | **必产 5 Sheet `.xlsx`**(`google-analysis okki-render`;「表格形式」= xlsx) | 同左;仅用户明确「只要话术 / 不要文件」才省略 |
101
101
  | **Google 询盘(P7)** | **必产 8 Sheet `.xlsx`**(Agent 脚本) | 同左 |
102
102
  | **网站诊断** | `website-diagnosis render` → HTML | — |
103
103
 
@@ -125,7 +125,7 @@
125
125
  | 用户措辞 | 映射 |
126
126
  | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
127
127
  | 月报、周报、投放总结、效果回顾 | 周期分析 → 对应媒体 `*-period-report.md` |
128
- | **使用 okki 周报模板 / OKKI 周报 / okki 周报**(Google + 区间;含「表格形式」) | **固定话术 + 必产 5 Sheet `.xlsx`** → `okki-weekly-google-client.md`(见 SKILL **P6**);「表格形式 / 表格 / 各维度表格」= Excel,**禁止**对话 Markdown 表或手写 HTML 代替;Excel **仅**由 Agent 脚本生成,**无** CLI 内置写表子命令 |
128
+ | **使用 okki 周报模板 / OKKI 周报 / okki 周报**(Google + 区间;含「表格形式」) | **固定话术 + 必产 5 Sheet `.xlsx`** → `okki-weekly-google-client.md`(见 SKILL **P6**);终稿必须 `google-analysis okki-render`;「表格形式」= Excel,**禁止**对话 Markdown 表 / 手写 HTML / Agent 手写 xlsx |
129
129
  | **Goog账户询盘分析 / Google 账户询盘分析 / 分析XXX Google账号的询盘效果 / 我给你询盘信息分析Google账号XXX效果**(或含「询盘 + 账户 + Google」三要素) | **询盘 + 账户合并分析 + 严格 3 个月 + 8 Sheet xlsx** → `google-inquiry-analysis.md`(见 SKILL **P7**);询盘资料用户上传任意载体,宿主 Agent 解析落盘 `inquiries.json`,xlsx **仅**由 Agent 脚本生成 |
130
130
  | 健康检查、诊断、账户分析 | 诊断 → `google-account-diagnosis-report.md`(Google)或周期型降级 |
131
131
  | 对比、汇报、给客户看 | 以周期型为骨架,简化版本 |
@@ -85,7 +85,7 @@ sheet.setColWidths([20, 60]); // 字符数,两列型表格:标签列窄、
85
85
  | `google-period-report-excel.md` | 本文件 | `google` |
86
86
  | `yandex-period-report-excel.md` | 本文件 | `yandex` |
87
87
  | `stats-daily-excel.md` | 本文件 | 按 `-m` 媒体参数对应色 |
88
- | `okki-weekly-google-client.md` | 本文件(5 Sheet 固定版式) | `google` |
88
+ | `okki-weekly-google-client.md` | **不用本套件**;走 `google-analysis okki-render` 锁死 5 Sheet | `google` |
89
89
  | `google-inquiry-analysis.md` | 本文件(8 Sheet 固定版式) | `google` |
90
90
 
91
91
  **注意**:各模板文件里规定的 Sheet 名 / 列名 / 数据口径(业务内容)以各自 `*.md` 为准,本文件只管「怎么好看」,不改「写什么」。
@@ -62,6 +62,7 @@ siluzan-tso google-analysis -a <id> --start <S> --end <E> --json-out ./snap-p4 \
62
62
 
63
63
  | 维度 | ❌ 禁止猜 | ✅ outline 真实字段 |
64
64
  | ----------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
65
+ | `overview` | `currentPeriod.activeDays`、`previousPeriod.activeDays`、`currentPeriod.averageDailyCost` | `record.activeDays`、`record.averageDailyCost`(只在 **record 根**;period 块没有。上期这两字段接口不返回;要环比另拉上期 `daily-metrics` 数 `spend>0` 天数) |
65
66
  | `keywords` | `keywordText`、`status`、`matchType`(单独作展示列) | `keyword`、`userStatus`、`keywordMatchTypeZh`(或 `keywordMatchType`) |
66
67
  | `search-terms` | `query` | `searchTermText`;匹配类型用 `matchTypeZh`;状态用 `queryTargetingStatusZh` |
67
68
  | `geographic` | `geoName`、`countryCriterionIdName` | `countryOrRegion`、`countryNameZh`、`countryCode` |
@@ -117,6 +118,6 @@ siluzan-tso google-analysis -a <id> --start <S> --end <E> --json-out ./snap-p4 \
117
118
  ## 相关文档
118
119
 
119
120
  - `google-period-report.md` — 默认维度与可选追加
120
- - `okki-weekly-google-client.md` — OKKI 固定 5 Sheet(P6)
121
+ - `okki-weekly-google-client.md` — OKKI 固定 5 Sheet(P6,`google-analysis okki-render`)
121
122
  - `references/core/tips.md` — 摘要 → outline → 脚本
122
123
  - `references/core/playbooks.md` — P4 步骤卡片
@@ -768,6 +768,8 @@
768
768
  { key: "ctr", label: "点击率 CTR", fmt: pct },
769
769
  { key: "averageCpc", label: "平均点击费用", fmt: (v) => money(v, currency) },
770
770
  { key: "costPerConversion", label: "每次转化费用 CPA", fmt: (v) => money(v, currency) },
771
+ { key: "activeDays", label: "活跃天数", fmt: int },
772
+ { key: "averageDailyCost", label: "日均消耗", fmt: (v) => money(v, currency) },
771
773
  ];
772
774
  const kpiHtml = kpiDefs
773
775
  .map((def, i) => {
@@ -33,7 +33,7 @@ siluzan-tso google-analysis render \
33
33
  `google-period-report.json` 顶层结构:
34
34
 
35
35
  - `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;可省略由 `--snapshot-dir` 从 `overview` + manifest 自动合并。
36
- - `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。环比仍来自 `overview.previousPeriod`。
36
+ - `kpis`:账户级 KPI(消耗/展示/点击/转化/CTR/CPC/CPA,含可选 `previousPeriod` 环比;另含 `activeDays` / `averageDailyCost`);Agent 可省略,但 **render 合并后** `cost`/`impressions`/`clicks` 至少一项须为有效数字,否则拒绝出 HTML(避免执行摘要卡片全「—」)。本期 KPI 由 CLI 优先对 `campaigns` 全系列累加并重算比率;无 campaigns 时回退 `overview.currentPeriod`,再回退 `dimension-summary`。`activeDays` / `averageDailyCost` 来自 `overview.record` 根(**不是** `currentPeriod`);环比仍来自 `overview.previousPeriod`(上期无活跃天数,不编造)。
37
37
  - `charts.dailyTrend`:每日趋势(`dates`/`cost`/`conversions`/`cpa`);可省略由 `daily-metrics` 自动合并。
38
38
  - `tables.{dimensionSummary,campaigns,devices,geographic,keywords}`:对应 §3~§7 表格数据;可省略由同名 `google-analysis` section 自动合并。
39
39
  - `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
@@ -6,24 +6,24 @@
6
6
  > **媒体**:当前模板仅规范 **Google**(`mediaCustomerId`)。其他媒体用各自 `*-period-report.md`。
7
7
  > **Excel 版式基准**:与运营样表《**数据复盘分析**》类 xlsx 对齐(如 `2025.12数据复盘分析.xlsx`);工作簿 5 个 Sheet、顺序与表头以下文规范为准。
8
8
  >
9
- > **默认交付(硬性,缺文件 = 任务未完成)**:磁盘上的 **5 Sheet `.xlsx`** + 对话内客户话术。
9
+ > **默认交付(硬性,缺文件 = 任务未完成)**:磁盘上的 **5 Sheet `.xlsx`**(由 `google-analysis okki-render` 生成)+ 对话内客户话术。
10
10
  > 「表格形式 / 表格 / 各维度表格 / 表 / 做成表」= **Excel `.xlsx`**,**不是**对话 Markdown 表,**不是**手写 HTML/PDF。
11
11
  > 仅当用户明确「只要话术 / 不要文件 / 不要 Excel」时才省略 xlsx。
12
- > **禁止**:用对话 Markdown 表、手写 HTML、PDF 代替 `.xlsx`;禁止假设存在 CLI `excel` 子命令。
12
+ > **禁止**:用对话 Markdown 表、手写 HTML、PDF 代替 `.xlsx`;**禁止** Agent 手写 / 脚本写 xlsx。
13
13
 
14
14
  ## Contents
15
15
 
16
16
  - 须先确认
17
- - 架构约定 · Excel 由谁生成
17
+ - 标准四步流程(拉数 → 写 JSON → okki-render)
18
18
  - 拉数(一次目录)
19
- - xlsx 版式规范
19
+ - xlsx 版式规范(由 CLI 锁死)
20
20
  - 对外客户话术(默认结构,填数来自 JSON)
21
21
  - 复盘小结(Excel「数据复盘」区块 / 对内补充)
22
22
  - 与 `google-period-report.md` 的差异
23
23
 
24
24
  ---
25
25
 
26
- 识别到上述意图时:**不要**再走 `google-period-report.md` 的「默认 8 维 + 追问追加」流程;按本文**固定维度 + 默认客户话术(可用户自定义)+ 5 Sheet `.xlsx`** 交付(数据全部来自 CLI 落盘 JSON,见 `references/analytics/account-analytics.md`)。**先写 xlsx 再发话术**;没有 `.xlsx` 路径不得收口。
26
+ 识别到上述意图时:**不要**再走 `google-period-report.md` 的「默认 8 维 + 追问追加」流程;按本文**固定维度 + 默认客户话术(可用户自定义)+ `okki-render` 出 5 Sheet `.xlsx`** 交付。**先 `okki-render` 再发话术**;没有 `.xlsx` 路径不得收口。
27
27
 
28
28
  ---
29
29
 
@@ -33,17 +33,35 @@
33
33
  2. **统计区间**:`--start` / `--end`(用户未给齐时按 SKILL 反问;授权默认时可用「上一完整自然周」白名单并写明)。
34
34
  3. **询盘口径**:默认使用区间内 `conversions`(转化次数,来自 `stats` 或 `overview`)。若运营定义为某类转化,须在首段脚注说明(必要时补拉 `google-analysis --sections conversion-actions` 仅作说明)。
35
35
  4. **日期写法**:`2026.4.1`、`2026/4/1` 等先规范为 `YYYY-MM-DD`(如 `2026-04-01`)再传 `--start` / `--end`。
36
- 5. **交付**:默认 **客户话术 + 5 Sheet `.xlsx`(必产)**。「表格形式」一律当 Excel。仅用户明确只要可复制话术、不要文件时,才省略 xlsx。
36
+ 5. **交付**:默认 **客户话术 + 5 Sheet `.xlsx`(必产,由 `okki-render` 写出)**。「表格形式」一律当 Excel。仅用户明确只要可复制话术、不要文件时,才省略 xlsx。
37
37
 
38
38
  ---
39
39
 
40
- ## 架构约定 · Excel 由谁生成
40
+ ## 标准四步流程(拉数 → 写 JSON → okki-render)
41
41
 
42
- - **`siluzan-tso` 不提供**「一键生成 OKKI Excel」的子命令,**也不要**在 CLI 里新增。
43
- - **默认必产 Excel**:由 **Agent(含 WorkBuddy 编排)** 在下列 CLI **`--json-out` 落盘后**,自行编写 **Node.js / Python** 脚本(如 `exceljs`、`xlsx`、`openpyxl`)读取 JSON → 写 `.xlsx`。没有写出 `.xlsx` = 未完成。
44
- - **数值一律来自落盘 JSON,禁止在脚本里写死业务数字。**
45
- - **所有 ID 列写字符串(文本)**,禁止 Excel 数字类型(防科学计数法);见 `references/core/agent-conventions.md`。
46
- - **样式(必须)**:`import` `report-templates/excel-style-kit.mjs`,用 `createExcelWorkbook({ accent: "google" })` + `titleBar`/`sectionBar`/`tableHeader`/`dataRow`/`noteRow` 组件搭版面(`noteRow` 用于「分析」「数据复盘」文字块),**禁止**裸写无样式单元格。规范见 `report-templates/excel-style-guide.md`。
42
+ | 步骤 | 执行者 | 动作 |
43
+ | --- | --- | --- |
44
+ | **1. 拉数** | Agent 调 CLI | 下方固定命令组合,同一 `--json-out` 目录 |
45
+ | **2. 分析** | Agent | 用 **node/python 脚本**读落盘 JSON(先 outline 再 JSON),完成筛选/聚合/洞察 |
46
+ | **3. 写 JSON** | Agent | 按 `assets/okki-weekly-report.schema.json` 撰写 `okki-weekly-report.json`:**只写 `meta` + `narrative`**;表格留给步骤 4 合并 |
47
+ | **4. 渲染 xlsx** | CLI | `google-analysis okki-render` — **校验 5 Sheet 表末分析 + 账户 Sheet 固定 5 维数据复盘**,缺项报错不生成文件;**禁止** Agent 手写 xlsx |
48
+
49
+ ```bash
50
+ siluzan-tso google-analysis okki-render \
51
+ --data ./okki-weekly-report.json \
52
+ --snapshot-dir ./snap-okki \
53
+ --out ./okki-weekly-report.xlsx
54
+ ```
55
+
56
+ `okki-weekly-report.json` 顶层结构:
57
+
58
+ - `meta`:`accountId`(必填)/ `accountName` / `currency` / `startDate` / `endDate`;日期可由 `--snapshot-dir` 补空。
59
+ - `narrative`(**Agent 必填,唯一由 Agent 撰写的内容**):
60
+ - `sheetAnalysis.{campaigns,keywords,searchTerms,devices,geo}`:每个 Sheet 各 `{summary[](≥1), suggestions[](≥1)}`。**表为空也必须写**(例如「本周期无搜索词,暂无加词/否词建议」)。
61
+ - `review.{account,keywords,searchTerms,devices,geo}`:账户 Sheet「数据复盘」固定 5 维,每维 `{overview, summary, suggestion}` 均非空。
62
+ - `tables` / `kpis`:Agent 可省略;**render 以快照覆盖**。设备/国家只认 `campaign-device` / `campaign-geo-matched`。
63
+
64
+ **禁止**:自己写 Node/Python 出 xlsx、用 Markdown 表代替、跳过 `okki-render`。`okki-render` 失败时按 stderr 缺项补 JSON 后重跑,不得改用手写表。
47
65
 
48
66
  ---
49
67
 
@@ -70,12 +88,13 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
70
88
  - `balance`:**当前**余额(非历史快照),话术写「截至查询时点」。
71
89
  - 「设备」「国家」两 Sheet **必须**用 **`campaign-device` / `campaign-geo-matched`**(按系列/组拆行),**不要**用账户级 `devices` / `geographic`,也**不要**用 `campaign-geo`(定向地理位置,与 OKKI「地理位置报告」口径不一致)。落盘文件名为 `campaign-device-<id>.json`、`campaign-geo-matched-<id>.json`。跨系列汇总在脚本中做。
72
90
  - 可选:`campaign-geo-matched` 支持 `--cost-greater` / `--click-greater` / `--conversions-greater`(见 `references/analytics/account-analytics.md`)。
73
- - TopN、排序、汇总均在脚本内对 JSON 完成,禁止心算。
74
- - 写脚本前先读各 `<section>-<id>.outline.txt` 再读 `.json`。
91
+ - TopN、占比、洞察在写 `narrative` 前由脚本对 JSON 完成,禁止心算。
92
+ - 写 JSON 前先读各 `<section>-<id>.outline.txt` 再读 `.json`。
93
+ - 合计行、CTR/CPA、日期标题、Sheet 列顺序由 `okki-render` 计算,Agent 不要往 JSON 里填表格行。
75
94
 
76
95
  ---
77
96
 
78
- ## xlsx 版式规范
97
+ ## xlsx 版式规范(由 CLI 锁死,Agent 不必重写)
79
98
 
80
99
  工作簿 → Sheet 名(须完全一致)→ 版式。**不**单独建「广告系列」Sheet(系列表在 `账户报告` 内)。状态枚举若为英文须转中文。
81
100
 
@@ -99,7 +118,7 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
99
118
 
100
119
  | 顺序 | Sheet 名 | 数据来源 |
101
120
  | ---: | ---------- | ------------------------------------------------------------------------------------ |
102
- | 1 | `账户报告` | `campaigns` + 复盘文案(stats/overview 汇总后 Agent 撰写) |
121
+ | 1 | `账户报告` | `campaigns` + `narrative.review`(5 维复盘,`okki-render` 写入) |
103
122
  | 2 | `关键词` | `keywords` |
104
123
  | 3 | `搜索词` | `search-terms` |
105
124
  | 4 | `设备` | **`campaign-device-*.json`**(按系列/组拆行) |
@@ -148,7 +167,7 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
148
167
  总结:
149
168
  建议:
150
169
 
151
- 文案由 Agent 据 JSON 撰写,**不得编造**表中不存在的数字。
170
+ 文案写入 `narrative.review`(每维 `overview` / `summary` / `suggestion`),由 `okki-render` 画到账户 Sheet 底部;缺任一维会拒绝出文件。**不得编造**表中不存在的数字。
152
171
 
153
172
  ---
154
173
 
@@ -265,5 +284,5 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
265
284
  | 项 | `google-period-report.md` | 本文 OKKI 周报 |
266
285
  | -------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |
267
286
  | 默认维度 | 8 维 + 主动追问追加 | **固定** `overview,campaigns,keywords,search-terms,campaign-device,campaign-geo-matched` + `stats` + `balance` |
268
- | 输出形态 | 长文分析报告(默认 HTML) | **必产** 5 Sheet `.xlsx` + 客户话术;「表格形式」= Excel;**禁止**对话 Markdown 表 / 手写 HTML 代替 |
287
+ | 输出形态 | 长文分析报告(默认 HTML,`google-analysis render`) | **必产** 5 Sheet `.xlsx`(`google-analysis okki-render`)+ 客户话术;「表格形式」= Excel;**禁止**对话 Markdown 表 / 手写 HTML / Agent 手写 xlsx |
269
288
  | 典型用户 | 内部分析 | **发客户**的同步简报 |
@@ -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.48'
12
+ $PKG_VERSION = '1.1.49-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.48"
12
+ readonly PKG_VERSION="1.1.49-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
@@ -33,7 +33,7 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
33
33
 
34
34
  **returnSchema**: 仅回传 exitCode、manifestFile、writtenFiles、outlineFiles、stderrTail、summary(无编造数字)。
35
35
 
36
- ## 阶段 B · 写 xlsx(委派本阶段时使用)
36
+ ## 阶段 B · 写叙事 JSON + okki-render(委派本阶段时使用)
37
37
 
38
38
  **snapDir**: 同上(拉数已完成)
39
39
 
@@ -41,11 +41,20 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
41
41
 
42
42
  - 禁止在脚本中写死业务数字;数值只来自落盘 JSON
43
43
  - 禁止跳过 outline;先读 `*.outline.txt` 再读 JSON
44
+ - 禁止 Agent 手写 / 脚本写 xlsx;必须走 `google-analysis okki-render`
44
45
 
45
46
  **任务**:
46
47
 
47
- 1. Read `report-templates/okki-weekly-google-client.md` 中 xlsx 版式与 **§对外客户话术**(默认 7 条模板;主 Agent 若指定自定义话术则从其指示)。
48
- 2. 编写并执行 Node/Python 脚本,产出 `.xlsx` + 客户话术;**每个 Sheet 数据表末须写「分析」**(总结 + 建议,见模板各 Sheet「表末「分析」」行)。**禁止**只交 Markdown 表或手写 HTML;没有 `.xlsx` 路径 = 本阶段失败。
49
- 3. 设备/国家 Sheet 必须用 `campaign-device` / `campaign-geo-matched` 落盘文件。
50
-
51
- **returnSchema**: 产出文件路径列表 + 脚本 exitCode;勿贴 xlsx 二进制内容。
48
+ 1. Read `report-templates/okki-weekly-google-client.md` 中 **§标准四步流程** 与 **§对外客户话术**(默认 7 条模板;主 Agent 若指定自定义话术则从其指示)。
49
+ 2. 按 `assets/okki-weekly-report.schema.json` 写 `okki-weekly-report.json`:只填 `meta` + `narrative.sheetAnalysis`(5 Sheet,各 summary≥1 / suggestions≥1)+ `narrative.review`(固定 5 维:账户/关键词/搜索字词/设备/国家,每维 overview+summary+suggestion)。表为空也须写分析。
50
+ 3. 执行:
51
+ ```bash
52
+ siluzan-tso google-analysis okki-render \
53
+ --data ./okki-weekly-report.json \
54
+ --snapshot-dir <snapDir> \
55
+ --out ./okki-weekly-report.xlsx
56
+ ```
57
+ 失败则按 stderr 补 JSON 后重跑,不得改用手写表。
58
+ 4. 设备/国家必须来自 `campaign-device` / `campaign-geo-matched`(由 render 校验)。
59
+
60
+ **returnSchema**: xlsx 路径 + `okki-render` exitCode + 客户话术文本;勿贴 xlsx 二进制。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siluzan-tso-cli",
3
- "version": "1.1.48",
3
+ "version": "1.1.49-beta.2",
4
4
  "description": "Siluzan 广告账户管理 CLI — 查询账户、余额、消耗数据,管理绑定关系与充值。",
5
5
  "keywords": [
6
6
  "ad-account",