feat(platform): Agent 与媒体能力 - 完善角色卡、音频协议与任务恢复链路
This commit is contained in:
1 parent
a8f83fedd5
commit
5650da6d31
91 files changed
+3438
-380
No files matched your search
@@ -620,13 +620,26 @@ func TestCloudAgentToolLoopPersistsApprovalAndAppliesCanvasWrite(t *testing.T) {
|
||||
func TestCloudAgentNodeTypesExposeExecutableAllowList(t *testing.T) {
|
||||
result := cloudAgentNodeTypes()
|
||||
nodes, ok := result["nodes"].([]map[string]any)
|
||||
if !ok || len(nodes) != 8 {
|
||||
if !ok || len(nodes) != 9 {
|
||||
t.Fatalf("unexpected node registry: %#v", result)
|
||||
}
|
||||
var character map[string]any
|
||||
for _, node := range nodes {
|
||||
if node["type"] == "panorama" {
|
||||
t.Fatal("UI-only node must not be exposed")
|
||||
}
|
||||
if node["type"] == "character" {
|
||||
character = node
|
||||
}
|
||||
}
|
||||
// 角色卡必须被 Agent 发现,但只是 text 节点的变体:不能出现在 add_node 的 nodeType 枚举里。
|
||||
if character == nil || character["creatable"] != false || character["canvasNodeType"] != "text" || character["workflowKind"] != "character" || character["canReference"] != true {
|
||||
t.Fatalf("character capability is not discoverable as a non-creatable variant: %#v", character)
|
||||
}
|
||||
for _, nodeType := range cloudAgentNodeTypeNames() {
|
||||
if nodeType == "character" {
|
||||
t.Fatal("character variant must not be creatable through add_node")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user