siluzan-cso-cli 1.0.1-beta.1 → 1.0.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 +1 -2
- package/dist/index.js +17 -352
- package/dist/skill/SKILL.md +5 -27
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/publish.md +1 -1
- package/dist/skill/references/setup.md +5 -5
- package/dist/skill/references/web-pages.md +20 -20
- package/dist/skill/three-lib-content-workflow/content-writer.workflow.md +19 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
在**用户的目标项目根目录**执行(根据用户使用的助手选择 `--ai`):
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install -g siluzan-cso-cli
|
|
15
|
+
npm install -g siluzan-cso-cli
|
|
16
16
|
siluzan-cso init --ai cursor # 写入 Cursor(默认)
|
|
17
17
|
siluzan-cso init --ai cursor,claude # 同时写入多个平台
|
|
18
18
|
siluzan-cso init --ai all # 写入所有支持的平台
|
|
@@ -20,7 +20,6 @@ siluzan-cso init -d /path/to/skills # 写入自定义目录
|
|
|
20
20
|
siluzan-cso init --force # 强制覆盖已存在文件
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> **注意**:当前为测试版(1.0.1-beta.1),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-cso-cli`。
|
|
24
23
|
|
|
25
24
|
| 助手 | 建议 `--ai` |
|
|
26
25
|
|------|-------------|
|
package/dist/index.js
CHANGED
|
@@ -2786,11 +2786,11 @@ async function fetchNpmVersion(pkgName, tag, timeoutMs = 4e3) {
|
|
|
2786
2786
|
}
|
|
2787
2787
|
|
|
2788
2788
|
// src/config/defaults.ts
|
|
2789
|
-
var BUILD_ENV = "
|
|
2790
|
-
var DEFAULT_API_BASE = "https://api
|
|
2791
|
-
var DEFAULT_CSO_BASE = "https://cso
|
|
2792
|
-
var DEFAULT_WEB_BASE = "https://www
|
|
2793
|
-
var DEFAULT_AGENT_BASE = "https://agent
|
|
2789
|
+
var BUILD_ENV = "production";
|
|
2790
|
+
var DEFAULT_API_BASE = "https://api.siluzan.com";
|
|
2791
|
+
var DEFAULT_CSO_BASE = "https://cso.siluzan.com";
|
|
2792
|
+
var DEFAULT_WEB_BASE = "https://www.siluzan.com";
|
|
2793
|
+
var DEFAULT_AGENT_BASE = "https://agent.mysiluzan.com";
|
|
2794
2794
|
|
|
2795
2795
|
// src/commands/login.ts
|
|
2796
2796
|
async function runLogin(opts = {}) {
|
|
@@ -4164,7 +4164,7 @@ async function runPublish(options) {
|
|
|
4164
4164
|
currentUserId = meUser.entityId;
|
|
4165
4165
|
}
|
|
4166
4166
|
}
|
|
4167
|
-
const
|
|
4167
|
+
const now = nowUtc();
|
|
4168
4168
|
const uniqueActionId = guid();
|
|
4169
4169
|
const taskName = input.taskName ?? defaultTaskName();
|
|
4170
4170
|
const isDomestic = input.isDomesticTrade ?? false;
|
|
@@ -4203,8 +4203,8 @@ async function runPublish(options) {
|
|
|
4203
4203
|
videoType,
|
|
4204
4204
|
csoPlatformType,
|
|
4205
4205
|
publishTimeSetting: {},
|
|
4206
|
-
actionStartTime:
|
|
4207
|
-
actionStopTime:
|
|
4206
|
+
actionStartTime: now,
|
|
4207
|
+
actionStopTime: now,
|
|
4208
4208
|
version: "v3"
|
|
4209
4209
|
};
|
|
4210
4210
|
if (options.dryRun) {
|
|
@@ -5021,9 +5021,9 @@ async function runReportRecords(options) {
|
|
|
5021
5021
|
console.log();
|
|
5022
5022
|
}
|
|
5023
5023
|
function defaultDownloadPath(recordId) {
|
|
5024
|
-
const
|
|
5024
|
+
const now = /* @__PURE__ */ new Date();
|
|
5025
5025
|
const pad = (n) => String(n).padStart(2, "0");
|
|
5026
|
-
const name = `operations-report-${recordId}-${
|
|
5026
|
+
const name = `operations-report-${recordId}-${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}-${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}.pdf`;
|
|
5027
5027
|
return path8.resolve(process.cwd(), name);
|
|
5028
5028
|
}
|
|
5029
5029
|
async function downloadFile(url, output) {
|
|
@@ -5839,16 +5839,16 @@ function formatDateRange(datePreset, startDateInput, endDateInput) {
|
|
|
5839
5839
|
if (!datePreset || datePreset === "all") {
|
|
5840
5840
|
return { startDate: "", endDate: "" };
|
|
5841
5841
|
}
|
|
5842
|
-
const
|
|
5843
|
-
const start = new Date(
|
|
5844
|
-
if (datePreset === "week") start.setDate(
|
|
5845
|
-
if (datePreset === "month") start.setMonth(
|
|
5846
|
-
if (datePreset === "year") start.setFullYear(
|
|
5842
|
+
const now = /* @__PURE__ */ new Date();
|
|
5843
|
+
const start = new Date(now);
|
|
5844
|
+
if (datePreset === "week") start.setDate(now.getDate() - 7);
|
|
5845
|
+
if (datePreset === "month") start.setMonth(now.getMonth() - 1);
|
|
5846
|
+
if (datePreset === "year") start.setFullYear(now.getFullYear() - 1);
|
|
5847
5847
|
const pad = (v) => String(v).padStart(2, "0");
|
|
5848
5848
|
const fmt = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
5849
5849
|
return {
|
|
5850
5850
|
startDate: `${fmt(start)} 00:00:00`,
|
|
5851
|
-
endDate: `${fmt(
|
|
5851
|
+
endDate: `${fmt(now)} 23:59:59`
|
|
5852
5852
|
};
|
|
5853
5853
|
}
|
|
5854
5854
|
function createQueryString3(query) {
|
|
@@ -6532,306 +6532,8 @@ async function runRagQuery(options) {
|
|
|
6532
6532
|
${header}${body}`);
|
|
6533
6533
|
}
|
|
6534
6534
|
|
|
6535
|
-
// src/commands/library.ts
|
|
6536
|
-
import { DatabaseSync } from "node:sqlite";
|
|
6537
|
-
import * as fs10 from "fs";
|
|
6538
|
-
import * as path10 from "path";
|
|
6539
|
-
import * as os6 from "os";
|
|
6540
|
-
var DB_DIR = path10.join(os6.homedir(), ".siluzan");
|
|
6541
|
-
var DB_PATH = path10.join(DB_DIR, "libraries.db");
|
|
6542
|
-
var TYPE_PREFIX = { traffic: "TF", product: "PA", cooking: "CK" };
|
|
6543
|
-
var TYPE_LABEL = { traffic: "\u6D41\u91CF\u56E0\u5B50\u5E93", product: "\u4EA7\u54C1\u8D44\u4EA7\u5E93", cooking: "\u70F9\u8C03\u65B9\u6CD5\u5E93" };
|
|
6544
|
-
function openDb() {
|
|
6545
|
-
fs10.mkdirSync(DB_DIR, { recursive: true });
|
|
6546
|
-
const db = new DatabaseSync(DB_PATH);
|
|
6547
|
-
initSchema(db);
|
|
6548
|
-
return db;
|
|
6549
|
-
}
|
|
6550
|
-
function initSchema(db) {
|
|
6551
|
-
db.exec(`
|
|
6552
|
-
CREATE TABLE IF NOT EXISTS library_entries (
|
|
6553
|
-
id TEXT PRIMARY KEY,
|
|
6554
|
-
library_type TEXT NOT NULL,
|
|
6555
|
-
title TEXT NOT NULL,
|
|
6556
|
-
summary TEXT,
|
|
6557
|
-
content TEXT,
|
|
6558
|
-
tags TEXT,
|
|
6559
|
-
status TEXT DEFAULT 'active',
|
|
6560
|
-
use_count INTEGER DEFAULT 0,
|
|
6561
|
-
last_used_at TEXT,
|
|
6562
|
-
effectiveness REAL,
|
|
6563
|
-
agent_notes TEXT,
|
|
6564
|
-
extra TEXT,
|
|
6565
|
-
created_at TEXT NOT NULL,
|
|
6566
|
-
updated_at TEXT NOT NULL
|
|
6567
|
-
);
|
|
6568
|
-
CREATE INDEX IF NOT EXISTS idx_lib_type ON library_entries(library_type);
|
|
6569
|
-
CREATE INDEX IF NOT EXISTS idx_lib_status ON library_entries(status);
|
|
6570
|
-
`);
|
|
6571
|
-
}
|
|
6572
|
-
function nextId(db, type) {
|
|
6573
|
-
const prefix = TYPE_PREFIX[type];
|
|
6574
|
-
const row = db.prepare(
|
|
6575
|
-
`SELECT id FROM library_entries WHERE library_type = ? ORDER BY id DESC LIMIT 1`
|
|
6576
|
-
).get(type);
|
|
6577
|
-
if (!row) return `${prefix}-0001`;
|
|
6578
|
-
const num = parseInt(row.id.split("-")[1] ?? "0", 10) + 1;
|
|
6579
|
-
return `${prefix}-${String(num).padStart(4, "0")}`;
|
|
6580
|
-
}
|
|
6581
|
-
function now() {
|
|
6582
|
-
return (/* @__PURE__ */ new Date()).toISOString();
|
|
6583
|
-
}
|
|
6584
|
-
function runLibraryInit(opts) {
|
|
6585
|
-
const db = openDb();
|
|
6586
|
-
db.close();
|
|
6587
|
-
if (opts.json) {
|
|
6588
|
-
console.log(JSON.stringify({ ok: true, path: DB_PATH }));
|
|
6589
|
-
} else {
|
|
6590
|
-
console.log(`\u2705 \u4E09\u5E93\u6570\u636E\u5E93\u5DF2\u521D\u59CB\u5316\uFF1A${DB_PATH}`);
|
|
6591
|
-
}
|
|
6592
|
-
}
|
|
6593
|
-
function runLibrarySearch(opts) {
|
|
6594
|
-
const db = openDb();
|
|
6595
|
-
const q = `%${opts.query}%`;
|
|
6596
|
-
const limit = opts.limit ?? 10;
|
|
6597
|
-
let sql = `SELECT * FROM library_entries WHERE status != 'archived' AND (title LIKE ? OR summary LIKE ? OR content LIKE ?)`;
|
|
6598
|
-
const params = [q, q, q];
|
|
6599
|
-
if (opts.type) {
|
|
6600
|
-
sql += ` AND library_type = ?`;
|
|
6601
|
-
params.push(opts.type);
|
|
6602
|
-
}
|
|
6603
|
-
if (opts.tag) {
|
|
6604
|
-
sql += ` AND tags LIKE ?`;
|
|
6605
|
-
params.push(`%${opts.tag}%`);
|
|
6606
|
-
}
|
|
6607
|
-
sql += ` ORDER BY use_count DESC, effectiveness DESC NULLS LAST LIMIT ?`;
|
|
6608
|
-
params.push(limit);
|
|
6609
|
-
const rows = db.prepare(sql).all(...params);
|
|
6610
|
-
db.close();
|
|
6611
|
-
if (opts.json) {
|
|
6612
|
-
console.log(JSON.stringify(rows, null, 2));
|
|
6613
|
-
return;
|
|
6614
|
-
}
|
|
6615
|
-
if (rows.length === 0) {
|
|
6616
|
-
console.log("\u65E0\u5339\u914D\u7ED3\u679C");
|
|
6617
|
-
return;
|
|
6618
|
-
}
|
|
6619
|
-
printSearchResults(rows);
|
|
6620
|
-
}
|
|
6621
|
-
function runLibraryList(opts) {
|
|
6622
|
-
const db = openDb();
|
|
6623
|
-
const status = opts.status ?? "active";
|
|
6624
|
-
const sort = opts.sort ?? "created_at";
|
|
6625
|
-
const limit = opts.limit ?? 50;
|
|
6626
|
-
let sql = `SELECT * FROM library_entries WHERE status = ?`;
|
|
6627
|
-
const params = [status];
|
|
6628
|
-
if (opts.type) {
|
|
6629
|
-
sql += ` AND library_type = ?`;
|
|
6630
|
-
params.push(opts.type);
|
|
6631
|
-
}
|
|
6632
|
-
sql += ` ORDER BY ${sort} DESC LIMIT ?`;
|
|
6633
|
-
params.push(limit);
|
|
6634
|
-
const rows = db.prepare(sql).all(...params);
|
|
6635
|
-
db.close();
|
|
6636
|
-
if (opts.json) {
|
|
6637
|
-
console.log(JSON.stringify(rows, null, 2));
|
|
6638
|
-
return;
|
|
6639
|
-
}
|
|
6640
|
-
if (rows.length === 0) {
|
|
6641
|
-
console.log("\u6682\u65E0\u6761\u76EE");
|
|
6642
|
-
return;
|
|
6643
|
-
}
|
|
6644
|
-
printSearchResults(rows);
|
|
6645
|
-
}
|
|
6646
|
-
function runLibraryGet(opts) {
|
|
6647
|
-
const db = openDb();
|
|
6648
|
-
const row = db.prepare(`SELECT * FROM library_entries WHERE id = ?`).get(opts.id);
|
|
6649
|
-
db.close();
|
|
6650
|
-
if (!row) {
|
|
6651
|
-
console.error(`\u274C \u672A\u627E\u5230\u6761\u76EE\uFF1A${opts.id}`);
|
|
6652
|
-
process.exit(1);
|
|
6653
|
-
}
|
|
6654
|
-
if (opts.json) {
|
|
6655
|
-
console.log(JSON.stringify(row, null, 2));
|
|
6656
|
-
return;
|
|
6657
|
-
}
|
|
6658
|
-
console.log(`
|
|
6659
|
-
\u3010${row.id}\u3011${row.title}`);
|
|
6660
|
-
console.log(`\u5E93\uFF1A${TYPE_LABEL[row.library_type]} \u72B6\u6001\uFF1A${row.status} \u4F7F\u7528\u6B21\u6570\uFF1A${row.use_count} \u6548\u679C\u8BC4\u5206\uFF1A${row.effectiveness ?? "\u672A\u8BC4\u5206"}`);
|
|
6661
|
-
if (row.summary) console.log(`
|
|
6662
|
-
\u6458\u8981\uFF1A${row.summary}`);
|
|
6663
|
-
if (row.content) console.log(`
|
|
6664
|
-
\u5185\u5BB9\uFF1A
|
|
6665
|
-
${row.content}`);
|
|
6666
|
-
if (row.tags) {
|
|
6667
|
-
const tags = JSON.parse(row.tags);
|
|
6668
|
-
if (tags.length) console.log(`
|
|
6669
|
-
\u6807\u7B7E\uFF1A${tags.join("\u3001")}`);
|
|
6670
|
-
}
|
|
6671
|
-
if (row.agent_notes) console.log(`
|
|
6672
|
-
Agent \u7B14\u8BB0\uFF1A${row.agent_notes}`);
|
|
6673
|
-
console.log();
|
|
6674
|
-
}
|
|
6675
|
-
function runLibraryAdd(opts) {
|
|
6676
|
-
const db = openDb();
|
|
6677
|
-
const id = nextId(db, opts.type);
|
|
6678
|
-
const ts = now();
|
|
6679
|
-
const tags = opts.tags ? JSON.stringify(opts.tags.split(/[,,、]/).map((t) => t.trim()).filter(Boolean)) : null;
|
|
6680
|
-
db.prepare(`
|
|
6681
|
-
INSERT INTO library_entries (id, library_type, title, summary, content, tags, status, use_count, agent_notes, extra, created_at, updated_at)
|
|
6682
|
-
VALUES (?, ?, ?, ?, ?, ?, 'active', 0, ?, NULL, ?, ?)
|
|
6683
|
-
`).run(id, opts.type, opts.title, opts.summary ?? null, opts.content ?? null, tags, opts.notes ?? null, ts, ts);
|
|
6684
|
-
db.close();
|
|
6685
|
-
if (opts.json) {
|
|
6686
|
-
console.log(JSON.stringify({ ok: true, id }));
|
|
6687
|
-
} else {
|
|
6688
|
-
console.log(`\u2705 \u5DF2\u65B0\u589E\u6761\u76EE ${id}\uFF1A${opts.title}`);
|
|
6689
|
-
}
|
|
6690
|
-
}
|
|
6691
|
-
function runLibraryUpdate(opts) {
|
|
6692
|
-
const db = openDb();
|
|
6693
|
-
const row = db.prepare(`SELECT * FROM library_entries WHERE id = ?`).get(opts.id);
|
|
6694
|
-
if (!row) {
|
|
6695
|
-
console.error(`\u274C \u672A\u627E\u5230\u6761\u76EE\uFF1A${opts.id}`);
|
|
6696
|
-
db.close();
|
|
6697
|
-
process.exit(1);
|
|
6698
|
-
}
|
|
6699
|
-
const sets = [];
|
|
6700
|
-
const params = [];
|
|
6701
|
-
if (opts.title !== void 0) {
|
|
6702
|
-
sets.push("title = ?");
|
|
6703
|
-
params.push(opts.title);
|
|
6704
|
-
}
|
|
6705
|
-
if (opts.summary !== void 0) {
|
|
6706
|
-
sets.push("summary = ?");
|
|
6707
|
-
params.push(opts.summary);
|
|
6708
|
-
}
|
|
6709
|
-
if (opts.content !== void 0) {
|
|
6710
|
-
sets.push("content = ?");
|
|
6711
|
-
params.push(opts.content);
|
|
6712
|
-
}
|
|
6713
|
-
if (opts.tags !== void 0) {
|
|
6714
|
-
const tags = JSON.stringify(opts.tags.split(/[,,、]/).map((t) => t.trim()).filter(Boolean));
|
|
6715
|
-
sets.push("tags = ?");
|
|
6716
|
-
params.push(tags);
|
|
6717
|
-
}
|
|
6718
|
-
if (opts.status !== void 0) {
|
|
6719
|
-
sets.push("status = ?");
|
|
6720
|
-
params.push(opts.status);
|
|
6721
|
-
}
|
|
6722
|
-
if (opts.score !== void 0) {
|
|
6723
|
-
sets.push("effectiveness = ?");
|
|
6724
|
-
params.push(parseFloat(opts.score));
|
|
6725
|
-
}
|
|
6726
|
-
if (opts.notes !== void 0) {
|
|
6727
|
-
sets.push("agent_notes = ?");
|
|
6728
|
-
params.push(opts.notes);
|
|
6729
|
-
}
|
|
6730
|
-
if (sets.length === 0) {
|
|
6731
|
-
console.log("\u65E0\u9700\u66F4\u65B0");
|
|
6732
|
-
db.close();
|
|
6733
|
-
return;
|
|
6734
|
-
}
|
|
6735
|
-
sets.push("updated_at = ?");
|
|
6736
|
-
params.push(now());
|
|
6737
|
-
params.push(opts.id);
|
|
6738
|
-
db.prepare(`UPDATE library_entries SET ${sets.join(", ")} WHERE id = ?`).run(...params);
|
|
6739
|
-
db.close();
|
|
6740
|
-
if (opts.json) {
|
|
6741
|
-
console.log(JSON.stringify({ ok: true, id: opts.id, updated: sets.length - 1 }));
|
|
6742
|
-
} else {
|
|
6743
|
-
console.log(`\u2705 \u5DF2\u66F4\u65B0\u6761\u76EE ${opts.id}`);
|
|
6744
|
-
}
|
|
6745
|
-
}
|
|
6746
|
-
function runLibraryUse(opts) {
|
|
6747
|
-
const db = openDb();
|
|
6748
|
-
const row = db.prepare(`SELECT id FROM library_entries WHERE id = ?`).get(opts.id);
|
|
6749
|
-
if (!row) {
|
|
6750
|
-
console.error(`\u274C \u672A\u627E\u5230\u6761\u76EE\uFF1A${opts.id}`);
|
|
6751
|
-
db.close();
|
|
6752
|
-
process.exit(1);
|
|
6753
|
-
}
|
|
6754
|
-
db.prepare(`UPDATE library_entries SET use_count = use_count + 1, last_used_at = ?, updated_at = ? WHERE id = ?`).run(now(), now(), opts.id);
|
|
6755
|
-
db.close();
|
|
6756
|
-
if (opts.json) {
|
|
6757
|
-
console.log(JSON.stringify({ ok: true, id: opts.id }));
|
|
6758
|
-
} else {
|
|
6759
|
-
console.log(`\u2705 \u5DF2\u8BB0\u5F55\u4F7F\u7528\uFF1A${opts.id}`);
|
|
6760
|
-
}
|
|
6761
|
-
}
|
|
6762
|
-
function runLibraryRetire(opts) {
|
|
6763
|
-
const db = openDb();
|
|
6764
|
-
const row = db.prepare(`SELECT id FROM library_entries WHERE id = ?`).get(opts.id);
|
|
6765
|
-
if (!row) {
|
|
6766
|
-
console.error(`\u274C \u672A\u627E\u5230\u6761\u76EE\uFF1A${opts.id}`);
|
|
6767
|
-
db.close();
|
|
6768
|
-
process.exit(1);
|
|
6769
|
-
}
|
|
6770
|
-
const ts = now();
|
|
6771
|
-
const notes = opts.reason ? `[\u5F52\u6863] ${opts.reason}` : "[\u5F52\u6863]";
|
|
6772
|
-
db.prepare(`UPDATE library_entries SET status = 'archived', agent_notes = ?, updated_at = ? WHERE id = ?`).run(notes, ts, opts.id);
|
|
6773
|
-
db.close();
|
|
6774
|
-
if (opts.json) {
|
|
6775
|
-
console.log(JSON.stringify({ ok: true, id: opts.id, status: "archived" }));
|
|
6776
|
-
} else {
|
|
6777
|
-
console.log(`\u2705 \u5DF2\u5F52\u6863\u6761\u76EE ${opts.id}${opts.reason ? `\uFF08\u539F\u56E0\uFF1A${opts.reason}\uFF09` : ""}`);
|
|
6778
|
-
}
|
|
6779
|
-
}
|
|
6780
|
-
function runLibraryStats(opts) {
|
|
6781
|
-
const db = openDb();
|
|
6782
|
-
let typeFilter = opts.type ? `AND library_type = '${opts.type}'` : "";
|
|
6783
|
-
const total = db.prepare(`SELECT COUNT(*) as n FROM library_entries WHERE status = 'active' ${typeFilter}`).get().n;
|
|
6784
|
-
const archived = db.prepare(`SELECT COUNT(*) as n FROM library_entries WHERE status = 'archived' ${typeFilter}`).get().n;
|
|
6785
|
-
const topUsed = db.prepare(`SELECT id, title, library_type, use_count FROM library_entries WHERE status = 'active' ${typeFilter} ORDER BY use_count DESC LIMIT 5`).all();
|
|
6786
|
-
const topEffective = db.prepare(`SELECT id, title, library_type, effectiveness FROM library_entries WHERE status = 'active' AND effectiveness IS NOT NULL ${typeFilter} ORDER BY effectiveness DESC LIMIT 5`).all();
|
|
6787
|
-
const unused = db.prepare(`SELECT id, title, library_type FROM library_entries WHERE status = 'active' AND use_count = 0 ${typeFilter} LIMIT 10`).all();
|
|
6788
|
-
const byType = db.prepare(`SELECT library_type, COUNT(*) as n FROM library_entries WHERE status = 'active' ${typeFilter} GROUP BY library_type`).all();
|
|
6789
|
-
db.close();
|
|
6790
|
-
if (opts.json) {
|
|
6791
|
-
console.log(JSON.stringify({ total, archived, byType, topUsed, topEffective, unused }, null, 2));
|
|
6792
|
-
return;
|
|
6793
|
-
}
|
|
6794
|
-
console.log(`
|
|
6795
|
-
\u{1F4CA} \u4E09\u5E93\u7EDF\u8BA1${opts.type ? `\uFF08${TYPE_LABEL[opts.type]}\uFF09` : ""}`);
|
|
6796
|
-
console.log(` \u6D3B\u8DC3\u6761\u76EE\uFF1A${total} \u5DF2\u5F52\u6863\uFF1A${archived}`);
|
|
6797
|
-
if (byType.length) {
|
|
6798
|
-
console.log("\n \u5404\u5E93\u5206\u5E03\uFF1A");
|
|
6799
|
-
for (const r of byType) console.log(` \xB7 ${TYPE_LABEL[r.library_type]}\uFF1A${r.n} \u6761`);
|
|
6800
|
-
}
|
|
6801
|
-
if (topUsed.length) {
|
|
6802
|
-
console.log("\n \u{1F525} \u4F7F\u7528\u6700\u591A\uFF08Top 5\uFF09\uFF1A");
|
|
6803
|
-
for (const r of topUsed) console.log(` \xB7 [${r.id}] ${r.title}\uFF08${r.use_count} \u6B21\uFF09`);
|
|
6804
|
-
}
|
|
6805
|
-
if (topEffective.length) {
|
|
6806
|
-
console.log("\n \u2B50 \u6548\u679C\u6700\u4F73\uFF08Top 5\uFF09\uFF1A");
|
|
6807
|
-
for (const r of topEffective) console.log(` \xB7 [${r.id}] ${r.title}\uFF08${(r.effectiveness * 100).toFixed(0)}%\uFF09`);
|
|
6808
|
-
}
|
|
6809
|
-
if (unused.length) {
|
|
6810
|
-
console.log(`
|
|
6811
|
-
\u{1F4A4} \u4ECE\u672A\u4F7F\u7528\uFF08${unused.length} \u6761\uFF0C\u5EFA\u8BAE\u68C0\u67E5\u6216\u5F52\u6863\uFF09\uFF1A`);
|
|
6812
|
-
for (const r of unused) console.log(` \xB7 [${r.id}] ${r.title}`);
|
|
6813
|
-
}
|
|
6814
|
-
console.log();
|
|
6815
|
-
}
|
|
6816
|
-
function printSearchResults(rows) {
|
|
6817
|
-
console.log(`
|
|
6818
|
-
\u5171 ${rows.length} \u6761\u7ED3\u679C\uFF1A
|
|
6819
|
-
`);
|
|
6820
|
-
for (const r of rows) {
|
|
6821
|
-
const score = r.effectiveness !== null ? ` | \u6548\u679C ${(r.effectiveness * 100).toFixed(0)}%` : "";
|
|
6822
|
-
const used = r.use_count > 0 ? ` | \u4F7F\u7528 ${r.use_count} \u6B21` : "";
|
|
6823
|
-
console.log(`\u3010${r.id}\u3011${r.title} (${TYPE_LABEL[r.library_type]}${score}${used})`);
|
|
6824
|
-
if (r.summary) console.log(` ${r.summary}`);
|
|
6825
|
-
if (r.tags) {
|
|
6826
|
-
const tags = JSON.parse(r.tags);
|
|
6827
|
-
if (tags.length) console.log(` \u6807\u7B7E\uFF1A${tags.slice(0, 6).join("\u3001")}`);
|
|
6828
|
-
}
|
|
6829
|
-
console.log();
|
|
6830
|
-
}
|
|
6831
|
-
}
|
|
6832
|
-
|
|
6833
6535
|
// src/commands/config.ts
|
|
6834
|
-
import * as
|
|
6536
|
+
import * as fs10 from "fs";
|
|
6835
6537
|
function cmdConfigShow() {
|
|
6836
6538
|
const shared = readSharedConfig();
|
|
6837
6539
|
if (!shared.authToken && !shared.apiKey) {
|
|
@@ -7022,43 +6724,6 @@ personaCmd.command("list").description("\u62C9\u53D6\u4EBA\u8BBE\u5217\u8868\uFF
|
|
|
7022
6724
|
verbose: opts.verbose
|
|
7023
6725
|
});
|
|
7024
6726
|
});
|
|
7025
|
-
var libraryCmd = program.command("library").description("\u4E09\u5E93\u672C\u5730 SQLite \u7BA1\u7406\uFF08~/.siluzan/libraries.db\uFF09\uFF1A\u521D\u59CB\u5316\u3001\u5BFC\u5165\u3001\u68C0\u7D22\u3001Agent \u81EA\u7EF4\u62A4");
|
|
7026
|
-
libraryCmd.command("init").description("\u521D\u59CB\u5316\u4E09\u5E93\u6570\u636E\u5E93\uFF08~/.siluzan/libraries.db\uFF09\uFF0C\u5DF2\u5B58\u5728\u65F6\u8DF3\u8FC7").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((opts) => runLibraryInit(opts));
|
|
7027
|
-
libraryCmd.command("search").description("\u5168\u6587\u68C0\u7D22\u4E09\u5E93\u6761\u76EE\uFF08title + summary + content\uFF09").requiredOption("-q, --query <text>", "\u68C0\u7D22\u5173\u952E\u8BCD").option("--type <traffic|product|cooking>", "\u9650\u5B9A\u5E93\u7C7B\u578B").option("--tag <tag>", "\u6309\u6807\u7B7E\u8FC7\u6EE4").option("--limit <n>", "\u8FD4\u56DE\u6761\u6570\uFF08\u9ED8\u8BA4 10\uFF09", "10").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((opts) => {
|
|
7028
|
-
runLibrarySearch({
|
|
7029
|
-
query: opts.query,
|
|
7030
|
-
type: opts.type,
|
|
7031
|
-
tag: opts.tag,
|
|
7032
|
-
limit: opts.limit ? parseInt(opts.limit, 10) : void 0,
|
|
7033
|
-
json: opts.json
|
|
7034
|
-
});
|
|
7035
|
-
});
|
|
7036
|
-
libraryCmd.command("list").description("\u5217\u51FA\u4E09\u5E93\u6761\u76EE\uFF08\u53EF\u6309\u5E93\u7C7B\u578B/\u72B6\u6001/\u6392\u5E8F\u7B5B\u9009\uFF09").option("--type <traffic|product|cooking>", "\u9650\u5B9A\u5E93\u7C7B\u578B").option("--status <active|archived|draft>", "\u72B6\u6001\uFF08\u9ED8\u8BA4 active\uFF09", "active").option("--sort <use_count|effectiveness|created_at>", "\u6392\u5E8F\u5B57\u6BB5\uFF08\u9ED8\u8BA4 created_at\uFF09", "created_at").option("--limit <n>", "\u8FD4\u56DE\u6761\u6570\uFF08\u9ED8\u8BA4 50\uFF09", "50").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((opts) => {
|
|
7037
|
-
runLibraryList({
|
|
7038
|
-
type: opts.type,
|
|
7039
|
-
status: opts.status,
|
|
7040
|
-
sort: opts.sort,
|
|
7041
|
-
limit: opts.limit ? parseInt(opts.limit, 10) : void 0,
|
|
7042
|
-
json: opts.json
|
|
7043
|
-
});
|
|
7044
|
-
});
|
|
7045
|
-
libraryCmd.command("get").description("\u67E5\u770B\u5355\u6761\u5B8C\u6574\u5185\u5BB9").argument("<id>", "\u6761\u76EE ID\uFF0C\u5982 TF-0001 / PA-0001 / CK-0001").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((id, opts) => runLibraryGet({ id, ...opts }));
|
|
7046
|
-
libraryCmd.command("add").description("\u65B0\u589E\u6761\u76EE\uFF08Agent \u53D1\u73B0\u65B0\u89C4\u5F8B\u65F6\u8C03\u7528\uFF09").requiredOption("--type <traffic|product|cooking>", "\u5E93\u7C7B\u578B").requiredOption("--title <text>", "\u6761\u76EE\u6807\u9898").option("--summary <text>", "\u4E00\u53E5\u8BDD\u6458\u8981").option("--content <text>", "\u5B8C\u6574\u5185\u5BB9").option("--tags <tags>", "\u6807\u7B7E\uFF0C\u9017\u53F7\u5206\u9694").option("--notes <text>", "Agent \u521D\u59CB\u7B14\u8BB0").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((opts) => {
|
|
7047
|
-
const t = opts.type;
|
|
7048
|
-
if (!["traffic", "product", "cooking"].includes(t)) {
|
|
7049
|
-
console.error("\u274C --type \u5FC5\u987B\u4E3A traffic / product / cooking");
|
|
7050
|
-
process.exit(1);
|
|
7051
|
-
}
|
|
7052
|
-
runLibraryAdd({ ...opts, type: t });
|
|
7053
|
-
});
|
|
7054
|
-
libraryCmd.command("update").description("\u66F4\u65B0\u6761\u76EE\u5185\u5BB9\u3001\u8BC4\u5206\u6216 Agent \u7B14\u8BB0\uFF08\u81EA\u6211\u4F18\u5316\u6838\u5FC3\u64CD\u4F5C\uFF09").argument("<id>", "\u6761\u76EE ID").option("--title <text>", "\u65B0\u6807\u9898").option("--summary <text>", "\u65B0\u6458\u8981").option("--content <text>", "\u65B0\u5185\u5BB9").option("--tags <tags>", "\u65B0\u6807\u7B7E\uFF0C\u9017\u53F7\u5206\u9694\uFF08\u8986\u76D6\u5168\u90E8\uFF09").option("--status <active|archived|draft>", "\u65B0\u72B6\u6001").option("--score <0-1>", "\u6548\u679C\u8BC4\u5206 0.0\u20131.0\uFF08Agent \u5728\u6210\u7A3F\u540E\u8BC4\u4EF7\uFF09").option("--notes <text>", "Agent \u7B14\u8BB0\uFF08\u8FFD\u52A0\u6216\u8986\u76D6\uFF09").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((id, opts) => {
|
|
7055
|
-
runLibraryUpdate({ id, ...opts, status: opts.status });
|
|
7056
|
-
});
|
|
7057
|
-
libraryCmd.command("use").description("\u6807\u8BB0\u6761\u76EE\u5DF2\u88AB\u5F15\u7528\uFF08\u7D2F\u8BA1 use_count\uFF0CAgent \u6BCF\u6B21\u5F15\u7528\u65F6\u8C03\u7528\uFF09").argument("<id>", "\u6761\u76EE ID").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((id, opts) => runLibraryUse({ id, ...opts }));
|
|
7058
|
-
libraryCmd.command("retire").description("\u5F52\u6863\u5931\u6548\u6761\u76EE\uFF08Agent \u53D1\u73B0\u67D0\u6761\u76EE\u6301\u7EED\u8868\u73B0\u4E0D\u4F73\u65F6\u8C03\u7528\uFF09").argument("<id>", "\u6761\u76EE ID").option("--reason <text>", "\u5F52\u6863\u539F\u56E0\uFF08\u5199\u5165 agent_notes\uFF09").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((id, opts) => runLibraryRetire({ id, ...opts }));
|
|
7059
|
-
libraryCmd.command("stats").description("\u4E09\u5E93\u4F7F\u7528\u7EDF\u8BA1\uFF1A\u6761\u76EE\u6570\u3001\u9AD8\u9891\u6761\u76EE\u3001\u9AD8\u6548\u6761\u76EE\u3001\u4ECE\u672A\u4F7F\u7528\u6761\u76EE").option("--type <traffic|product|cooking>", "\u9650\u5B9A\u5E93\u7C7B\u578B").option("--json", "\u4EE5 JSON \u8F93\u51FA", false).action((opts) => {
|
|
7060
|
-
runLibraryStats({ type: opts.type, json: opts.json });
|
|
7061
|
-
});
|
|
7062
6727
|
var ragCmd = program.command("rag").description("RAG \u77E5\u8BC6\u5E93\u68C0\u7D22\uFF08\u4EC5\u5199\u7A3F/\u4E09\u5E93\uFF1B\u9ED8\u8BA4 belongToId=account/me \u7684 companyId\uFF0C\u9ED8\u8BA4 tags=\u4E09\u5E93\uFF09");
|
|
7063
6728
|
ragCmd.command("query").description("\u6309\u5173\u952E\u8BCD\u68C0\u7D22\u5DF2\u7EB3\u5165\u5411\u91CF\u7684\u77E5\u8BC6\u7247\u6BB5\uFF08GET cutapi/v1/material/queryknowledges\uFF09").requiredOption("-q, --query <text>", "\u68C0\u7D22\u5173\u952E\u8BCD\u6216\u95EE\u53E5").option(
|
|
7064
6729
|
"--belong-to-id <id>",
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: siluzan-cso
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
当用户提问的内容涉及以下内容时,可以使用本SKILL
|
|
5
|
+
(1)多媒体平台内容(视频/图文)发布与运营(YouTube、TikTok、Instagram、LinkedIn、X、视频号),以及账号授权、数据报表、任务管理;
|
|
6
|
+
(2)公众号,小红薯等内容文案/选题生成——选题/拆解/口播成稿,三库选题。
|
|
5
7
|
compatibility: Requires siluzan-cso-cli installed and authenticated via `siluzan-cso login`
|
|
6
|
-
metadata:
|
|
7
|
-
description_en: >-
|
|
8
|
-
Assist with Siluzan CSO: (1) Multi-platform publishing & ops (YouTube, TikTok, Instagram, LinkedIn, X, WeChat Video), account auth, reports, task management; (2) Content copywriting via the three-library workflow (topic selection, analysis, scripting). Activate when user mentions video publishing, account management, copywriting, RAG retrieval, persona style guides, or siluzan-cso commands.
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# siluzan-cso
|
|
@@ -59,28 +58,7 @@ metadata:
|
|
|
59
58
|
| 需要给用户提供后台页面链接 | `references/web-pages.md` |
|
|
60
59
|
| 拉取人设 / styleGuide(写稿前) | `references/persona.md` |
|
|
61
60
|
| 写稿时检索素材库 RAG 片段(三库拆素材等) | `references/rag.md` |
|
|
62
|
-
| 选题 / 三库拆解 /
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## 三库内容工作流(选题 · 人设 · 口播)
|
|
67
|
-
|
|
68
|
-
用于「把热点或素材变成可复用内容流程」:三库、文案 SOP、协作规则、反推人设等。**成稿后若需发布,仍走上方命令索引与 references。**
|
|
69
|
-
|
|
70
|
-
- **人设**:写稿前必须先拉取平台人设的 `styleGuide`,详见 [`references/persona.md`](references/persona.md)。
|
|
71
|
-
- **RAG**:仅用于写稿与三库流程(拆素材等),详见 [`references/rag.md`](references/rag.md)。
|
|
72
|
-
|
|
73
|
-
### 执行流程
|
|
74
|
-
|
|
75
|
-
`three-lib-content-workflow/SKILL.md` 是本流程的**目录与顺序说明**,按需读取其中各文件:
|
|
76
|
-
|
|
77
|
-
1. **人设**:`persona list --json` → 取 `styleGuide` → 对照 `three-lib-content-workflow/personas.md`(补充参考)。
|
|
78
|
-
2. **三库**:`three-lib-content-workflow/libraries.md` — 定义与召回量;`three-lib-content-workflow/collaboration.md` — 分工顺序。
|
|
79
|
-
3. **成稿**:`three-lib-content-workflow/sop.md` — 完整链路。
|
|
80
|
-
4. **反推人设(分支)**:`three-lib-content-workflow/persona-reverse-sop.md`。
|
|
81
|
-
5. **RAG(按需)**:`rag query` 检索内部知识片段,归入「拆素材」环节。
|
|
82
|
-
|
|
83
|
-
**一条线**:`persona list`(styleGuide)→ RAG(按需)→ libraries + collaboration → sop → 成稿;反推走 persona-reverse-sop。
|
|
61
|
+
| 选题 / 三库拆解 / 口播文案/其他文案 / 人设卡 / 代表作品反推人设 | `three-lib-content-workflow/content-writer.workflow.md` |
|
|
84
62
|
|
|
85
63
|
---
|
|
86
64
|
|
|
@@ -145,6 +123,6 @@ account-group ──需要 mediaCustomerId──► list-accounts
|
|
|
145
123
|
|
|
146
124
|
> 无对应 CLI 命令的模块,或需要引导用户在网页端查看数据时,查阅 `references/web-pages.md` 获取完整页面清单与链接。
|
|
147
125
|
|
|
148
|
-
URL 格式:`https://www
|
|
126
|
+
URL 格式:`https://www.siluzan.com/v3/foreign_trade/cso/{页面}`
|
|
149
127
|
|
|
150
128
|
常用页面:`task`(任务管理)· `postVideo`(发布页)· `ManageAccounts`(账号管理)· `planning`(AI 内容规划)· `table`(绩效报表)· `Workdata`(作品数据)
|
package/dist/skill/_meta.json
CHANGED
|
@@ -199,7 +199,7 @@ siluzan-cso publish -c publish-config.json
|
|
|
199
199
|
|
|
200
200
|
> 查询发布状态、处理失败项 → 参见 `references/task.md`
|
|
201
201
|
|
|
202
|
-
前往 CSO 任务管理页面查看进度:`https://www
|
|
202
|
+
前往 CSO 任务管理页面查看进度:`https://www.siluzan.com/v3/foreign_trade/cso/task`
|
|
203
203
|
|
|
204
204
|
---
|
|
205
205
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
## 安装 CLI
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install -g siluzan-cso-cli
|
|
6
|
+
npm install -g siluzan-cso-cli
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
环境要求:Node.js
|
|
9
|
+
环境要求:Node.js 24+
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -44,7 +44,7 @@ siluzan-cso config set --token <Token> # 备用:设置 JWT Token
|
|
|
44
44
|
|
|
45
45
|
> **⚠️ 不要使用 `config set --token <token>` 的方式。** 该方式会将 Token 明文写入 shell history(`~/.bash_history`、`~/.zsh_history`、PowerShell 历史),存在凭证泄露风险。推荐使用 `siluzan-cso login` 交互式输入。
|
|
46
46
|
|
|
47
|
-
API Key 获取入口:`https://cso
|
|
47
|
+
API Key 获取入口:`https://cso.siluzan.com/v3/foreign_trade/settings/apiKeyManagement`
|
|
48
48
|
|
|
49
49
|
**Token 读取优先级(由高到低):**
|
|
50
50
|
1. 环境变量 `SILUZAN_AUTH_TOKEN`(CI/CD 推荐)
|
|
@@ -63,8 +63,8 @@ siluzan-cso config show
|
|
|
63
63
|
输出示例:
|
|
64
64
|
```
|
|
65
65
|
构建环境 : production
|
|
66
|
-
apiBaseUrl : https://api
|
|
67
|
-
csoBaseUrl : https://cso
|
|
66
|
+
apiBaseUrl : https://api.siluzan.com
|
|
67
|
+
csoBaseUrl : https://cso.siluzan.com
|
|
68
68
|
apiKey : abcd****1234
|
|
69
69
|
```
|
|
70
70
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# web-pages — CSO 后台页面速查
|
|
2
2
|
|
|
3
3
|
> 当需要引导用户前往网页端查看数据或执行操作时,使用本文件中的页面链接。
|
|
4
|
-
> URL 格式:`https://www
|
|
4
|
+
> URL 格式:`https://www.siluzan.com/v3/foreign_trade/cso/{页面路径}`
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
| 页面 | 完整链接 | 功能说明 |
|
|
13
13
|
|------|----------|----------|
|
|
14
|
-
| 账号管理 | `https://www
|
|
15
|
-
| 账号分组 | `https://www
|
|
16
|
-
| 重点账号 | `https://www
|
|
14
|
+
| 账号管理 | `https://www.siluzan.com/v3/foreign_trade/cso/ManageAccounts` | 绑定/授权/查看媒体账号列表、账号状态、Token 到期时间 |
|
|
15
|
+
| 账号分组 | `https://www.siluzan.com/v3/foreign_trade/cso/AccountGroup` | 新建分组、管理分组内账号 |
|
|
16
|
+
| 重点账号 | `https://www.siluzan.com/v3/foreign_trade/cso/KeyAccounts` | 配置重点关注账号、数据备份 |
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
---
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
| 页面 | 完整链接 | 功能说明 |
|
|
24
24
|
|------|----------|----------|
|
|
25
|
-
| 发布作品 | `https://www
|
|
25
|
+
| 发布作品 | `https://www.siluzan.com/v3/foreign_trade/cso/postVideo?contentType=1` | 矩阵发布视频、图文、草稿管理、话题组 contentType=1 是视频,contentType=2是图文 |
|
|
26
26
|
|
|
27
|
-
| 发布日历 | `https://www
|
|
28
|
-
| 营销日历 | `https://www
|
|
27
|
+
| 发布日历 | `https://www.siluzan.com/v3/foreign_trade/cso/publishCalendar` | 日历视图规划发布任务、创建/编辑发布任务 |
|
|
28
|
+
| 营销日历 | `https://www.siluzan.com/v3/foreign_trade/cso/marketingCalendar` | 营销节点日历、跳转创建发布任务 |
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
|
|
34
34
|
| 页面 | 完整链接 | 功能说明 |
|
|
35
35
|
|------|----------|----------|
|
|
36
|
-
| 任务列表 | `https://www
|
|
37
|
-
| 视频管理 | `https://www
|
|
38
|
-
| 视频搬家 | `https://www
|
|
39
|
-
| 搬家记录 | `https://www
|
|
36
|
+
| 任务列表 | `https://www.siluzan.com/v3/foreign_trade/cso/task` | 发布任务列表、状态筛选、任务详情抽屉 |
|
|
37
|
+
| 视频管理 | `https://www.siluzan.com/v3/foreign_trade/cso/VideoMgr` | 已发布视频/图文列表、删除、重发、评论查看 |
|
|
38
|
+
| 视频搬家 | `https://www.siluzan.com/v3/foreign_trade/cso/relocation` | 将视频搬运到其他平台 |
|
|
39
|
+
| 搬家记录 | `https://www.siluzan.com/v3/foreign_trade/cso/MovingRecord` | 搬家任务列表与执行状态 |
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
| 页面 | 完整链接 | 功能说明 |
|
|
46
46
|
|------|----------|----------|
|
|
47
|
-
| 私信管理 | `https://www
|
|
48
|
-
| 评论管理 | `https://www
|
|
49
|
-
| 智能互动 | `https://www
|
|
47
|
+
| 私信管理 | `https://www.siluzan.com/v3/foreign_trade/cso/letter` | 按渠道/时间查看与处理私信(多平台 Tab) |
|
|
48
|
+
| 评论管理 | `https://www.siluzan.com/v3/foreign_trade/cso/comment` | 收到的评论列表、回复、账号组筛选 |
|
|
49
|
+
| 智能互动 | `https://www.siluzan.com/v3/foreign_trade/cso/interaction` | 私信欢迎语、自动回复规则配置 |
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
|
|
55
55
|
| 页面 | 完整链接 | 功能说明 |
|
|
56
56
|
|------|----------|----------|
|
|
57
|
-
| 作品数据 | `https://www
|
|
58
|
-
| 账户数据 | `https://www
|
|
59
|
-
| 绩效报表 | `https://www
|
|
57
|
+
| 作品数据 | `https://www.siluzan.com/v3/foreign_trade/cso/Workdata` | 作品维度统计、图表、明细(对应 CLI `report fetch`) |
|
|
58
|
+
| 账户数据 | `https://www.siluzan.com/v3/foreign_trade/cso/accountdata` | 账户维度汇总数据、趋势图表 |
|
|
59
|
+
| 绩效报表 | `https://www.siluzan.com/v3/foreign_trade/cso/table` | 多维度绩效报表、PDF 导出(对应 CLI `report fetch/records/download`) |
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
|
|
65
65
|
| 页面 | 完整链接 | 功能说明 |
|
|
66
66
|
|------|----------|----------|
|
|
67
|
-
| 内容规划 | `https://www
|
|
68
|
-
| 营销首页 | `https://www
|
|
67
|
+
| 内容规划 | `https://www.siluzan.com/v3/foreign_trade/cso/planning` | AI 内容规划列表、生成规划、企业维度筛选(对应 CLI `planning`) |
|
|
68
|
+
| 营销首页 | `https://www.siluzan.com/v3/foreign_trade/cso/ContentHome` | 工作台总览:账号数、视频数、最新评论与视频 |
|
|
69
69
|
|
|
70
|
-
| 话题组 | `https://www
|
|
70
|
+
| 话题组 | `https://www.siluzan.com/v3/foreign_trade/cso/TopicGroup` | 话题组维护、话题内容管理 |
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
---
|
|
@@ -10,28 +10,32 @@
|
|
|
10
10
|
- 反推代表作品的人设卡
|
|
11
11
|
- 梳理可复用的内容工作流
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 执行基本流程
|
|
14
14
|
执行流程详情见:`three-lib-content-workflow/sop.md` — 完整成稿链路:人设 → 目标 → 选题 → 提纲 → 正文 → 质检
|
|
15
15
|
|
|
16
16
|
1. **人设**:先调用 `siluzan-cso persona list`,取目标人设的 列表(Markdown)让用户选择一个人设, 如果没有可以直接让用户描述或跳过
|
|
17
17
|
- 使用 `siluzan-cso persona list --name <人设名> --json `来获取完整人设信息
|
|
18
|
-
2.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
2. **三库文件**:按以下优先级确定本次创作使用的三库内容:
|
|
19
|
+
|
|
20
|
+
**优先级 1 — 用户本次提供的文件**:若用户在对话中直接提供了三库文件(流量因子库 / 产品资产库 / 烹调方法库),则:
|
|
21
|
+
- 将文件内容写入 `~/.siluzan/content-library/`(文件名保持原名,如 `流量因子库.md`)
|
|
22
|
+
- 后续创作过程中直接读取并按需修改这些文件,实现持续优化
|
|
23
|
+
|
|
24
|
+
**优先级 2 — 用户目录已有文件**:检查 `~/.siluzan/content-library/` 是否存在三库文件:
|
|
25
|
+
- 若存在,直接读取使用
|
|
26
|
+
- AI 可在每次创作后根据效果,直接修改 `~/.siluzan/content-library/` 中的文件(增补选题、标注效果、淘汰低效条目等)
|
|
27
|
+
|
|
28
|
+
**优先级 3 — 内置默认文件**(兜底):若以上均无,使用 Skill 目录内置的默认三库文件:
|
|
29
|
+
- `assets/流量因子库.md`
|
|
30
|
+
- `assets/产品资产库.md`
|
|
31
|
+
- `assets/烹调方法库.md`
|
|
32
|
+
|
|
33
|
+
使用 grep 命令或全量读取以上文件内容。
|
|
34
|
+
|
|
27
35
|
> 如用户有联网搜索的SKILL此时可以调用,搜索你需要的内容
|
|
28
36
|
|
|
29
|
-
**本地 SQLite 三库(优先)**:若用户已提供三库文件,AI 应读取文件内容,理解每条条目后逐条调用 `library add` 写入本地数据库(`~/.siluzan/libraries.db`)。写入后后续创作直接用 `library search -q <关键词>` 检索,无需每次重新提供文件。
|
|
30
|
-
- 创作时:`library use <id>` 标记引用,积累使用频次
|
|
31
|
-
- 成稿后:`library update <id> --score <0-1> --notes <经验>` 记录效果
|
|
32
|
-
- 定期审查:`library stats` 查看高频/高效条目;低效条目用 `library retire` 归档
|
|
33
37
|
3. **RAG**(可选):如需从平台知识库检索内部素材,调用 `siluzan-cso rag query`,结果归入「拆素材」环节;不用于与文案无关的场景。
|
|
34
|
-
|
|
38
|
+
|
|
35
39
|
## 阅读顺序
|
|
36
40
|
|
|
37
41
|
- 三库如何使用?详情见: `three-lib-content-workflow/collaboration.md`
|
package/package.json
CHANGED