(content)
| 896 | }; |
| 897 | |
| 898 | const parseAgentMarkdown = (content) => { |
| 899 | const match = content.match(/^---\s*\r?\n([\s\S]*?)\r?\n---\s*\r?\n?([\s\S]*)$/); |
| 900 | if (!match) return { data: {}, body: content }; |
| 901 | let data = {}; |
| 902 | try { |
| 903 | data = yaml.load(match[1]) || {}; |
| 904 | } catch { |
| 905 | data = {}; |
| 906 | } |
| 907 | return { data, body: match[2] || '' }; |
| 908 | }; |
| 909 | |
| 910 | const buildAgentMarkdown = (frontmatter, body) => { |
| 911 | const yamlText = yaml.dump(frontmatter, { lineWidth: 120, noRefs: true, quotingType: '"' }); |
no outgoing calls
no test coverage detected