drafted 1.8.3 → 1.8.4

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 +10 -1
  2. package/package.json +1 -1
package/mcp/server.mjs CHANGED
@@ -755,7 +755,16 @@ async function api(method, path, body, _retried) {
755
755
  }
756
756
 
757
757
  if (!res.ok) {
758
- const msg = data.error || `HTTP ${res.status}`;
758
+ let msg = data.error || `HTTP ${res.status}`;
759
+ // Hashline edits (frame.edit, wiki edit) report a per-op `errors` array.
760
+ // Surface each one so the agent can fix the specific operation instead of
761
+ // seeing only the generic "Edit could not be applied".
762
+ if (Array.isArray(data.errors) && data.errors.length) {
763
+ const detail = data.errors
764
+ .map(e => ` • ${Number.isInteger(e.index) ? `op ${e.index + 1}: ` : ''}${e.error}`)
765
+ .join('\n');
766
+ msg += `\n${detail}`;
767
+ }
759
768
  // The active project no longer resolves in the current org context.
760
769
  // This is the silent-drift bug: project.open set a project, then
761
770
  // something switched the active org (parallel agent, browser tab, or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drafted",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
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": [