feat(core): 追加 GeneratedQuestion frozen dataclass

跨层共享类型,被 core/evolution/ 和 app/harness/、app/question_gen/ 使用。
frozen=True + tuple 字段确保不可变。无默认值(显式传入)。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-07 04:36:56 -04:00
parent 4686adf266
commit eea3bcba3f
2 changed files with 81 additions and 4 deletions
+28
View File
@@ -23,3 +23,31 @@ class LLMResponse:
max_inter_token_ms: float | None
cache_hit: bool
call_id: str
@dataclass(frozen=True)
class GeneratedQuestion:
"""单条生成/加载的题目。
跨层共享类型,被 core/evolution/ 和 app/harness/、app/question_gen/ 使用。
frozen=True 确保题目不可变。
属性:
question_id: 题目唯一标识。
video_id: 所属视频标识。
task_type: 题型(如 "Action Reasoning")。
question: 题目文本。
options: 选项元组(如 ("A. ...", "B. ...", "C. ...", "D. ..."))。
answer: 正确答案字母(如 "B")。
source_nodes: 来源节点 ID 元组。
difficulty: 难度等级。
"""
question_id: str
video_id: str
task_type: str
question: str
options: tuple[str, ...]
answer: str
source_nodes: tuple[str, ...]
difficulty: str