@cloud411716/fancy-webnovel 4.30.45 → 4.30.47

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud411716/fancy-webnovel",
3
- "version": "4.30.45",
3
+ "version": "4.30.47",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -2286,7 +2286,7 @@ function teamText(root, config) {
2286
2286
  `最多 agent 调用:${config.maxTotalCalls}`,
2287
2287
  `5 轮未通过交裁判:${config.judgeOnMaxRounds ? '是' : '否'}`,
2288
2288
  `入库前人工确认:${config.reviewBeforeImport ? '开启' : '关闭'}`,
2289
- `ability_name 名字阶段:${config.nameStage?.enabled ? '开启' : '关闭'}(池 ${config.nameStage?.poolSize || 80} / 留 ${config.nameStage?.keep || 20} / 裁判 ${config.nameStage?.judges || 3} / 达标 ${config.nameStage?.minScore || 4.5})`,
2289
+ `ability_name 名字阶段:${config.nameStage?.enabled ? '开启' : '关闭'}(池 ${config.nameStage?.poolSize || 80} / 留 ${config.nameStage?.keep || 20} / 裁判 ${config.nameStage?.judges || 3} / 核心 ${config.nameStage?.minScore || 4.5} / 支撑 ${config.nameStage?.supportScore || 4.3})`,
2290
2290
  `强制锚点:${(config.nameStage?.anchorNames || []).join('、') || '(无)'}`,
2291
2291
  `风格锚点:${(config.nameStage?.styleAnchors || []).join('、') || '(无)'}`,
2292
2292
  '',
@@ -2346,7 +2346,7 @@ async function handleTeamCommand(ctx, session, tokens) {
2346
2346
  const key = String(tokens[1] || '').toLowerCase();
2347
2347
  const value = tokens.slice(2);
2348
2348
  if (!key) {
2349
- return notify(session, 'error', '用法:/fancy-material team set a|b|judge <provider> <model> [thinking] | rounds <n> | max-calls <n> | mode <cross|oneway> | judge-on-max <true|false> | review-before-import on|off | name-stage on|off | anchors <名字...> | style-anchors <名字...> | rejected <名字...> | name-pool <n> | name-keep <n> | name-judges <n>');
2349
+ return notify(session, 'error', '用法:/fancy-material team set a|b|judge <provider> <model> [thinking] | rounds <n> | max-calls <n> | mode <cross|oneway> | judge-on-max <true|false> | review-before-import on|off | name-stage on|off | anchors <名字...> | style-anchors <名字...> | rejected <名字...> | name-pool <n> | name-keep <n> | name-judges <n> | name-support <n>');
2350
2350
  }
2351
2351
  if (key === 'a' || key === 'b' || key === 'judge') {
2352
2352
  if (value.length < 2) {
@@ -2452,6 +2452,13 @@ async function handleTeamCommand(ctx, session, tokens) {
2452
2452
  writeTeamConfig(root, config);
2453
2453
  return notify(session, 'success', `✅ ${key} 已设为 ${n}。`);
2454
2454
  }
2455
+ if (key === 'name-support') {
2456
+ const n = Number(value[0]);
2457
+ if (!Number.isFinite(n) || n < 1 || n > 5) return notify(session, 'error', 'name-support 必须是 1–5。');
2458
+ config.nameStage.supportScore = n;
2459
+ writeTeamConfig(root, config);
2460
+ return notify(session, 'success', `✅ name-support 已设为 ${n}。`);
2461
+ }
2455
2462
  return notify(session, 'error', `未知 team 设置:${key}`);
2456
2463
  }
2457
2464
  return notify(session, 'error', '用法:/fancy-material team show|models [provider]|on|off|reset|set ...');
@@ -140,6 +140,35 @@ function buildNamePrompt({
140
140
  lines.push('');
141
141
  lines.push('不要按题材/子域分类,不要列内容清单,不要按公式逐条填。直接从“物象”出发。');
142
142
  lines.push('');
143
+ lines.push('# 材料密度(11 来源,只借“可提取物”)');
144
+ lines.push('名字阶段不写来源名、不写映射;只借下面这些来源提供的物象/机制/约束。来源映射留给 note/derivation。');
145
+ lines.push('高密度优先:3、5、6、7、8、9、11;1、2、4、10 作为补充,不要为了凑来源硬用。');
146
+ lines.push('- 1 诗词:情绪母题、物候、留白、盛衰、谶谣(低优先,除非古风)');
147
+ lines.push('- 2 典籍博物:山川、异兽习性、古器物、工艺、奇物约束');
148
+ lines.push('- 3 神话/民俗/术数:神格权责、仪式、禁忌、因果账本、偿还逻辑');
149
+ lines.push('- 4 外国神话:原型、契约、异化、禁忌知识、认知扭曲');
150
+ lines.push('- 5 历史/制度/律法/经济:制度漏洞、债务、身份、层层成本、博弈');
151
+ lines.push('- 6 科学/技术/医学/认知:硬约束、代偿、反馈、损耗、信号失真');
152
+ lines.push('- 7 艺术/感官/器物/工艺/媒介:材质、工艺、媒介局限、留白');
153
+ lines.push('- 8 日常/职业/城市/网络:设施、流程死角、隐性规矩、职业痛点');
154
+ lines.push('- 9 心理/哲学/梦境:认知陷阱、身份分裂、执念、记忆虚构');
155
+ lines.push('- 10 叙事母题/戏剧/游戏:闭环、替身、归还、循环、观测者');
156
+ lines.push('- 11 成套符号/序列:对立权柄、等级、同源、序列枷锁');
157
+ lines.push('');
158
+ lines.push('# 结构镜头(10 组公式,可选,不强制)');
159
+ lines.push('公式只是起点,不是免责牌;名字仍然要通过下面的物象/语义角色测试。');
160
+ lines.push('同批至少用 4 种镜头,同一种最多 3 条;不要每条都套公式。');
161
+ lines.push('- 状态 + 具象:悬置/将尽/失联/冻结 + 物件/空间');
162
+ lines.push('- 对冲双意象:柔/锐、生/朽、轻/重、明/幽、瞬/恒、微/宏');
163
+ lines.push('- 空间 + 回响:废弃/边界空间 + 留痕/回响动作');
164
+ lines.push('- 微物 + 宏大:微物 + 单向动作 + 宏大背景(最容易写成三截压缩,慎用)');
165
+ lines.push('- 时间 + 终局:时间标记 + 终局意象');
166
+ lines.push('- 动作 + 对象:强动词 + 明确物象(必须把宾语写出来)');
167
+ lines.push('- 身份/制度 + 边界:身份/机构 + 凭证/边界');
168
+ lines.push('- 数字/序列 + 物象:编号/序数 + 物件/边界');
169
+ lines.push('- 否定/缺失 + 物象:无/未/缺/空/断 + 物象');
170
+ lines.push('- 感官/媒介 + 信号:声/光/影/像 + 频/码/帧/噪');
171
+ lines.push('');
143
172
  lines.push('# 物象标准');
144
173
  lines.push('不是功能对象,而是被选中的细节:带质感、痕迹、仪式、禁忌、记忆或反常的具体形象。');
145
174
  lines.push('- 日历是对象;忌日那页、撕不掉的旧历是物象。');
@@ -450,6 +479,7 @@ export async function runNameStage({
450
479
 
451
480
  const screeningRank = new Map(screeningOrder.map((name, index) => [name, index]));
452
481
  const minScore = Math.max(1, Math.min(5, Number(config.minScore) || 4.5));
482
+ const supportScore = Math.max(1, Math.min(5, Number(config.supportScore) || 4.3));
453
483
  const ranked = panelNames
454
484
  .map((name) => {
455
485
  const scores = scoreMap.get(name) || { hook: [], distinct: [], image: [], clarity: [], natural: [], coldRead: [] };
@@ -459,6 +489,8 @@ export async function runNameStage({
459
489
  const clarity = average(scores.clarity);
460
490
  const natural = average(scores.natural);
461
491
  const coldRead = average(scores.coldRead);
492
+ const coreMin = Math.min(clarity, natural, coldRead);
493
+ const supportMin = Math.min(hook, distinct);
462
494
  return {
463
495
  name,
464
496
  hook,
@@ -467,17 +499,23 @@ export async function runNameStage({
467
499
  clarity,
468
500
  natural,
469
501
  coldRead,
502
+ coreMin,
503
+ supportMin,
504
+ qualified: coreMin >= minScore && supportMin >= supportScore,
470
505
  min: Math.min(hook, distinct, clarity, natural, coldRead),
471
506
  total: hook + distinct + image + clarity + natural + coldRead,
472
507
  rank: screeningRank.get(name) ?? 999,
473
508
  interpretation: interpretations.get(name) || '',
474
509
  };
475
510
  })
476
- .sort((a, b) => (b.min - a.min) || (b.total - a.total) || (a.rank - b.rank));
511
+ .sort((a, b) => (Number(b.qualified) - Number(a.qualified))
512
+ || (b.coreMin - a.coreMin)
513
+ || (b.total - a.total)
514
+ || (a.rank - b.rank));
477
515
 
478
516
  const needed = Math.max(0, keep - anchors.length);
479
517
  const selectedNew = [];
480
- const strictlyQualified = ranked.filter((row) => row.min >= minScore);
518
+ const strictlyQualified = ranked.filter((row) => row.qualified);
481
519
  for (const row of strictlyQualified) {
482
520
  if (selectedNew.length >= needed) break;
483
521
  if (anchorSet.has(row.name)) continue;
@@ -525,13 +563,11 @@ export async function runNameStage({
525
563
  const finishedAt = new Date().toISOString();
526
564
  const belowThreshold = selected
527
565
  .filter((row) => row.score)
528
- .filter((row) => Math.min(
529
- row.score.hook,
530
- row.score.distinct,
531
- row.score.clarity,
532
- row.score.natural,
533
- row.score.coldRead,
534
- ) < minScore)
566
+ .filter((row) => {
567
+ const coreMin = Math.min(row.score.clarity, row.score.natural, row.score.coldRead);
568
+ const supportMin = Math.min(row.score.hook, row.score.distinct);
569
+ return coreMin < minScore || supportMin < supportScore;
570
+ })
535
571
  .map((row) => row.name);
536
572
  const meta = {
537
573
  batchId,
@@ -547,6 +583,7 @@ export async function runNameStage({
547
583
  screeningTop: targetTop,
548
584
  judges: judgeCount,
549
585
  minScore,
586
+ supportScore,
550
587
  belowThreshold,
551
588
  calls,
552
589
  selected: selected.map((row) => row.name),
@@ -30,6 +30,7 @@ const DEFAULT_TEAM = Object.freeze({
30
30
  screeningTop: 30,
31
31
  judges: 3,
32
32
  minScore: 4.5,
33
+ supportScore: 4.3,
33
34
  anchorNames: [],
34
35
  styleAnchors: [],
35
36
  rejectedNames: [],
@@ -68,6 +69,7 @@ export function readTeamConfig(root) {
68
69
  screeningTop: clampInt(ns.screeningTop, 10, 200, 30),
69
70
  judges: clampInt(ns.judges, 1, 5, 3),
70
71
  minScore: Math.max(1, Math.min(5, Number(ns.minScore) || 4.5)),
72
+ supportScore: Math.max(1, Math.min(5, Number(ns.supportScore) || 4.3)),
71
73
  anchorNames: stringArray(ns.anchorNames, []),
72
74
  styleAnchors: stringArray(ns.styleAnchors, []),
73
75
  rejectedNames: stringArray(ns.rejectedNames, []),