续写/扩写/降AI率/拆书 4 个生成器的声明(preview-only writes=[],只声明 tier #2): - schemas.py: ContinuationResult/PolishResult/DeAiResult/BookTeardownResult - specs.py: continue(writer)/expand(writer)/de-ai(analyst)/teardown(analyst),各配 system_prompt - generation_node.py: build_continuation_context(续写读前文)/build_text_input_context(原文输入) - 单测: 4 spec/schema 契约 + 2 builder 纯函数(确定性/空值降级) 守不变量 #2(只声明 tier)/#3(纯预览不写库)/#9(system_prompt 进缓存前缀)。
137 lines
2.7 KiB
Python
137 lines
2.7 KiB
Python
"""ww-agents:内置 Agent 声明(AgentSpec)+ 结构化输出 schema(C6)。
|
||
|
||
对齐 ARCH §5.1(AgentSpec)/ §5.4(I/O 契约)/ §6.1(冲突分类)/ §6.2 §6.4(伏笔/节奏)。
|
||
"""
|
||
|
||
from __future__ import annotations
|
||
|
||
from .schemas import (
|
||
Blurb,
|
||
BlurbResult,
|
||
BookTeardownResult,
|
||
CharacterCard,
|
||
CharacterGenResult,
|
||
CharacterRelation,
|
||
Conflict,
|
||
ConflictType,
|
||
ContinuationResult,
|
||
ContinuityReview,
|
||
DeAiResult,
|
||
DetailedOutlineResult,
|
||
ForeshadowReview,
|
||
ForeshadowSuggestion,
|
||
ForeshadowWindow,
|
||
GlossaryResult,
|
||
GlossaryTerm,
|
||
GoldenFinger,
|
||
GoldenFingerResult,
|
||
Idea,
|
||
IdeaListResult,
|
||
NameListResult,
|
||
NameSuggestion,
|
||
Opening,
|
||
OpeningResult,
|
||
OutlineChapter,
|
||
OutlineResult,
|
||
PaceIssue,
|
||
PaceReview,
|
||
PolishResult,
|
||
Scene,
|
||
StyleDimension,
|
||
StyleDriftReview,
|
||
StyleDriftSegment,
|
||
StyleFingerprintResult,
|
||
Title,
|
||
TitleListResult,
|
||
WorldEntityCard,
|
||
WorldGenResult,
|
||
)
|
||
from .specs import (
|
||
AgentSpec,
|
||
blurb_spec,
|
||
book_title_spec,
|
||
brainstorm_spec,
|
||
character_gen_spec,
|
||
continue_spec,
|
||
continuity_spec,
|
||
de_ai_spec,
|
||
expand_spec,
|
||
fine_outline_spec,
|
||
foreshadow_spec,
|
||
glossary_spec,
|
||
golden_finger_spec,
|
||
name_spec,
|
||
opening_spec,
|
||
outliner_spec,
|
||
pace_spec,
|
||
refiner_spec,
|
||
style_drift_spec,
|
||
style_extract_spec,
|
||
teardown_spec,
|
||
worldbuilder_spec,
|
||
)
|
||
|
||
__all__ = [
|
||
"AgentSpec",
|
||
"Blurb",
|
||
"BlurbResult",
|
||
"BookTeardownResult",
|
||
"CharacterCard",
|
||
"CharacterGenResult",
|
||
"CharacterRelation",
|
||
"Conflict",
|
||
"ConflictType",
|
||
"ContinuationResult",
|
||
"ContinuityReview",
|
||
"DeAiResult",
|
||
"DetailedOutlineResult",
|
||
"ForeshadowReview",
|
||
"ForeshadowSuggestion",
|
||
"ForeshadowWindow",
|
||
"GlossaryResult",
|
||
"GlossaryTerm",
|
||
"GoldenFinger",
|
||
"GoldenFingerResult",
|
||
"Idea",
|
||
"IdeaListResult",
|
||
"NameListResult",
|
||
"NameSuggestion",
|
||
"Opening",
|
||
"OpeningResult",
|
||
"OutlineChapter",
|
||
"OutlineResult",
|
||
"PaceIssue",
|
||
"PaceReview",
|
||
"PolishResult",
|
||
"Scene",
|
||
"StyleDimension",
|
||
"StyleDriftReview",
|
||
"StyleDriftSegment",
|
||
"StyleFingerprintResult",
|
||
"Title",
|
||
"TitleListResult",
|
||
"WorldEntityCard",
|
||
"WorldGenResult",
|
||
"blurb_spec",
|
||
"book_title_spec",
|
||
"brainstorm_spec",
|
||
"character_gen_spec",
|
||
"continue_spec",
|
||
"continuity_spec",
|
||
"de_ai_spec",
|
||
"expand_spec",
|
||
"fine_outline_spec",
|
||
"foreshadow_spec",
|
||
"glossary_spec",
|
||
"golden_finger_spec",
|
||
"name_spec",
|
||
"opening_spec",
|
||
"outliner_spec",
|
||
"pace_spec",
|
||
"refiner_spec",
|
||
"style_drift_spec",
|
||
"style_extract_spec",
|
||
"teardown_spec",
|
||
"worldbuilder_spec",
|
||
]
|