note.mjs
16 lines 440 B
Raw
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd feat(calendar): enforce agent context tiers in retrieval AP… Human minor ⚠ breaking 1 day ago
1 /**
2 * Single-note markdown serialization for MCP note resources (Issue #1 Phase A1).
3 */
4
5 import yaml from 'js-yaml';
6
7 /**
8 * @param {{ path: string, frontmatter: object, body: string }} note
9 * @returns {string}
10 */
11 export function noteToMarkdown(note) {
12 const fm = note.frontmatter && Object.keys(note.frontmatter).length > 0
13 ? `---\n${yaml.dump(note.frontmatter).trimEnd()}\n---\n`
14 : '';
15 return `${fm}${note.body || ''}`;
16 }
File History 2 commits
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd feat(calendar): enforce agent context tiers in retrieval AP… Human minor 1 day ago
sha256:9103f98c89257ed2b01c237cea895dabb3e85ea337dccb1161c175e4422355b6 docs: accept Calendar Events v0 spec with Phase 0 security … Human 1 day ago