siluzan-cso-cli 1.1.24-beta.1 → 1.1.24-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ siluzan-cso init -d /path/to/skills # 写入自定义目录
|
|
|
54
54
|
siluzan-cso init --force # 强制覆盖已存在文件
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
> **注意**:当前为测试版(1.1.24-beta.
|
|
57
|
+
> **注意**:当前为测试版(1.1.24-beta.2),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-cso-cli`。
|
|
58
58
|
|
|
59
59
|
| 助手 | 建议 `--ai` |
|
|
60
60
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -5855,7 +5855,7 @@ async function runPlanningEnterprises(options) {
|
|
|
5855
5855
|
return;
|
|
5856
5856
|
}
|
|
5857
5857
|
const columns = [
|
|
5858
|
-
{ key: "id", header: "\u4F01\u4E1AID" },
|
|
5858
|
+
{ key: "id", header: "\u77E5\u8BC6\u5E93\u4F01\u4E1AID" },
|
|
5859
5859
|
{ key: "name", header: "\u4F01\u4E1A\u540D\u79F0" }
|
|
5860
5860
|
];
|
|
5861
5861
|
const rows = enterprises.map((item) => ({ id: item.id, name: item.name || "-" }));
|
|
@@ -5897,6 +5897,10 @@ function buildGenerateRequest(options) {
|
|
|
5897
5897
|
if (!enterpriseId) {
|
|
5898
5898
|
exitWithError2("--enterprise-id \u4E0D\u80FD\u4E3A\u7A7A");
|
|
5899
5899
|
}
|
|
5900
|
+
const enterpriseName = String(options.enterpriseName ?? "").trim();
|
|
5901
|
+
if (!enterpriseName) {
|
|
5902
|
+
exitWithError2("--enterprise-name \u4E0D\u80FD\u4E3A\u7A7A");
|
|
5903
|
+
}
|
|
5900
5904
|
const yearMonth = ensureYearMonth(options.yearMonth, "--year-month");
|
|
5901
5905
|
const contentTypes = ensureContentTypes(options.contentTypes);
|
|
5902
5906
|
const partnershipTotalMonths = ensurePartnershipTotalMonths(options.partnershipTotalMonths);
|
|
@@ -5905,7 +5909,7 @@ function buildGenerateRequest(options) {
|
|
|
5905
5909
|
const partnershipStartYearMonth = startYmRaw ? ensureYearMonth(startYmRaw, "--partnership-start-year-month") : void 0;
|
|
5906
5910
|
return {
|
|
5907
5911
|
enterpriseIds: [enterpriseId],
|
|
5908
|
-
enterpriseName
|
|
5912
|
+
enterpriseName,
|
|
5909
5913
|
yearMonth,
|
|
5910
5914
|
contentTypes,
|
|
5911
5915
|
partnershipTotalMonths,
|
|
@@ -7849,7 +7853,10 @@ function registerCsoCommands(program2) {
|
|
|
7849
7853
|
await runReportDownload(opts);
|
|
7850
7854
|
});
|
|
7851
7855
|
const planningCmd = program2.command("planning").description("AI \u5185\u5BB9\u89C4\u5212\uFF08planning\uFF09\uFF1A\u4F01\u4E1A\u5217\u8868\u3001\u5185\u5BB9\u7C7B\u578B\u3001\u751F\u6210\u3001\u4EFB\u52A1\u7BA1\u7406\u3001\u8BE6\u60C5\u4E0E\u5BFC\u51FA");
|
|
7852
|
-
planningCmd.command("enterprises").description("\u67E5\u8BE2\u4F01\u4E1A\u76EE\u5F55\uFF08cutapi querylist\uFF0C\u4F9B\u89C4\u5212\u751F\u6210\u65F6\u9009\u62E9\u4F01\u4E1A\uFF09").option(
|
|
7856
|
+
planningCmd.command("enterprises").description("\u67E5\u8BE2\u4F01\u4E1A\u76EE\u5F55\uFF08cutapi querylist\uFF0C\u4F9B\u89C4\u5212\u751F\u6210\u65F6\u9009\u62E9\u4F01\u4E1A\uFF09").option(
|
|
7857
|
+
"--belong-to-id <id>",
|
|
7858
|
+
"\u7EC4\u7EC7\u5F52\u5C5E ID\uFF08companyId\uFF0C\u4EC5\u7528\u4E8E\u7B5B\u9009\u4F01\u4E1A\u76EE\u5F55\uFF1B\u4E0D\u53EF\u4F5C\u4E3A generate \u7684 --enterprise-id\uFF09"
|
|
7859
|
+
).option("--page-size <number>", "\u76EE\u5F55\u67E5\u8BE2\u6761\u6570\uFF08\u9ED8\u8BA4 100\uFF09").option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA JSON", false).option("--unicode", "\u4F7F\u7528 Unicode \u7EBF\u6846\u8868\u683C\uFF08\u9ED8\u8BA4 ASCII\uFF09", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
|
|
7853
7860
|
async (opts) => {
|
|
7854
7861
|
await runPlanningEnterprises(opts);
|
|
7855
7862
|
}
|
|
@@ -7859,7 +7866,13 @@ function registerCsoCommands(program2) {
|
|
|
7859
7866
|
await runPlanningContentTypes(opts);
|
|
7860
7867
|
}
|
|
7861
7868
|
);
|
|
7862
|
-
planningCmd.command("generate").description("\u521B\u5EFA\u89C4\u5212\u751F\u6210\u4EFB\u52A1\uFF08\u5BF9\u5E94 planning \u751F\u6210\u5F39\u7A97\uFF09").requiredOption(
|
|
7869
|
+
planningCmd.command("generate").description("\u521B\u5EFA\u89C4\u5212\u751F\u6210\u4EFB\u52A1\uFF08\u5BF9\u5E94 planning \u751F\u6210\u5F39\u7A97\uFF09").requiredOption(
|
|
7870
|
+
"--enterprise-id <id>",
|
|
7871
|
+
"\u77E5\u8BC6\u5E93\u4F01\u4E1A ID\uFF08\u987B\u4E3A planning enterprises \u8FD4\u56DE\u7684 id\uFF0C\u4E0D\u662F --belong-to-id\uFF09"
|
|
7872
|
+
).requiredOption(
|
|
7873
|
+
"--enterprise-name <name>",
|
|
7874
|
+
"\u4F01\u4E1A\u540D\u79F0\uFF08\u987B\u4E3A planning enterprises \u8FD4\u56DE\u7684 name\uFF09"
|
|
7875
|
+
).requiredOption("--year-month <YYYY-MM>", "\u89C4\u5212\u6708\u4EFD").requiredOption("--content-types <types...>", "\u5185\u5BB9\u7C7B\u578B\uFF0C\u652F\u6301\u9017\u53F7\u6216\u7A7A\u683C\uFF1Apost,video").option("--partnership-total-months <6|12|24>", "\u5408\u4F5C\u603B\u6708\u6570\uFF08\u9ED8\u8BA4 12\uFF09", "12").option("--partnership-start-year-month <YYYY-MM>", "\u5408\u4F5C\u5F00\u59CB\u6708\u4EFD\uFF08\u4E0E\u89C4\u5212\u6708\u4E0D\u540C\u624D\u4F1A\u4F20\u7ED9\u63A5\u53E3\uFF09").option("--freq-unit <week|month>", "\u9891\u6B21\u5355\u4F4D").option("--freq-count <number>", "\u9891\u6B21\u6570\u91CF\uFF08\u4E0E --freq-unit \u540C\u65F6\u63D0\u4F9B\uFF09").option("--marketing-goal <text>", "\u672C\u6708\u89C4\u5212\u91CD\u70B9\uFF1A\u8425\u9500\u76EE\u6807").option("--key-products <text>", "\u672C\u6708\u89C4\u5212\u91CD\u70B9\uFF1A\u6838\u5FC3\u4EA7\u54C1").option(
|
|
7863
7876
|
"--target-markets <markets...>",
|
|
7864
7877
|
"\u76EE\u6807\u5E02\u573A\uFF1A\u5168\u7403\uFF08\u5355\u72EC\uFF09\u6216 \u4E2D\u4E9A/\u975E\u6D32/\u62C9\u7F8E/\u4E2D\u4E1C/\u72EC\u8054\u4F53/\u4E1C\u5357\u4E9A\uFF08\u53EF\u591A\u9009\uFF0C\u4E0D\u53EF\u4E0E\u5168\u7403\u540C\u9009\uFF09"
|
|
7865
7878
|
).option("--key-events <text>", "\u672C\u6708\u89C4\u5212\u91CD\u70B9\uFF1A\u5173\u952E\u8282\u70B9").option("--content-tone <text>", "\u672C\u6708\u89C4\u5212\u91CD\u70B9\uFF1A\u5185\u5BB9\u8BED\u8C03").option("--watch", "\u63D0\u4EA4\u540E\u76D1\u542C\u4EFB\u52A1\u76F4\u5230\u5B8C\u6210/\u5931\u8D25", false).option("--watch-timeout <seconds>", "\u76D1\u542C\u8D85\u65F6\u79D2\u6570\uFF08\u9ED8\u8BA4 300 \u79D2\uFF09").option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA JSON", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
|
|
@@ -7867,7 +7880,10 @@ function registerCsoCommands(program2) {
|
|
|
7867
7880
|
await runPlanningGenerate(opts);
|
|
7868
7881
|
}
|
|
7869
7882
|
);
|
|
7870
|
-
planningCmd.command("list").description("\u67E5\u8BE2\u89C4\u5212\u4EFB\u52A1\u5217\u8868\uFF08\u652F\u6301\u4F01\u4E1A/\u6708\u5EA6\u7B5B\u9009\u4E0E\u5206\u9875\uFF09").option(
|
|
7883
|
+
planningCmd.command("list").description("\u67E5\u8BE2\u89C4\u5212\u4EFB\u52A1\u5217\u8868\uFF08\u652F\u6301\u4F01\u4E1A/\u6708\u5EA6\u7B5B\u9009\u4E0E\u5206\u9875\uFF09").option(
|
|
7884
|
+
"--enterprise-id <id>",
|
|
7885
|
+
"\u77E5\u8BC6\u5E93\u4F01\u4E1A ID\uFF08\u987B\u4E3A planning enterprises \u8FD4\u56DE\u7684 id\uFF0C\u4E0D\u662F --belong-to-id\uFF09"
|
|
7886
|
+
).option("--year-month <YYYY-MM>", "\u89C4\u5212\u6708\u4EFD").option("--page-index <number>", "\u9875\u7801\uFF08\u9ED8\u8BA4 1\uFF09").option("--page-size <number>", "\u6BCF\u9875\u6761\u6570\uFF08\u9ED8\u8BA4 10\uFF09").option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA JSON", false).option("--unicode", "\u4F7F\u7528 Unicode \u7EBF\u6846\u8868\u683C\uFF08\u9ED8\u8BA4 ASCII\uFF09", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
|
|
7871
7887
|
async (opts) => {
|
|
7872
7888
|
await runPlanningList(opts);
|
|
7873
7889
|
}
|
package/dist/skill/_meta.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"slug": "siluzan-cso",
|
|
3
|
-
"version": "1.1.24-beta.
|
|
4
|
-
"publishedAt":
|
|
3
|
+
"version": "1.1.24-beta.2",
|
|
4
|
+
"publishedAt": 1780292582274,
|
|
5
5
|
"homepage": "https://www.siluzan.com",
|
|
6
6
|
"source": "https://dev.azure.com/jack4it/Sammamish/_git/siluzan-skill",
|
|
7
7
|
"requiredBinaries": [
|
|
@@ -12,6 +12,25 @@ enterprises → generate → watch(监控进度)→ get(查看详情)→
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## ⚠️ 两种「企业 ID」勿混用
|
|
16
|
+
|
|
17
|
+
业务上都叫「企业 ID」,CLI 里对应**两个不同字段**,混用会导致查不到企业或生成失败。
|
|
18
|
+
|
|
19
|
+
| 名称 | 出现位置 | 含义 | 用于 |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| **知识库企业 ID** | `planning enterprises` 返回的 `id` / `folders[].id` | 知识库里的企业目录 ID | `planning generate --enterprise-id`、`planning list --enterprise-id` |
|
|
22
|
+
| **组织归属 ID** | `planning enterprises --belong-to-id` | 当前登录账号所属组织(类似 RAG 的 `belongToId` / `companyId`) | **仅**查询企业目录时的筛选参数 |
|
|
23
|
+
|
|
24
|
+
**执行 generate 前必须:**
|
|
25
|
+
|
|
26
|
+
1. 先跑 `planning enterprises`(一般**不要**传 `--belong-to-id`,除非明确要按组织筛选)。
|
|
27
|
+
2. 从输出表格或 `--json` 取 **知识库企业 ID**(`id` / `folders[].id`)与 **企业名称**(`name` / `folders[].name`)。
|
|
28
|
+
3. 将二者分别填入 `planning generate --enterprise-id` 与 `--enterprise-name`。
|
|
29
|
+
|
|
30
|
+
**禁止:** 把 `--belong-to-id`、`account me` 的 `companyId`、或 RAG 用的 `belongToId` 当作 `--enterprise-id`。
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
15
34
|
## 命令速查
|
|
16
35
|
|
|
17
36
|
| 命令 | 说明 |
|
|
@@ -33,12 +52,15 @@ enterprises → generate → watch(监控进度)→ get(查看详情)→
|
|
|
33
52
|
## 示例:生成月度规划
|
|
34
53
|
|
|
35
54
|
```bash
|
|
36
|
-
# Step 1
|
|
55
|
+
# Step 1:查企业列表,从返回的 id 列(或 JSON 的 folders[].id)取知识库企业 ID
|
|
37
56
|
siluzan-cso planning enterprises
|
|
57
|
+
# 可选:按组织筛选目录(勿将此值用于 generate)
|
|
58
|
+
# siluzan-cso planning enterprises --belong-to-id <组织归属ID>
|
|
38
59
|
|
|
39
|
-
# Step 2
|
|
60
|
+
# Step 2:发起生成任务(id/name 均来自 Step 1,不是 belongToId)
|
|
40
61
|
siluzan-cso planning generate \
|
|
41
|
-
--enterprise-id <id> \
|
|
62
|
+
--enterprise-id <folders[].id> \
|
|
63
|
+
--enterprise-name "<folders[].name>" \
|
|
42
64
|
--year-month 2026-05 \
|
|
43
65
|
--content-types post,video \
|
|
44
66
|
--marketing-goal "提升品牌曝光" \
|
|
@@ -58,11 +80,32 @@ siluzan-cso planning export txt --plan-id <planId> --output plan.md
|
|
|
58
80
|
|
|
59
81
|
---
|
|
60
82
|
|
|
83
|
+
## planning enterprises — 查询企业目录
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# 默认:列出可选企业(取输出 id 用于 generate)
|
|
87
|
+
siluzan-cso planning enterprises
|
|
88
|
+
|
|
89
|
+
# JSON 输出(id 在 folders[].id)
|
|
90
|
+
siluzan-cso planning enterprises --json
|
|
91
|
+
|
|
92
|
+
# 按组织归属筛选(高级用法;该 ID 不可用于 generate)
|
|
93
|
+
siluzan-cso planning enterprises --belong-to-id <组织归属ID>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| 参数 | 说明 |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| `--belong-to-id` | 组织归属 ID(`companyId`),仅传给素材库 querylist 做筛选;**不是** generate 用的企业 ID |
|
|
99
|
+
| `--page-size` | 目录条数上限(默认 100) |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
61
103
|
## generate 主要参数
|
|
62
104
|
|
|
63
105
|
| 参数 | 必填 | 说明 |
|
|
64
106
|
| ------------------ | ---- | --------------------------------------------------- |
|
|
65
|
-
| `--enterprise-id` | ✅ |
|
|
107
|
+
| `--enterprise-id` | ✅ | 知识库企业 ID(`planning enterprises` 返回的 `id`,**不是** `--belong-to-id`) |
|
|
108
|
+
| `--enterprise-name`| ✅ | 企业名称(`planning enterprises` 返回的 `name`,须与 `--enterprise-id` 同行) |
|
|
66
109
|
| `--year-month` | ✅ | 规划月份,格式 `YYYY-MM` |
|
|
67
110
|
| `--content-types` | ✅ | 内容类型,逗号分隔:`post`(图文)/ `video`(视频) |
|
|
68
111
|
| `--marketing-goal` | — | 营销目标(自然语言描述) |
|
|
@@ -82,8 +125,8 @@ siluzan-cso planning export txt --plan-id <planId> --output plan.md
|
|
|
82
125
|
# 查所有规划任务
|
|
83
126
|
siluzan-cso planning list
|
|
84
127
|
|
|
85
|
-
#
|
|
86
|
-
siluzan-cso planning list --enterprise-id <id>
|
|
128
|
+
# 按企业筛选(同样用 enterprises 返回的 id,不是 belongToId)
|
|
129
|
+
siluzan-cso planning list --enterprise-id <folders[].id>
|
|
87
130
|
|
|
88
131
|
# 按月份筛选
|
|
89
132
|
siluzan-cso planning list --year-month 2026-05
|
|
@@ -9,7 +9,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
9
9
|
# -- Package info (injected at build time) ------------------------------------
|
|
10
10
|
$PKG_NAME = 'siluzan-cso-cli'
|
|
11
11
|
# PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
|
|
12
|
-
$PKG_VERSION = '1.1.24-beta.
|
|
12
|
+
$PKG_VERSION = '1.1.24-beta.2'
|
|
13
13
|
$CLI_BIN = 'siluzan-cso'
|
|
14
14
|
$SKILL_LABEL = 'Siluzan CSO'
|
|
15
15
|
$INSTALL_CMD = 'npm install -g siluzan-cso-cli@beta'
|
|
@@ -9,7 +9,7 @@ set -euo pipefail
|
|
|
9
9
|
# -- Package info (injected at build time) ------------------------------------
|
|
10
10
|
readonly PKG_NAME="siluzan-cso-cli"
|
|
11
11
|
# PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
|
|
12
|
-
readonly PKG_VERSION="1.1.24-beta.
|
|
12
|
+
readonly PKG_VERSION="1.1.24-beta.2"
|
|
13
13
|
readonly CLI_BIN="siluzan-cso"
|
|
14
14
|
readonly SKILL_LABEL="Siluzan CSO"
|
|
15
15
|
readonly INSTALL_CMD="npm install -g siluzan-cso-cli@beta"
|
package/package.json
CHANGED