(value any)
| 868 | return stringFieldByNames(rv, "SkillName", "skill_name"), stringFieldByNames(rv, "Command", "command"), true |
| 869 | } |
| 870 | |
| 871 | func normalizeMCPTrustRequest(value any) ([]map[string]any, bool) { |
| 872 | switch req := value.(type) { |
| 873 | case nil: |
| 874 | return nil, false |
| 875 | case []map[string]any: |
| 876 | return req, true |
| 877 | case []any: |
| 878 | items := make([]map[string]any, 0, len(req)) |
| 879 | for _, raw := range req { |
| 880 | if item, ok := mapStringAny(raw); ok { |
| 881 | items = append(items, item) |
| 882 | } |
| 883 | } |
| 884 | return items, true |
| 885 | default: |
| 886 | rv := reflect.ValueOf(value) |
| 887 | if rv.Kind() == reflect.Slice || rv.Kind() == reflect.Array { |
| 888 | items := make([]map[string]any, 0, rv.Len()) |
| 889 | for i := 0; i < rv.Len(); i++ { |
| 890 | if item, ok := mapStringAny(rv.Index(i).Interface()); ok { |
| 891 | items = append(items, item) |
| 892 | } |
| 893 | } |
| 894 | return items, true |
| 895 | } |
| 896 | } |
| 897 | return nil, false |
| 898 | } |
| 899 | |
| 900 | func normalizeSandboxSetupRequest(value any) (map[string]any, bool) { |
| 901 | return mapStringAny(value) |
| 902 | } |
| 903 | |
| 904 | func sandboxSetupTarget(request map[string]any, toolCall any) string { |
no test coverage detected