feat(skills): Scope B A2 — 4 竞品生成器注册表+上下文分派+端点接线
注册表 TOOLBOX +4 entry(continue/expand/de-ai/teardown,全 preview-only writes=[]); ContextStrategy +with_prior_chapter/text_input;ToolGenerateRequest +text 字段。 toolbox_context 分派新策略(续写→build_continuation_context、原文→build_text_input_context); 路由续写经 chapter_repo 读最新 accepted/draft 正文注入 builder(core 不 import apps/api,仿 accept_op)。 预览仅 commit ledger 不写业务表(#3);只声明 tier(#2);system_prompt 进缓存前缀(#9)。 单测:4 生成器 generate 预览 + 续写读前文/草稿路由 + 扩写/降AI text 路由 + 拆书结构化; 更新 registry/strategy 计数测试(15 工具 / 6 策略)。门禁绿:ruff/format/mypy 196 files/pytest 168(api)+32(skills)。
This commit is contained in:
@@ -24,16 +24,20 @@ from ww_shared import AppError, ErrorCode
|
||||
|
||||
from ww_skills.skill_permissions import KNOWN_TABLES
|
||||
|
||||
# 注入策略:决定为该生成器组哪些材料喂给网关(覆盖全部生成器,~4 种)。
|
||||
# 注入策略:决定为该生成器组哪些材料喂给网关(覆盖全部生成器)。
|
||||
# - brief_only:项目立意 + 用户一句话(脑洞/书名);
|
||||
# - with_project:+ 主线/卖点(简介);
|
||||
# - with_world:+ world_entities 卡(名字/金手指/词条——须契合世界观硬规则);
|
||||
# - with_outline_chapter:+ 指定章 outline beats(细纲/黄金开篇)。
|
||||
# - with_outline_chapter:+ 指定章 outline beats(细纲/黄金开篇);
|
||||
# - with_prior_chapter:+ 最新已写正文(续写——端点先读最新 accepted/draft 正文注入);
|
||||
# - text_input:+ 作者提供的原文(扩写/降AI率/拆书样本——经请求 text 字段注入)。
|
||||
ContextStrategy = Literal[
|
||||
"brief_only",
|
||||
"with_project",
|
||||
"with_world",
|
||||
"with_outline_chapter",
|
||||
"with_prior_chapter",
|
||||
"text_input",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user