drafted 1.11.15 → 1.11.16
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 +8 -3
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -2822,7 +2822,6 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
2822
2822
|
tags: z.array(z.string()).optional().describe('[search] filter by tags; [add|update] tag list'),
|
|
2823
2823
|
scope: z.enum(['all', 'org', 'global']).optional().describe('[search|list] library scope (default: all for search; when provided to list, lists the library instead of project/org attachments)'),
|
|
2824
2824
|
limit: z.number().optional().describe('[search|list] max results per page (default 25, max 100)'),
|
|
2825
|
-
offset: z.number().optional().describe('[search|list] skip N results for pagination (default 0). Response reports totalAvailable/returned/truncated.'),
|
|
2826
2825
|
compact: z.boolean().optional().describe('[search|list] return only {slug,name,tags} per skill instead of full summaries — for browsing large catalogs within token budget'),
|
|
2827
2826
|
skill: z.string().optional().describe('[load|history] skill ID (UUID) or slug'),
|
|
2828
2827
|
version: z.number().optional().describe('[history] fetch this version number\'s full snapshot (content included); omit for the reverse-chron version list'),
|
|
@@ -2833,6 +2832,8 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
2833
2832
|
content: z.string().optional().describe('[add|update] root SKILL.md content; [update_file] file content'),
|
|
2834
2833
|
triggerPatterns: z.array(z.string()).optional().describe('[add|update] patterns that suggest this skill'),
|
|
2835
2834
|
path: z.string().optional().describe('[read_file|update_file] relative path inside skill directory (e.g. "examples/react.md")'),
|
|
2835
|
+
offset: z.number().optional().describe('[search|list] skip N results for pagination; [read_file] start reading at this byte offset (default 0) — for large files (e.g. a >90KB app-frame bundle) read in chunks using the returned nextOffset until truncated=false'),
|
|
2836
|
+
maxBytes: z.number().optional().describe('[read_file] return at most this many bytes from offset (default: whole remaining file). Response reports totalSize/offset/truncated/nextOffset.'),
|
|
2836
2837
|
org: z.string().optional().describe('[fork|push|update] resolve/fork into this Drafted org (id or name); scopes the request without switching the session'),
|
|
2837
2838
|
setup: z.array(z.string()).optional().describe('[add|update] setup command(s) (in order) run on materialize to build a source-only skill, e.g. ["npm ci","npm run build"]'),
|
|
2838
2839
|
files: z.array(z.object({ path: z.string(), content: z.string() })).optional().describe('[push] source files to push (path + UTF-8 content); server strips artifacts + enforces caps'),
|
|
@@ -3020,9 +3021,13 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
3020
3021
|
return ok(await api('DELETE', `/api/skills/favorites/${skillId}`));
|
|
3021
3022
|
}
|
|
3022
3023
|
case 'read_file': {
|
|
3023
|
-
const { skillId, path } = args;
|
|
3024
|
+
const { skillId, path, offset, maxBytes } = args;
|
|
3024
3025
|
if (!skillId || !path) throw new Error('skillId and path required for action=read_file');
|
|
3025
|
-
|
|
3026
|
+
const params = new URLSearchParams();
|
|
3027
|
+
if (offset != null) params.set('offset', String(offset));
|
|
3028
|
+
if (maxBytes != null) params.set('maxBytes', String(maxBytes));
|
|
3029
|
+
const qs = params.toString();
|
|
3030
|
+
return ok(await api('GET', `/api/skills/${skillId}/files/${path}${qs ? `?${qs}` : ''}`));
|
|
3026
3031
|
}
|
|
3027
3032
|
case 'update_file': {
|
|
3028
3033
|
const { skillId, path, content } = args;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.16",
|
|
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": [
|