drafted 1.17.14 → 1.17.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/mcp/server.mjs +6 -1
  2. package/package.json +1 -1
package/mcp/server.mjs CHANGED
@@ -2812,7 +2812,12 @@ tool('fs', 'Navigate Drafted like a local filesystem. An org is the top folder:
2812
2812
  // OKF boundary rule: /a/b.md ≡ a/b — strip a trailing .md so both spellings work.
2813
2813
  const canonPath = wikiPath.replace(/\.md$/, '');
2814
2814
  const existing = await api('GET', `/api/wiki/page?path=${encodeURIComponent(canonPath)}`, undefined, orgHeader).catch(() => null);
2815
- const body = { path: canonPath, title: canonPath.split('/').pop(), content, type: existing?.type || 'Page' };
2815
+ // Send ONLY { path, content }. An explicit `type`/`title` outranks the
2816
+ // content preamble server-side (PATCH semantics), so defaulting them
2817
+ // here silently forced every MCP-created page to type "Page" and a
2818
+ // path-segment title, discarding the author's frontmatter. The server
2819
+ // lifts both from the preamble and falls back to the path segment.
2820
+ const body = { path: canonPath, content };
2816
2821
  const result = existing
2817
2822
  ? await api('PUT', `/api/wiki/page?path=${encodeURIComponent(canonPath)}`, { content }, orgHeader)
2818
2823
  : await api('POST', '/api/wiki/pages', body, orgHeader);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drafted",
3
- "version": "1.17.14",
3
+ "version": "1.17.15",
4
4
  "description": "Drafted — visual thinking surface for humans and AI agents. Renders HTML, markdown, images, and code as frames on a zoomable canvas, with MCP tools for AI agents and real-time sync for humans.",
5
5
  "type": "module",
6
6
  "files": [