@cloud411716/fancy-webnovel 4.16.0 → 4.16.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/docs/douyin-plugin.md
CHANGED
package/docs/workspace-mcp.md
CHANGED
|
@@ -129,7 +129,7 @@ namespace: fancy
|
|
|
129
129
|
跳过,不超过 1 分钟的先看前 5 秒,与网文创作无关也跳过;文章按标题层级拆成原子
|
|
130
130
|
设定。内容交给 LLM 提取素材,按 material JSONL 写入数据库,`source` 固定为
|
|
131
131
|
`other`。作品任务状态记录在素材库的 `douyin_job` 表中,旧版工作区的
|
|
132
|
-
`/.fancy/douyin/crawled.json` 会一次性迁移。采集完成后可由 DSH 子 Agent 并行分析,`FANCY_DOUYIN_SUBAGENTS` 控制并发数(默认
|
|
132
|
+
`/.fancy/douyin/crawled.json` 会一次性迁移。采集完成后可由 DSH 子 Agent 并行分析,`FANCY_DOUYIN_SUBAGENTS` 控制并发数(默认 5,0 关闭);没有 subagent 服务时自动回退单 Agent。
|
|
133
133
|
|
|
134
134
|
登录态保存在工作区 `/.fancy/douyin/chrome-profile/`,并镜像 cookies 到
|
|
135
135
|
`login-state.json`。首次需要登录时使用有头 Chrome,登录态有效后后续运行自动
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export function helpText() {
|
|
|
36
36
|
- 父进程负责采集、校验、入库和任务状态;子 Agent 只写各作品的 materials.jsonl。
|
|
37
37
|
- 作品任务状态记录在素材库的 douyin_job 表;中途重启会复用稳定任务目录,已导入/已跳过的作品不会重采。
|
|
38
38
|
- 有子 Agent 时,视觉能力自检和视频前 5 秒相关性判断也由子 Agent 完成,主对话不再出现这些分析提示词。
|
|
39
|
-
- 子 Agent 并发数由 FANCY_DOUYIN_SUBAGENTS 控制(默认
|
|
39
|
+
- 子 Agent 并发数由 FANCY_DOUYIN_SUBAGENTS 控制(默认 5,0 关闭);DSH 没有 subagent 服务或 spawn provider 时自动回退单 Agent 串行。
|
|
40
40
|
- 视频作品先判断时长:超过 1 分钟直接跳过;不超过 1 分钟的先看前 5 秒,
|
|
41
41
|
与网文创作无关就跳过,有关才继续分析关键帧。
|
|
42
42
|
- 如果内容与网文创作无关,LLM 会写入 skip 标记,该作品记为已处理并跳过。
|
|
@@ -82,23 +82,35 @@ async function runSurreal(root, args, timeout = NATIVE_TIMEOUT_MS) {
|
|
|
82
82
|
const workspace = readWorkspace(root);
|
|
83
83
|
const database = materialDatabaseName(workspace);
|
|
84
84
|
const namespace = workspace.surreal?.namespace || 'fancy';
|
|
85
|
-
const
|
|
85
|
+
const command = [
|
|
86
|
+
binary,
|
|
86
87
|
args[0],
|
|
87
88
|
'--endpoint', rpcUrl(workspace),
|
|
88
89
|
'--namespace', namespace,
|
|
89
90
|
'--database', database,
|
|
90
91
|
...args.slice(1),
|
|
91
|
-
]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
];
|
|
93
|
+
let result;
|
|
94
|
+
for (let attempt = 1; attempt <= 2; attempt += 1) {
|
|
95
|
+
result = await spawnScript(command[0], command.slice(1), {
|
|
96
|
+
timeout,
|
|
97
|
+
cwd: root,
|
|
98
|
+
env: controlEnv(root),
|
|
99
|
+
});
|
|
100
|
+
// `surreal export` writes to a file and prints only logs, so spawnScript's
|
|
101
|
+
// JSON-output heuristic marks it unsuccessful. The exit code is authoritative.
|
|
102
|
+
if (result.code === 0) {
|
|
103
|
+
return { result, workspace, namespace, database };
|
|
104
|
+
}
|
|
105
|
+
const detail = controlDetail(result);
|
|
106
|
+
const transient = /fetch failed|ECONN|connection.*(?:refused|reset)|network|timed? ?out/i.test(detail);
|
|
107
|
+
if (attempt === 1 && transient) {
|
|
108
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
throw new Error(detail);
|
|
100
112
|
}
|
|
101
|
-
|
|
113
|
+
throw new Error(controlDetail(result));
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
/**
|