向导阶段(project 未建)一键推演结构化书级蓝图预填立项向导。 - 新 SPEC project_plan_spec(analyst 档,纯预览 reads/writes=())+ schema ProjectPlanResult(书名候选 + 时空背景/叙事结构/故事核心/结局设计/基调, 全字段默认值守解析韧性)+ 注册 SCHEMA_CATALOG;计数三处 21→22 + regen golden。 - 端点 POST /skills/project-plan/generate(不带 project 前缀,绕开 toolbox 404): 请求体序列化向导草稿为 project_context,复用 build_brief_context + run_generator; 种子门控(缺 genre/logline→422);请求 schema 加 max_length 上界。 - run_generator/_build_request 的 project_id 放宽 uuid.UUID|None(向导无 project)。 - 前端 wizard.ts 加 mapPlanResultToWizardForm(错配字段折进 premise 不静默丢)+ applyPlanPatch(仅回填空字段、保护已编辑)+ useProjectPlan hook + PlanAssistant。
152 lines
3.2 KiB
Python
152 lines
3.2 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 .prompt_loader import PromptNotFoundError, load_craft_doctrine, load_prompt
|
||
from .schema_catalog import SCHEMA_CATALOG, output_schema_for
|
||
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,
|
||
ProjectPlanResult,
|
||
Scene,
|
||
StyleDimension,
|
||
StyleDriftReview,
|
||
StyleDriftSegment,
|
||
StyleFingerprintResult,
|
||
Title,
|
||
TitleListResult,
|
||
WorldEntityCard,
|
||
WorldGenResult,
|
||
)
|
||
from .specs import (
|
||
REVIEW_RESERVED_NAMES,
|
||
SPECS,
|
||
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,
|
||
project_plan_spec,
|
||
refiner_spec,
|
||
style_drift_spec,
|
||
style_extract_spec,
|
||
teardown_spec,
|
||
worldbuilder_spec,
|
||
)
|
||
|
||
__all__ = [
|
||
"REVIEW_RESERVED_NAMES",
|
||
"SCHEMA_CATALOG",
|
||
"SPECS",
|
||
"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",
|
||
"PromptNotFoundError",
|
||
"OutlineResult",
|
||
"PaceIssue",
|
||
"PaceReview",
|
||
"PolishResult",
|
||
"ProjectPlanResult",
|
||
"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",
|
||
"load_craft_doctrine",
|
||
"load_prompt",
|
||
"name_spec",
|
||
"opening_spec",
|
||
"outliner_spec",
|
||
"output_schema_for",
|
||
"pace_spec",
|
||
"project_plan_spec",
|
||
"refiner_spec",
|
||
"style_drift_spec",
|
||
"style_extract_spec",
|
||
"teardown_spec",
|
||
"worldbuilder_spec",
|
||
]
|