feat: 第一季九章完整剧本与引擎(chapters 4-9、相处线索报告替代七维评分、采样覆盖驱动支线插入、consent v2、报告页隐私区块完善)+ 跨 agent 断点修复

This commit is contained in:
Jayway Liu
2026-10-04 13:26:08 +08:00
parent 9ac1162f00
commit 9c48b2a39f
31 changed files with 3836 additions and 185 deletions
+3 -5
View File
@@ -12,7 +12,7 @@
* consent 存证删除后回到未同意态、可重新同意并继续走剧情。
* 运行:pnpm verify
*/
import { readFileSync } from 'node:fs';
import { ACT1 as chapters } from '../src/engine/chapters';
import { CONSENT_VERSION, StoryEngine } from '../src/engine/engine';
import { LocalStorageEventStore } from '../src/engine/eventStore';
import type { EventStore, StoryEvent } from '../src/engine/eventStore';
@@ -20,7 +20,7 @@ import { choiceFlags, deriveFlags, narrationFlags } from '../src/engine/flags';
import { buildState } from '../src/engine/scoring';
import { MemoryProgressStore } from '../src/engine/progress';
import { SqliteEventStore } from '../src/engine/sqliteEventStore';
import type { Chapter, ChoiceNode, IdentityProfile, NarrationNode } from '../src/engine/types';
import type { ChoiceNode, IdentityProfile, NarrationNode } from '../src/engine/types';
import { FOLLOW_UP_DIMENSIONS } from '../src/engine/types';
import { MockJevClient } from '../src/services/jev';
import type { JevAnswer, JevQuestion } from '../src/services/jev';
@@ -60,9 +60,6 @@ class MemoryStore implements EventStore {
}
}
const chapters = [1, 2, 3].map(
(i) => JSON.parse(readFileSync(new URL(`../content/chapters/chapter${i}.json`, import.meta.url), 'utf8')) as Chapter,
);
let failures = 0;
function check(ok: boolean, msg: string) {
@@ -587,3 +584,4 @@ if (failures > 0) {
}
console.log('\n全部校验通过');
await import('./verify-adaptive');
await import('./verify-ondevice-asr');