@cloud411716/fancy-webnovel 4.30.16 → 4.30.17
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/package.json
CHANGED
|
@@ -58,6 +58,17 @@ import {
|
|
|
58
58
|
} from './world.js';
|
|
59
59
|
import { exportMaterialDatabase, importMaterialDatabase } from './native-backup.js';
|
|
60
60
|
import { renderManualBlock } from './manual.js';
|
|
61
|
+
import {
|
|
62
|
+
defaultTeamConfig,
|
|
63
|
+
listTeamModels,
|
|
64
|
+
readTeamConfig,
|
|
65
|
+
runTeamBatch,
|
|
66
|
+
teamConfigPath,
|
|
67
|
+
teamConfigProblem,
|
|
68
|
+
teamRouteText,
|
|
69
|
+
validateTeamModels,
|
|
70
|
+
writeTeamConfig,
|
|
71
|
+
} from './team.js';
|
|
61
72
|
import { nextBatchRequest } from './queue.js';
|
|
62
73
|
import { ABILITY_CORE_KINDS, buildGenerationItems, planGenerationQueue } from './plan.js';
|
|
63
74
|
import { deployMaterialTools } from './tool-deploy.js';
|
|
@@ -1359,6 +1370,13 @@ function kindBlockForItem(item) {
|
|
|
1359
1370
|
|
|
1360
1371
|
export async function runGenerationWithPlan(ctx, invocation, session, taskList, opts = {}) {
|
|
1361
1372
|
const root = opts.root || workspaceOf(session);
|
|
1373
|
+
const team = readTeamConfig(root);
|
|
1374
|
+
if (team.enabled) {
|
|
1375
|
+
const problem = teamConfigProblem(team);
|
|
1376
|
+
if (problem) return notify(session, 'error', '❌ Team 模式配置不完整:' + problem);
|
|
1377
|
+
const modelProblem = await validateTeamModels(ctx, team);
|
|
1378
|
+
if (modelProblem) return notify(session, 'error', '❌ Team 模式模型不可用:' + modelProblem);
|
|
1379
|
+
}
|
|
1362
1380
|
const plan = opts.plan || {};
|
|
1363
1381
|
const world = opts.world || null;
|
|
1364
1382
|
const facets = opts.facets || {};
|
|
@@ -1700,6 +1718,7 @@ export async function runGenerationWithPlan(ctx, invocation, session, taskList,
|
|
|
1700
1718
|
compact: !includeBase,
|
|
1701
1719
|
})
|
|
1702
1720
|
: '';
|
|
1721
|
+
const useTeam = team.enabled && item.mode === 'kind';
|
|
1703
1722
|
let attemptDetail = '';
|
|
1704
1723
|
let accepted = false;
|
|
1705
1724
|
|
|
@@ -1801,60 +1820,79 @@ export async function runGenerationWithPlan(ctx, invocation, session, taskList,
|
|
|
1801
1820
|
});
|
|
1802
1821
|
}
|
|
1803
1822
|
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1823
|
+
if (useTeam) {
|
|
1824
|
+
const teamOut = await runTeamBatch({
|
|
1825
|
+
ctx,
|
|
1826
|
+
parent: invocation.agent,
|
|
1827
|
+
root,
|
|
1828
|
+
runDir,
|
|
1829
|
+
file,
|
|
1830
|
+
prompt,
|
|
1831
|
+
manualBlock,
|
|
1832
|
+
team,
|
|
1833
|
+
batchId,
|
|
1834
|
+
batchNo,
|
|
1835
|
+
});
|
|
1836
|
+
if (!teamOut.ok) {
|
|
1837
|
+
attemptDetail = teamOut.error || 'Team workflow 失败';
|
|
1838
|
+
continue;
|
|
1839
|
+
}
|
|
1840
|
+
} else {
|
|
1841
|
+
const sent = await llmFollowup(invocation, prompt, { appendTempRule: false });
|
|
1842
|
+
if (!sent || sent.ok !== true) {
|
|
1843
|
+
fatal = true;
|
|
1844
|
+
stopReason = '提示词发送失败:' + ((sent && sent.error) || '未知错误');
|
|
1845
|
+
break;
|
|
1846
|
+
}
|
|
1810
1847
|
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1848
|
+
const waited = await waitForTurn([file], before);
|
|
1849
|
+
if (!waited.ok && waited.code === 'ABORTED') {
|
|
1850
|
+
aborted = true;
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
if (!waited.ok && waited.code === 'TIMEOUT') {
|
|
1854
|
+
if (fs.existsSync(file)) {
|
|
1855
|
+
const checked = await validateBatch(file, item, groupId);
|
|
1856
|
+
if (checked.ok) {
|
|
1857
|
+
const acceptedResult = await acceptBatch(file, item, groupId);
|
|
1858
|
+
if (acceptedResult.fatal) {
|
|
1859
|
+
fatal = true;
|
|
1860
|
+
stopReason = '等待超时后导入数据库失败:' + acceptedResult.detail;
|
|
1861
|
+
break;
|
|
1862
|
+
}
|
|
1863
|
+
accepted = true;
|
|
1864
|
+
try {
|
|
1865
|
+
fs.appendFileSync(batchLog, JSON.stringify({
|
|
1866
|
+
at: new Date().toISOString(),
|
|
1867
|
+
mode: item.mode,
|
|
1868
|
+
kind: item.kind,
|
|
1869
|
+
kinds: item.kinds || [],
|
|
1870
|
+
subkind: item.subkind || '',
|
|
1871
|
+
group_id: groupId || item.group_id || '',
|
|
1872
|
+
batch: batchNo,
|
|
1873
|
+
file,
|
|
1874
|
+
request_count: next.requestCount,
|
|
1875
|
+
imported: acceptedResult.imported,
|
|
1876
|
+
generated: item.generated,
|
|
1877
|
+
target: item.target,
|
|
1878
|
+
attempts: attempt,
|
|
1879
|
+
timeout_salvage: true,
|
|
1880
|
+
}) + '\n');
|
|
1881
|
+
} catch { /* best effort */ }
|
|
1825
1882
|
}
|
|
1826
|
-
accepted = true;
|
|
1827
|
-
try {
|
|
1828
|
-
fs.appendFileSync(batchLog, JSON.stringify({
|
|
1829
|
-
at: new Date().toISOString(),
|
|
1830
|
-
mode: item.mode,
|
|
1831
|
-
kind: item.kind,
|
|
1832
|
-
kinds: item.kinds || [],
|
|
1833
|
-
subkind: item.subkind || '',
|
|
1834
|
-
group_id: groupId || item.group_id || '',
|
|
1835
|
-
batch: batchNo,
|
|
1836
|
-
file,
|
|
1837
|
-
request_count: next.requestCount,
|
|
1838
|
-
imported: acceptedResult.imported,
|
|
1839
|
-
generated: item.generated,
|
|
1840
|
-
target: item.target,
|
|
1841
|
-
attempts: attempt,
|
|
1842
|
-
timeout_salvage: true,
|
|
1843
|
-
}) + '\n');
|
|
1844
|
-
} catch { /* best effort */ }
|
|
1845
1883
|
}
|
|
1884
|
+
fatal = true;
|
|
1885
|
+
stopReason = '等待 LLM 写入超时' + (accepted ? ',已导入当前批次' : '');
|
|
1886
|
+
break;
|
|
1887
|
+
}
|
|
1888
|
+
if (!waited.ok && waited.code !== 'NO_CHANGE') {
|
|
1889
|
+
attemptDetail = waited.reason || waited.code || '等待 LLM 写入文件失败';
|
|
1890
|
+
continue;
|
|
1891
|
+
}
|
|
1892
|
+
if (!waited.ok && waited.code === 'NO_CHANGE') {
|
|
1893
|
+
attemptDetail = 'LLM 本轮结束但目标文件没有变化';
|
|
1894
|
+
continue;
|
|
1846
1895
|
}
|
|
1847
|
-
fatal = true;
|
|
1848
|
-
stopReason = '等待 LLM 写入超时' + (accepted ? ',已导入当前批次' : '');
|
|
1849
|
-
break;
|
|
1850
|
-
}
|
|
1851
|
-
if (!waited.ok && waited.code !== 'NO_CHANGE') {
|
|
1852
|
-
attemptDetail = waited.reason || waited.code || '等待 LLM 写入文件失败';
|
|
1853
|
-
continue;
|
|
1854
|
-
}
|
|
1855
|
-
if (!waited.ok && waited.code === 'NO_CHANGE') {
|
|
1856
|
-
attemptDetail = 'LLM 本轮结束但目标文件没有变化';
|
|
1857
|
-
continue;
|
|
1858
1896
|
}
|
|
1859
1897
|
|
|
1860
1898
|
const checked = await validateBatch(file, item, groupId);
|
|
@@ -2005,11 +2043,138 @@ function materialTaskTitles(invocation) {
|
|
|
2005
2043
|
return ['读取选题建议与 facet', '选择世界母体', '分批生成并导入素材', '汇总生成结果'];
|
|
2006
2044
|
}
|
|
2007
2045
|
|
|
2046
|
+
function teamText(root, config) {
|
|
2047
|
+
return [
|
|
2048
|
+
'🧩 素材 Team 模式',
|
|
2049
|
+
'',
|
|
2050
|
+
`A 生成者:${teamRouteText(config.generatorA)}`,
|
|
2051
|
+
`B 生成者:${teamRouteText(config.generatorB)}`,
|
|
2052
|
+
`裁判:${teamRouteText(config.judge)}`,
|
|
2053
|
+
`状态:${config.enabled ? '开启' : '关闭'}`,
|
|
2054
|
+
`审查模式:${config.reviewMode}`,
|
|
2055
|
+
`最多审查轮次:${config.maxReviewRounds}`,
|
|
2056
|
+
`最多 agent 调用:${config.maxTotalCalls}`,
|
|
2057
|
+
`5 轮未通过交裁判:${config.judgeOnMaxRounds ? '是' : '否'}`,
|
|
2058
|
+
'',
|
|
2059
|
+
`配置文件:${teamConfigPath(root)}`,
|
|
2060
|
+
'',
|
|
2061
|
+
'设置示例:',
|
|
2062
|
+
' /fancy-material team set a opencode-go glm-5.3',
|
|
2063
|
+
' /fancy-material team set b opencode-go kimi-k3',
|
|
2064
|
+
' /fancy-material team set judge opencode-go deepseek-v4.1-flash',
|
|
2065
|
+
' /fancy-material team set rounds 5',
|
|
2066
|
+
' /fancy-material team on',
|
|
2067
|
+
].join('\n');
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
async function handleTeamCommand(ctx, session, tokens) {
|
|
2071
|
+
let root;
|
|
2072
|
+
try { root = workspaceOf(session); } catch (err) {
|
|
2073
|
+
return notify(session, 'error', '❌ ' + (err && err.message ? err.message : String(err)));
|
|
2074
|
+
}
|
|
2075
|
+
const sub = String(tokens[0] || 'show').toLowerCase();
|
|
2076
|
+
const config = readTeamConfig(root);
|
|
2077
|
+
if (sub === 'show' || sub === 'status') {
|
|
2078
|
+
return notify(session, 'success', teamText(root, config));
|
|
2079
|
+
}
|
|
2080
|
+
if (sub === 'models') {
|
|
2081
|
+
const provider = String(tokens[1] || 'opencode-go');
|
|
2082
|
+
try {
|
|
2083
|
+
const models = await listTeamModels(ctx, provider);
|
|
2084
|
+
if (!models.length) return notify(session, 'error', `⚠️ ${provider} 当前没有可用模型(可能缺少凭据或 provider 未挂载)。`);
|
|
2085
|
+
return notify(session, 'success', [
|
|
2086
|
+
`🧩 ${provider} 可用模型(${models.length})`,
|
|
2087
|
+
'',
|
|
2088
|
+
...models.map((model) => `- ${model.id}${model.name ? '(' + model.name + ')' : ''}`),
|
|
2089
|
+
].join('\n'));
|
|
2090
|
+
} catch (err) {
|
|
2091
|
+
return notify(session, 'error', '❌ 读取模型列表失败:' + (err && err.message ? err.message : String(err)));
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
if (sub === 'on' || sub === 'off') {
|
|
2095
|
+
config.enabled = sub === 'on';
|
|
2096
|
+
if (config.enabled) {
|
|
2097
|
+
const problem = teamConfigProblem(config);
|
|
2098
|
+
if (problem) return notify(session, 'error', '❌ ' + problem);
|
|
2099
|
+
const modelProblem = await validateTeamModels(ctx, config);
|
|
2100
|
+
if (modelProblem) return notify(session, 'error', '❌ ' + modelProblem);
|
|
2101
|
+
}
|
|
2102
|
+
writeTeamConfig(root, config);
|
|
2103
|
+
return notify(session, 'success', `✅ Team 模式已${config.enabled ? '开启' : '关闭'}。`);
|
|
2104
|
+
}
|
|
2105
|
+
if (sub === 'reset') {
|
|
2106
|
+
writeTeamConfig(root, defaultTeamConfig());
|
|
2107
|
+
return notify(session, 'success', '✅ Team 配置已重置为默认(关闭、未设置模型)。');
|
|
2108
|
+
}
|
|
2109
|
+
if (sub === 'set') {
|
|
2110
|
+
const key = String(tokens[1] || '').toLowerCase();
|
|
2111
|
+
const value = tokens.slice(2);
|
|
2112
|
+
if (!key) {
|
|
2113
|
+
return notify(session, 'error', '用法:/fancy-material team set a|b|judge <provider> <model> | rounds <n> | max-calls <n> | mode <cross|oneway> | judge-on-max <true|false>');
|
|
2114
|
+
}
|
|
2115
|
+
if (key === 'a' || key === 'b' || key === 'judge') {
|
|
2116
|
+
if (value.length < 2) {
|
|
2117
|
+
return notify(session, 'error', `用法:/fancy-material team set ${key} <provider> <model>`);
|
|
2118
|
+
}
|
|
2119
|
+
const provider = value[0];
|
|
2120
|
+
const model = value[1];
|
|
2121
|
+
let models;
|
|
2122
|
+
try {
|
|
2123
|
+
models = await listTeamModels(ctx, provider);
|
|
2124
|
+
} catch (err) {
|
|
2125
|
+
return notify(session, 'error', '❌ 读取模型列表失败:' + (err && err.message ? err.message : String(err)));
|
|
2126
|
+
}
|
|
2127
|
+
const ids = models.map((item) => String(item && item.id || ''));
|
|
2128
|
+
if (ids.length && !ids.includes(model)) {
|
|
2129
|
+
return notify(session, 'error', [
|
|
2130
|
+
`❌ ${provider} 没有模型 "${model}"。可用:`,
|
|
2131
|
+
...ids.slice(0, 30).map((id) => '- ' + id),
|
|
2132
|
+
ids.length > 30 ? `… 共 ${ids.length} 个` : '',
|
|
2133
|
+
].filter(Boolean).join('\n'));
|
|
2134
|
+
}
|
|
2135
|
+
const field = key === 'a' ? 'generatorA' : key === 'b' ? 'generatorB' : 'judge';
|
|
2136
|
+
config[field] = { provider, model };
|
|
2137
|
+
writeTeamConfig(root, config);
|
|
2138
|
+
return notify(session, 'success', `✅ ${field} 已设为 ${provider}/${model}。`);
|
|
2139
|
+
}
|
|
2140
|
+
if (key === 'rounds') {
|
|
2141
|
+
const n = Number.parseInt(value[0], 10);
|
|
2142
|
+
if (!Number.isFinite(n) || n < 1 || n > 10) return notify(session, 'error', '轮次必须是 1–10。');
|
|
2143
|
+
config.maxReviewRounds = n;
|
|
2144
|
+
writeTeamConfig(root, config);
|
|
2145
|
+
return notify(session, 'success', `✅ 最多审查轮次已设为 ${n}。`);
|
|
2146
|
+
}
|
|
2147
|
+
if (key === 'max-calls') {
|
|
2148
|
+
const n = Number.parseInt(value[0], 10);
|
|
2149
|
+
if (!Number.isFinite(n) || n < 6 || n > 40) return notify(session, 'error', 'max-calls 必须是 6–40。');
|
|
2150
|
+
config.maxTotalCalls = n;
|
|
2151
|
+
writeTeamConfig(root, config);
|
|
2152
|
+
return notify(session, 'success', `✅ 最多 agent 调用已设为 ${n}。`);
|
|
2153
|
+
}
|
|
2154
|
+
if (key === 'mode') {
|
|
2155
|
+
const mode = String(value[0] || '').toLowerCase();
|
|
2156
|
+
if (mode !== 'cross' && mode !== 'oneway') return notify(session, 'error', 'mode 只能是 cross 或 oneway。');
|
|
2157
|
+
config.reviewMode = mode;
|
|
2158
|
+
writeTeamConfig(root, config);
|
|
2159
|
+
return notify(session, 'success', `✅ 审查模式已设为 ${mode}。`);
|
|
2160
|
+
}
|
|
2161
|
+
if (key === 'judge-on-max') {
|
|
2162
|
+
const on = String(value[0] || '').toLowerCase();
|
|
2163
|
+
if (on !== 'true' && on !== 'false') return notify(session, 'error', 'judge-on-max 只能是 true 或 false。');
|
|
2164
|
+
config.judgeOnMaxRounds = on === 'true';
|
|
2165
|
+
writeTeamConfig(root, config);
|
|
2166
|
+
return notify(session, 'success', `✅ 5 轮未通过交裁判:${config.judgeOnMaxRounds ? '是' : '否'}。`);
|
|
2167
|
+
}
|
|
2168
|
+
return notify(session, 'error', `未知 team 设置:${key}`);
|
|
2169
|
+
}
|
|
2170
|
+
return notify(session, 'error', '用法:/fancy-material team show|models [provider]|on|off|reset|set ...');
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2008
2173
|
export async function apply(ctx) {
|
|
2009
2174
|
registerCommandWithTasks(ctx, {
|
|
2010
2175
|
name: 'fancy-material',
|
|
2011
|
-
description: '🧩 素材库 ( usage: /fancy-material [--style <key>] [--fresh] | continue | load <文件> | dump | export | import | init | remove | prompt | help )',
|
|
2012
|
-
input: { hint: '[--style <key>] [--fresh] | continue | load <文件.jsonl> | dump | export [文件.surql] | import [文件.surql]' },
|
|
2176
|
+
description: '🧩 素材库 ( usage: /fancy-material [--style <key>] [--fresh] | continue | team ... | load <文件> | dump | export | import | init | remove | prompt | help )',
|
|
2177
|
+
input: { hint: '[--style <key>] [--fresh] | continue | team show|models|set|on|off | load <文件.jsonl> | dump | export [文件.surql] | import [文件.surql]' },
|
|
2013
2178
|
handler: async (invocation, taskList) => {
|
|
2014
2179
|
const session = invocation.agent.session;
|
|
2015
2180
|
const raw = String(invocation.rawInput || '').trim();
|
|
@@ -2073,6 +2238,9 @@ export async function apply(ctx) {
|
|
|
2073
2238
|
if (!command) {
|
|
2074
2239
|
return await runInteractive(ctx, invocation, session, taskList, { styleRaw, fresh });
|
|
2075
2240
|
}
|
|
2241
|
+
if (command === 'team') {
|
|
2242
|
+
return await handleTeamCommand(ctx, session, tokens.slice(1));
|
|
2243
|
+
}
|
|
2076
2244
|
if (command === 'continue' || command === '继续') {
|
|
2077
2245
|
if (tokens.length > 1) {
|
|
2078
2246
|
return notify(session, 'error', '用法:/fancy-material continue(不接受额外参数)');
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-agent material generation: two generators, bounded cross-review, judge.
|
|
3
|
+
*
|
|
4
|
+
* The workflow script is fixed. User-editable model routes and review limits
|
|
5
|
+
* come from `.fancy/material/team.json`, so OpenCode Go catalog changes do not
|
|
6
|
+
* require touching the workflow or the generation prompt.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
|
|
12
|
+
const TEAM_FILE = 'team.json';
|
|
13
|
+
const DEFAULT_TEAM = Object.freeze({
|
|
14
|
+
version: 1,
|
|
15
|
+
enabled: false,
|
|
16
|
+
reviewMode: 'cross',
|
|
17
|
+
maxReviewRounds: 5,
|
|
18
|
+
maxTotalCalls: 12,
|
|
19
|
+
judgeOnMaxRounds: true,
|
|
20
|
+
generatorA: null,
|
|
21
|
+
generatorB: null,
|
|
22
|
+
judge: null,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function teamConfigPath(root) {
|
|
26
|
+
return path.join(root, '.fancy', 'material', TEAM_FILE);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function defaultTeamConfig() {
|
|
30
|
+
return JSON.parse(JSON.stringify(DEFAULT_TEAM));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function readTeamConfig(root) {
|
|
34
|
+
const file = teamConfigPath(root);
|
|
35
|
+
let raw;
|
|
36
|
+
try {
|
|
37
|
+
raw = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
38
|
+
} catch {
|
|
39
|
+
return defaultTeamConfig();
|
|
40
|
+
}
|
|
41
|
+
const out = { ...defaultTeamConfig(), ...(raw && typeof raw === 'object' ? raw : {}) };
|
|
42
|
+
out.enabled = Boolean(out.enabled);
|
|
43
|
+
out.reviewMode = out.reviewMode === 'oneway' ? 'oneway' : 'cross';
|
|
44
|
+
out.maxReviewRounds = clampInt(out.maxReviewRounds, 1, 10, 5);
|
|
45
|
+
out.maxTotalCalls = clampInt(out.maxTotalCalls, 6, 40, 12);
|
|
46
|
+
out.judgeOnMaxRounds = out.judgeOnMaxRounds !== false;
|
|
47
|
+
for (const key of ['generatorA', 'generatorB', 'judge']) out[key] = normalizeRoute(out[key]);
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function writeTeamConfig(root, config) {
|
|
52
|
+
const file = teamConfigPath(root);
|
|
53
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
54
|
+
const body = JSON.stringify(config, null, 2) + '\n';
|
|
55
|
+
const tmp = `${file}.${process.pid}.${Date.now()}.tmp`;
|
|
56
|
+
fs.writeFileSync(tmp, body, 'utf8');
|
|
57
|
+
fs.renameSync(tmp, file);
|
|
58
|
+
return file;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function clampInt(value, min, max, fallback) {
|
|
62
|
+
const n = Number.parseInt(String(value), 10);
|
|
63
|
+
if (!Number.isFinite(n)) return fallback;
|
|
64
|
+
return Math.max(min, Math.min(max, n));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function normalizeRoute(value) {
|
|
68
|
+
if (!value || typeof value !== 'object') return null;
|
|
69
|
+
const provider = String(value.provider || '').trim();
|
|
70
|
+
const model = String(value.model || '').trim();
|
|
71
|
+
if (!provider || !model) return null;
|
|
72
|
+
return { provider, model };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function teamRouteText(route) {
|
|
76
|
+
return route ? `${route.provider}/${route.model}` : '(未设置)';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function teamConfigProblem(config) {
|
|
80
|
+
if (!config || !config.enabled) return '';
|
|
81
|
+
const missing = [];
|
|
82
|
+
if (!config.generatorA) missing.push('generatorA');
|
|
83
|
+
if (!config.generatorB) missing.push('generatorB');
|
|
84
|
+
if (!config.judge) missing.push('judge');
|
|
85
|
+
if (missing.length) return 'team 模式缺少模型:' + missing.join('、') + '。用 /fancy-material team set 设置。';
|
|
86
|
+
return '';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Validate configured routes against the live provider catalog when available. */
|
|
90
|
+
export async function validateTeamModels(ctx, config) {
|
|
91
|
+
const routes = [
|
|
92
|
+
['generatorA', config.generatorA],
|
|
93
|
+
['generatorB', config.generatorB],
|
|
94
|
+
['judge', config.judge],
|
|
95
|
+
];
|
|
96
|
+
if (!ctx || !ctx.llm || typeof ctx.llm.listModels !== 'function') return '';
|
|
97
|
+
for (const [label, route] of routes) {
|
|
98
|
+
if (!route) continue;
|
|
99
|
+
let models;
|
|
100
|
+
try {
|
|
101
|
+
models = await ctx.llm.listModels(route.provider);
|
|
102
|
+
} catch (err) {
|
|
103
|
+
return `${label} 的 provider "${route.provider}" 不可用:${err && err.message ? err.message : String(err)}`;
|
|
104
|
+
}
|
|
105
|
+
const ids = (Array.isArray(models) ? models : []).map((item) => String(item && item.id || ''));
|
|
106
|
+
if (ids.length && !ids.includes(route.model)) {
|
|
107
|
+
return `${label} 的模型 "${route.model}" 不在 ${route.provider} 的可用列表里。可用:${ids.slice(0, 20).join('、')}${ids.length > 20 ? '…' : ''}`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return '';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export async function listTeamModels(ctx, provider = 'opencode-go') {
|
|
114
|
+
if (!ctx || !ctx.llm || typeof ctx.llm.listModels !== 'function') return [];
|
|
115
|
+
const models = await ctx.llm.listModels(provider);
|
|
116
|
+
return Array.isArray(models) ? models : [];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function retargetPrompt(prompt, from, to) {
|
|
120
|
+
return String(prompt || '').split(`目标文件(**绝对路径**):\`${from}\``).join(`目标文件(**绝对路径**):\`${to}\``);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function appendTeamRole(prompt, role, ownFile, otherFile) {
|
|
124
|
+
return `${prompt}\n\n## Team 模式(${role})\n\n- 只写你自己的目标文件:\`${ownFile}\`。\n- 不要修改另一个生成者的文件:\`${otherFile}\`。\n- 完成后只回复:已写入 ${ownFile}\n`;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function writePromptFile(file, text) {
|
|
128
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
129
|
+
fs.writeFileSync(file, String(text || '').trim() + '\n', 'utf8');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const TEAM_RUBRIC = `
|
|
133
|
+
# Team 评审 rubric
|
|
134
|
+
|
|
135
|
+
只判结构性和质量问题,不替作者重写。
|
|
136
|
+
|
|
137
|
+
PASS 仅当没有 blocker/major。minor 可以记录但不阻塞。
|
|
138
|
+
|
|
139
|
+
每条素材检查:
|
|
140
|
+
1. 名字是否自带高概念关系/异常边界,而不是“物件 + 残/余/令/录/界”?
|
|
141
|
+
2. 规则能不能一句话复述?有没有具体画面/数字/颜色/动作?
|
|
142
|
+
3. 是否先有规则、再有舞台,而不是先选物件再贴后缀?
|
|
143
|
+
4. 代价是否是这条能力内生的,而不是只复用愿孔/金漆?
|
|
144
|
+
5. note 是否有里世界:谁在用、交换什么、入口/规则/代价/漏洞?
|
|
145
|
+
6. 把舞台换掉,名字还成立吗?成立则说明名字没有咬住规则。
|
|
146
|
+
7. 同批是否有明显重复的载体/算子/命名形态?
|
|
147
|
+
|
|
148
|
+
返回 JSON:
|
|
149
|
+
{ "verdict": "PASS" | "CHANGES", "issues": [{ "severity": "blocker|major|minor", "why": "...", "fix": "..." }] }
|
|
150
|
+
`;
|
|
151
|
+
|
|
152
|
+
export const TEAM_WORKFLOW_SCRIPT = String.raw`
|
|
153
|
+
const {
|
|
154
|
+
promptAFile, promptBFile, fileA, fileB, finalFile, rubricFile,
|
|
155
|
+
providerA, modelA, providerB, modelB, providerC, modelC,
|
|
156
|
+
maxRounds, maxCalls, reviewMode,
|
|
157
|
+
} = args
|
|
158
|
+
|
|
159
|
+
const reviewSchema = {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
verdict: { type: 'string', enum: ['PASS', 'CHANGES'] },
|
|
163
|
+
issues: {
|
|
164
|
+
type: 'array',
|
|
165
|
+
items: {
|
|
166
|
+
type: 'object',
|
|
167
|
+
properties: {
|
|
168
|
+
severity: { type: 'string', enum: ['blocker', 'major', 'minor'] },
|
|
169
|
+
why: { type: 'string' },
|
|
170
|
+
fix: { type: 'string' },
|
|
171
|
+
},
|
|
172
|
+
required: ['severity', 'why', 'fix'],
|
|
173
|
+
additionalProperties: false,
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ['verdict', 'issues'],
|
|
178
|
+
additionalProperties: false,
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const responseSchema = {
|
|
182
|
+
type: 'object',
|
|
183
|
+
properties: {
|
|
184
|
+
decision: { type: 'string', enum: ['ACCEPT', 'REJECT'] },
|
|
185
|
+
reason: { type: 'string' },
|
|
186
|
+
},
|
|
187
|
+
required: ['decision', 'reason'],
|
|
188
|
+
additionalProperties: false,
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const verdictSchema = {
|
|
192
|
+
type: 'object',
|
|
193
|
+
properties: {
|
|
194
|
+
verdict: { type: 'string', enum: ['PASS', 'MAINTAIN'] },
|
|
195
|
+
reason: { type: 'string' },
|
|
196
|
+
},
|
|
197
|
+
required: ['verdict', 'reason'],
|
|
198
|
+
additionalProperties: false,
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const reviseSchema = {
|
|
202
|
+
type: 'object',
|
|
203
|
+
properties: {
|
|
204
|
+
changed: { type: 'boolean' },
|
|
205
|
+
summary: { type: 'string' },
|
|
206
|
+
},
|
|
207
|
+
required: ['changed', 'summary'],
|
|
208
|
+
additionalProperties: false,
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const judgeSchema = {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
decision: { type: 'string', enum: ['PICK_A', 'PICK_B', 'MERGE', 'REJECT'] },
|
|
215
|
+
rationale: { type: 'string' },
|
|
216
|
+
},
|
|
217
|
+
required: ['decision', 'rationale'],
|
|
218
|
+
additionalProperties: false,
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
let calls = 0
|
|
222
|
+
const totalCap = Math.max(6, Number(maxCalls) || 12)
|
|
223
|
+
async function call(prompt, opts) {
|
|
224
|
+
if (calls >= totalCap) throw new Error('team workflow reached maxTotalCalls')
|
|
225
|
+
calls += 1
|
|
226
|
+
return agent(prompt, opts)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const genPrompt = (promptFile, ownFile, otherFile, role) =>
|
|
230
|
+
'你是生成者 ' + role + '。先读取并严格执行 ' + promptFile + '。' +
|
|
231
|
+
'只写 ' + ownFile + ',不要修改 ' + otherFile + '。' +
|
|
232
|
+
'不要输出解释;完成后只回复:已写入 ' + ownFile
|
|
233
|
+
|
|
234
|
+
const reviewPrompt = (targetFile, role, round) =>
|
|
235
|
+
'你是审查者 ' + role + '。先读取 ' + rubricFile + ' 和 ' + targetFile + '。' +
|
|
236
|
+
'不要修改 ' + targetFile + '。这是第 ' + round + ' 轮审查。' +
|
|
237
|
+
'逐条检查,PASS 仅当没有 blocker/major。必须只返回 JSON:' +
|
|
238
|
+
'{"verdict":"PASS|CHANGES","issues":[{"severity":"blocker|major|minor","why":"...","fix":"..."}]}'
|
|
239
|
+
|
|
240
|
+
const responsePrompt = (ownFile, review, role) =>
|
|
241
|
+
'你是作者 ' + role + '。读取 ' + ownFile + ' 和以下审查意见:\n' + JSON.stringify(review) +
|
|
242
|
+
'\n如果接受,返回 {"decision":"ACCEPT","reason":"..."};如果认为审查有误,返回 {"decision":"REJECT","reason":"..."}。' +
|
|
243
|
+
'不要修改文件,只返回 JSON。'
|
|
244
|
+
|
|
245
|
+
const revisePrompt = (ownFile, review, role) =>
|
|
246
|
+
'你是作者 ' + role + '。读取 ' + ownFile + ',按以下审查意见修改。' +
|
|
247
|
+
'保留已经通过的内容,只写 JSONL 到 ' + ownFile + '。\n' + JSON.stringify(review) +
|
|
248
|
+
'\n完成后只返回 {"changed":true|false,"summary":"..."}。'
|
|
249
|
+
|
|
250
|
+
const rebuttalPrompt = (targetFile, review, response, role) =>
|
|
251
|
+
'你是审查者 ' + role + '。作者对你的审查提出反驳:\n' +
|
|
252
|
+
JSON.stringify({ review, response }) +
|
|
253
|
+
'\n读取 ' + targetFile + ' 当前版本。如果反驳成立,返回 {"verdict":"PASS","reason":"..."};' +
|
|
254
|
+
'否则返回 {"verdict":"MAINTAIN","reason":"..."}。只返回 JSON。'
|
|
255
|
+
|
|
256
|
+
const judgePrompt = (round, aPassed, bPassed, history) =>
|
|
257
|
+
'你是主编。读取 ' + rubricFile + '、' + fileA + '、' + fileB + '。' +
|
|
258
|
+
'第 ' + round + ' 轮结束:A=' + (aPassed ? 'PASS' : 'OPEN') + ',B=' + (bPassed ? 'PASS' : 'OPEN') + '。' +
|
|
259
|
+
'交叉审查记录:\n' + JSON.stringify(history).slice(0, 16000) + '\n' +
|
|
260
|
+
'必须选择 PICK_A / PICK_B / MERGE / REJECT,不能和稀泥。' +
|
|
261
|
+
'如果选择 PICK_A、PICK_B 或 MERGE,把最终 JSONL 写到 ' + finalFile + '。' +
|
|
262
|
+
'返回 {"decision":"...","rationale":"..."}。'
|
|
263
|
+
|
|
264
|
+
phase('generate')
|
|
265
|
+
const generated = await parallel([
|
|
266
|
+
() => call(genPrompt(promptAFile, fileA, fileB, 'A'), {
|
|
267
|
+
provider: providerA, model: modelA, label: 'gen-a',
|
|
268
|
+
}),
|
|
269
|
+
() => call(genPrompt(promptBFile, fileB, fileA, 'B'), {
|
|
270
|
+
provider: providerB, model: modelB, label: 'gen-b',
|
|
271
|
+
}),
|
|
272
|
+
])
|
|
273
|
+
if (generated[0] === null || generated[1] === null) {
|
|
274
|
+
throw new Error('generator A or B failed')
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
let aPassed = false
|
|
278
|
+
let bPassed = false
|
|
279
|
+
let round = 0
|
|
280
|
+
const history = []
|
|
281
|
+
|
|
282
|
+
while (round < maxRounds && !(aPassed && bPassed) && calls < totalCap - 4) {
|
|
283
|
+
round += 1
|
|
284
|
+
phase('review-' + round)
|
|
285
|
+
log('cross-review round ' + round)
|
|
286
|
+
let reviewB
|
|
287
|
+
let reviewA
|
|
288
|
+
if (reviewMode === 'oneway') {
|
|
289
|
+
reviewB = await call(reviewPrompt(fileB, 'A', round), {
|
|
290
|
+
provider: providerA, model: modelA, schema: reviewSchema, label: 'review-b-' + round,
|
|
291
|
+
})
|
|
292
|
+
reviewA = { verdict: 'PASS', issues: [] }
|
|
293
|
+
} else {
|
|
294
|
+
[reviewB, reviewA] = await parallel([
|
|
295
|
+
() => call(reviewPrompt(fileB, 'A', round), {
|
|
296
|
+
provider: providerA, model: modelA, schema: reviewSchema, label: 'review-b-' + round,
|
|
297
|
+
}),
|
|
298
|
+
() => call(reviewPrompt(fileA, 'B', round), {
|
|
299
|
+
provider: providerB, model: modelB, schema: reviewSchema, label: 'review-a-' + round,
|
|
300
|
+
}),
|
|
301
|
+
])
|
|
302
|
+
}
|
|
303
|
+
history.push({ round, reviewB, reviewA })
|
|
304
|
+
|
|
305
|
+
if (!reviewB) {
|
|
306
|
+
bPassed = false
|
|
307
|
+
} else if (reviewB.verdict === 'PASS') {
|
|
308
|
+
bPassed = true
|
|
309
|
+
} else {
|
|
310
|
+
const response = await call(responsePrompt(fileB, reviewB, 'B'), {
|
|
311
|
+
provider: providerB, model: modelB, schema: responseSchema, label: 'response-b-' + round,
|
|
312
|
+
})
|
|
313
|
+
history.push({ round, responseB: response })
|
|
314
|
+
if (response && response.decision === 'ACCEPT') {
|
|
315
|
+
const revised = await call(revisePrompt(fileB, reviewB, 'B'), {
|
|
316
|
+
provider: providerB, model: modelB, schema: reviseSchema, label: 'revise-b-' + round,
|
|
317
|
+
})
|
|
318
|
+
history.push({ round, revisedB: revised })
|
|
319
|
+
bPassed = false
|
|
320
|
+
} else if (response) {
|
|
321
|
+
const decision = await call(rebuttalPrompt(fileB, reviewB, response, 'A'), {
|
|
322
|
+
provider: providerA, model: modelA, schema: verdictSchema, label: 'rebuttal-b-' + round,
|
|
323
|
+
})
|
|
324
|
+
history.push({ round, decisionB: decision })
|
|
325
|
+
bPassed = Boolean(decision && decision.verdict === 'PASS')
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (!reviewA) {
|
|
330
|
+
aPassed = false
|
|
331
|
+
} else if (reviewA.verdict === 'PASS') {
|
|
332
|
+
aPassed = true
|
|
333
|
+
} else {
|
|
334
|
+
const response = await call(responsePrompt(fileA, reviewA, 'A'), {
|
|
335
|
+
provider: providerB, model: modelB, schema: responseSchema, label: 'response-a-' + round,
|
|
336
|
+
})
|
|
337
|
+
history.push({ round, responseA: response })
|
|
338
|
+
if (response && response.decision === 'ACCEPT') {
|
|
339
|
+
const revised = await call(revisePrompt(fileA, reviewA, 'A'), {
|
|
340
|
+
provider: providerA, model: modelA, schema: reviseSchema, label: 'revise-a-' + round,
|
|
341
|
+
})
|
|
342
|
+
history.push({ round, revisedA: revised })
|
|
343
|
+
aPassed = false
|
|
344
|
+
} else if (response) {
|
|
345
|
+
const decision = await call(rebuttalPrompt(fileA, reviewA, response, 'B'), {
|
|
346
|
+
provider: providerB, model: modelB, schema: verdictSchema, label: 'rebuttal-a-' + round,
|
|
347
|
+
})
|
|
348
|
+
history.push({ round, decisionA: decision })
|
|
349
|
+
aPassed = Boolean(decision && decision.verdict === 'PASS')
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
log('round ' + round + ': A=' + (aPassed ? 'PASS' : 'OPEN') + ', B=' + (bPassed ? 'PASS' : 'OPEN'))
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
phase('judge')
|
|
357
|
+
const judge = await call(judgePrompt(round, aPassed, bPassed, history), {
|
|
358
|
+
provider: providerC, model: modelC, schema: judgeSchema, label: 'judge',
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
return { round, aPassed, bPassed, calls, judge, fileA, fileB, finalFile }
|
|
362
|
+
`;
|
|
363
|
+
|
|
364
|
+
export async function runTeamBatch({
|
|
365
|
+
ctx,
|
|
366
|
+
parent,
|
|
367
|
+
root,
|
|
368
|
+
runDir,
|
|
369
|
+
file,
|
|
370
|
+
prompt,
|
|
371
|
+
manualBlock = '',
|
|
372
|
+
team,
|
|
373
|
+
batchId = '',
|
|
374
|
+
batchNo = 1,
|
|
375
|
+
}) {
|
|
376
|
+
if (!ctx || !ctx.workflowEngine || typeof ctx.workflowEngine.start !== 'function') {
|
|
377
|
+
return { ok: false, error: 'team 模式需要 workflowEngine,但当前 profile 没有加载 workflow。' };
|
|
378
|
+
}
|
|
379
|
+
const problem = teamConfigProblem(team);
|
|
380
|
+
if (problem) return { ok: false, error: problem };
|
|
381
|
+
|
|
382
|
+
const aFile = path.join(runDir, 'team-a.jsonl');
|
|
383
|
+
const bFile = path.join(runDir, 'team-b.jsonl');
|
|
384
|
+
const finalFile = path.join(runDir, 'team-final.jsonl');
|
|
385
|
+
const promptAFile = path.join(runDir, 'team-prompt-a.txt');
|
|
386
|
+
const promptBFile = path.join(runDir, 'team-prompt-b.txt');
|
|
387
|
+
const rubricFile = path.join(runDir, 'team-rubric.md');
|
|
388
|
+
for (const stale of [aFile, bFile, finalFile]) {
|
|
389
|
+
try { fs.unlinkSync(stale); } catch { /* first run */ }
|
|
390
|
+
}
|
|
391
|
+
writePromptFile(promptAFile, appendTeamRole(retargetPrompt(prompt, file, aFile), 'A', aFile, bFile));
|
|
392
|
+
writePromptFile(promptBFile, appendTeamRole(retargetPrompt(prompt, file, bFile), 'B', bFile, aFile));
|
|
393
|
+
writePromptFile(rubricFile, `${manualBlock || ''}\n\n${TEAM_RUBRIC}`);
|
|
394
|
+
|
|
395
|
+
let run;
|
|
396
|
+
try {
|
|
397
|
+
run = ctx.workflowEngine.start({
|
|
398
|
+
script: TEAM_WORKFLOW_SCRIPT,
|
|
399
|
+
meta: {
|
|
400
|
+
name: 'fancy-material-team',
|
|
401
|
+
description: 'Two generators, bounded cross-review, judge.',
|
|
402
|
+
phases: [
|
|
403
|
+
{ title: 'generate', provider: team.generatorA.provider, model: team.generatorA.model },
|
|
404
|
+
{ title: 'review', provider: team.generatorB.provider, model: team.generatorB.model },
|
|
405
|
+
{ title: 'judge', provider: team.judge.provider, model: team.judge.model },
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
args: {
|
|
409
|
+
promptAFile, promptBFile, fileA: aFile, fileB: bFile, finalFile, rubricFile,
|
|
410
|
+
providerA: team.generatorA.provider,
|
|
411
|
+
modelA: team.generatorA.model,
|
|
412
|
+
providerB: team.generatorB.provider,
|
|
413
|
+
modelB: team.generatorB.model,
|
|
414
|
+
providerC: team.judge.provider,
|
|
415
|
+
modelC: team.judge.model,
|
|
416
|
+
maxRounds: team.maxReviewRounds,
|
|
417
|
+
maxCalls: team.maxTotalCalls,
|
|
418
|
+
reviewMode: team.reviewMode,
|
|
419
|
+
batchId,
|
|
420
|
+
batchNo,
|
|
421
|
+
},
|
|
422
|
+
parent,
|
|
423
|
+
});
|
|
424
|
+
} catch (err) {
|
|
425
|
+
return { ok: false, error: '无法启动 team workflow:' + (err && err.message ? err.message : String(err)) };
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
let result;
|
|
429
|
+
try {
|
|
430
|
+
result = await run.result;
|
|
431
|
+
} finally {
|
|
432
|
+
try { await run.dispose(); } catch { /* best effort */ }
|
|
433
|
+
}
|
|
434
|
+
if (!result || result.stopReason !== 'completed') {
|
|
435
|
+
return {
|
|
436
|
+
ok: false,
|
|
437
|
+
error: 'team workflow 未完成:' + ((result && (result.error || result.stopReason)) || '未知错误'),
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (fs.existsSync(finalFile)) {
|
|
442
|
+
fs.copyFileSync(finalFile, file);
|
|
443
|
+
return { ok: true, result: result.value, finalFile };
|
|
444
|
+
}
|
|
445
|
+
const decision = result.value && result.value.judge && result.value.judge.decision;
|
|
446
|
+
const fallback = decision === 'PICK_A' ? aFile : decision === 'PICK_B' ? bFile : '';
|
|
447
|
+
if (fallback && fs.existsSync(fallback)) {
|
|
448
|
+
fs.copyFileSync(fallback, file);
|
|
449
|
+
return { ok: true, result: result.value, finalFile: fallback, fallback: true };
|
|
450
|
+
}
|
|
451
|
+
return { ok: false, error: 'team workflow 完成,但裁判没有写出 final.jsonl(decision=' + (decision || 'none') + ')。' };
|
|
452
|
+
}
|
|
@@ -23,6 +23,12 @@ export function helpText() {
|
|
|
23
23
|
|
|
24
24
|
/fancy-material 交互式:逐步选择 6 层 facet → 3 个世界母体候选 → 生成范围/数量 → 生成素材
|
|
25
25
|
/fancy-material continue 沿用上次的世界母体、facet、风格和范围,继续追加素材
|
|
26
|
+
/fancy-material team show 查看双生成 + 交叉审查 + 裁判的配置
|
|
27
|
+
/fancy-material team models [provider] 查看当前可用模型(默认 opencode-go)
|
|
28
|
+
/fancy-material team set a|b|judge <provider> <model> 设置生成者/裁判模型
|
|
29
|
+
/fancy-material team set rounds <1-10> 设置最多交叉审查轮次(默认 5)
|
|
30
|
+
/fancy-material team set max-calls <6-40> 设置整个 workflow 最多 agent 调用
|
|
31
|
+
/fancy-material team on|off 开/关 Team 模式
|
|
26
32
|
/fancy-material --fresh 重新构建世界母体(旧素材保留,不删除)
|
|
27
33
|
/fancy-material --style <key> ... 手动指定账号风格;多个用逗号分隔,例如 --style suci,crazy-fish
|
|
28
34
|
不指定时在交互流程里选择:自动 / 不使用 / 具体 key
|