(frontmatter map[string]any)
| 251 | } |
| 252 | |
| 253 | func collectUnexpectedIncludedFrontmatterFields(frontmatter map[string]any) []string { |
| 254 | validFields := map[string]struct { |
| 255 | }{ |
| 256 | "tools": {}, |
| 257 | "engine": {}, |
| 258 | "env": {}, |
| 259 | "network": {}, |
| 260 | "mcp-servers": {}, |
| 261 | "imports": {}, |
| 262 | "name": {}, |
| 263 | "description": {}, |
| 264 | "steps": {}, |
| 265 | "jobs": {}, |
| 266 | "safe-outputs": {}, |
| 267 | "mcp-scripts": {}, |
| 268 | "services": {}, |
| 269 | "runtimes": {}, |
| 270 | "permissions": {}, |
| 271 | "secret-masking": {}, |
| 272 | "inputs": {}, |
| 273 | "import-schema": {}, |
| 274 | "features": {}, |
| 275 | } |
| 276 | var unexpectedFields []string |
| 277 | for key := range frontmatter { |
| 278 | if !setutil.Contains(validFields, key) { |
| 279 | unexpectedFields = append(unexpectedFields, key) |
| 280 | } |
| 281 | } |
| 282 | return unexpectedFields |
| 283 | } |
| 284 | |
| 285 | func filterIncludedFrontmatterForRelaxedValidation(frontmatter map[string]any, isAgentFile bool) map[string]any { |
| 286 | hasExpressions := frontmatterContainsExpressions(frontmatter) |
no test coverage detected