drafted 1.19.47 → 1.19.48
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.
- package/mcp/server.mjs +6 -1
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -4018,7 +4018,12 @@ tool('fs', 'Navigate Drafted like a local filesystem. A FOLDER is the single con
|
|
|
4018
4018
|
// App frames (drafted:frame-type=app) carry a separate hydration state —
|
|
4019
4019
|
// return the state + a content preview rather than the full bundle, which
|
|
4020
4020
|
// is usually a large minified JS blob that would blow the tool-result cap.
|
|
4021
|
-
|
|
4021
|
+
// Classification comes from the server (result.appFrame — one detector,
|
|
4022
|
+
// from looksLikeAppFrame); the legacy regex below only covers servers that
|
|
4023
|
+
// predate the flag, and the server's answer always wins.
|
|
4024
|
+
const isAppFrame = result?.id && (result.appFrame === true ||
|
|
4025
|
+
(result.appFrame == null && /drafted:frame-type[^>]*content="app"/.test(result.content || '')));
|
|
4026
|
+
if (isAppFrame) {
|
|
4022
4027
|
let state = null;
|
|
4023
4028
|
try { const st = await api('GET', `/api/file/${result.id}/state`); state = st?.state ?? null; } catch { /* best-effort */ }
|
|
4024
4029
|
return ok({ appFrame: true, frameId: result.id, frameUrl: `${getServerUrl()}/f/${result.id}`, state, contentPreview: (result.content || '').slice(0, 500) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.48",
|
|
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": [
|