爆款/拆镜生成简化3个步骤 | 项目生成可携带附件控制

This commit is contained in:
2026-07-21 14:01:08 +08:00
parent 40efcf55cf
commit 79c09151ba
60 changed files with 4250 additions and 924 deletions
@@ -81,7 +81,19 @@ def build_step_output(
def is_wrapped_step_io(value: Any, *, schema_version: str = STEP_IO_SCHEMA_VERSION) -> bool:
return isinstance(value, dict) and value.get("schema_version") == schema_version
if not isinstance(value, dict):
return False
current = str(value.get("schema_version") or "")
if current == schema_version:
return True
# V1/V2 查询接口共用同一组解析器。只要结构符合统一步骤 IO 包装,
# 即按包装结构解析,避免 V2 被当成普通 payload。
return bool(
current
and value.get("step_code")
and "payload" in value
and ("status" in value or "source" in value)
)
def step_payload(value: Any, *, schema_version: str = STEP_IO_SCHEMA_VERSION) -> dict[str, Any]: