fix(ddic): create 命令消费 JSON description(--description 优先→JSON→回退名);upload testclasses XML 包裹通道(S4T 三轮实证);SKILL 错误速查表 +4 条 NW740 实证(ADT 创建不持久化文本/classes 激活空响应/unknown comments/STRG+comptype 陷阱)

This commit is contained in:
吴让宇
2026-09-14 10:37:43 +08:00
parent 43037e2379
commit 66ec30fc99
6 changed files with 72 additions and 4 deletions
+21
View File
@@ -859,6 +859,27 @@ def cmd_create(args: argparse.Namespace, client: ADTClient) -> None:
source_file: str | None = getattr(args, "source", None)
definition_file: str | None = getattr(args, "definition", None)
# JSON definition description: --description wins, then JSON, then name.
# (NW740 ADT create does not persist texts anyway — see SKILL.md known
# limitation; this only affects the XML body sent at creation time.)
if (
definition_file
and not getattr(args, "description", None)
and obj_type in DDIC_TYPES
):
import json as _json
import os as _os
if _os.path.isfile(definition_file):
try:
with open(definition_file, "r", encoding="utf-8") as f:
_data = _json.load(f)
_json_desc = _data.get("description")
if _json_desc:
description = _json_desc
except Exception as _e:
logger.warning("读取定义文件 description 失败: %s", _e)
type_label = get_type_config(obj_type).label
if obj_type == "function":