test(core): keep narrative forecast tools available while a production task runs

rebase 到 master 后与工具门控(a975fb5)的集成裁决:叙事推演三工具只读写
story/runtime/narrative-forecasts/ 下的非正史产物,不修改正史章节与状态,
不属于门控要拦的会改书工具——suppressProductionTools 期间保留,flag 关闭
后的完整工具表断言同步补上这三个工具。
This commit is contained in:
Ma
2026-07-15 16:27:17 +08:00
parent 148b158348
commit 7dd07f49e8
@@ -940,6 +940,7 @@ describe("runAgentSession cache — bookId switch", () => {
// 同会话后台生产任务运行中:host 传 suppressProductionTools,工具表剔除
// 会创建/修改书籍与产物的生产工具,只保留读取与资料类工具。
// 叙事推演三工具只读写 story/runtime/ 下的非正史产物、不碰正史,任务运行期间保留。
await runAgentSession(
{ sessionId: "suppress-session", bookId: "book-a", language: "zh", pipeline, projectRoot, model, suppressProductionTools: true },
"任务在跑吗?",
@@ -949,6 +950,9 @@ describe("runAgentSession cache — bookId switch", () => {
"research_web",
"ingest_material",
"retrieve_material",
"create_narrative_forecast",
"get_narrative_forecast",
"select_narrative_branch",
"grep",
"ls",
]);
@@ -971,6 +975,9 @@ describe("runAgentSession cache — bookId switch", () => {
"ingest_material",
"retrieve_material",
"import_chapters",
"create_narrative_forecast",
"get_narrative_forecast",
"select_narrative_branch",
"grep",
"ls",
]);