feat(platform): Agent 与媒体能力 - 完善角色卡、音频协议与任务恢复链路
This commit is contained in:
1 parent
a8f83fedd5
commit
5650da6d31
91 files changed
+3438
-380
No files matched your search
@@ -106,8 +106,8 @@ func validateCloudAgentConnection(nodes []map[string]any, fromID, toID string, e
|
||||
if from == nil || to == nil {
|
||||
return BadAuthRequest("连线端点不存在")
|
||||
}
|
||||
fromCapability, fromKnown := cloudAgentNodeCapabilityForType(stringValue(from["type"]))
|
||||
toCapability, toKnown := cloudAgentNodeCapabilityForType(stringValue(to["type"]))
|
||||
fromCapability, fromKnown := cloudAgentNodeCapabilityForNode(from)
|
||||
toCapability, toKnown := cloudAgentNodeCapabilityForNode(to)
|
||||
if !fromKnown || !toKnown {
|
||||
return BadAuthRequest("连线包含当前 Agent 不支持的节点类型")
|
||||
}
|
||||
@@ -185,6 +185,10 @@ func cloudAgentNodeTypes() map[string]any {
|
||||
"defaultSize": map[string]any{"width": capability.DefaultWidth, "height": capability.DefaultHeight},
|
||||
"canUpdate": capability.CanUpdate,
|
||||
}
|
||||
if variant := capability.Variant; variant != nil {
|
||||
// 变体不能 add_node;画布里按 type+metadata.workflowKind 识别,读取结果以 kind 标出。
|
||||
item["canvasNodeType"], item["workflowKind"], item["creatable"] = variant.BaseType, variant.WorkflowKind, false
|
||||
}
|
||||
if len(capability.GoodFor) > 0 {
|
||||
item["goodFor"] = capability.GoodFor
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user