drafted 1.10.2 → 1.11.0
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 +15 -3
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -2679,9 +2679,9 @@ function collectSkillTreeForPush(dir) {
|
|
|
2679
2679
|
return out;
|
|
2680
2680
|
}
|
|
2681
2681
|
|
|
2682
|
-
tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/guidelines agents can load and follow. Dispatch by `action`: search/load/list for discovery; add/update/remove for org skills; fork/push for source-only skills; attach/detach for project binding; favorite/unfavorite for personal pins; read_file/update_file for supporting files inside a skill directory.', {
|
|
2682
|
+
tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/guidelines agents can load and follow. Dispatch by `action`: search/load/list for discovery; history for a skill\'s version git-log; add/update/remove for org skills; fork/push for source-only skills; attach/detach for project binding; favorite/unfavorite for personal pins; read_file/update_file for supporting files inside a skill directory.', {
|
|
2683
2683
|
action: z.enum([
|
|
2684
|
-
'search', 'load', 'list',
|
|
2684
|
+
'search', 'load', 'list', 'history',
|
|
2685
2685
|
'add', 'update', 'remove',
|
|
2686
2686
|
'fork', 'push',
|
|
2687
2687
|
'attach', 'detach',
|
|
@@ -2694,7 +2694,8 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
2694
2694
|
limit: z.number().optional().describe('[search|list] max results per page (default 25, max 100)'),
|
|
2695
2695
|
offset: z.number().optional().describe('[search|list] skip N results for pagination (default 0). Response reports totalAvailable/returned/truncated.'),
|
|
2696
2696
|
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'),
|
|
2697
|
-
skill: z.string().optional().describe('[load] skill ID (UUID) or slug'),
|
|
2697
|
+
skill: z.string().optional().describe('[load|history] skill ID (UUID) or slug'),
|
|
2698
|
+
version: z.number().optional().describe('[history] fetch this version number\'s full snapshot (content included); omit for the reverse-chron version list'),
|
|
2698
2699
|
skillId: z.string().optional().describe('[update|remove|attach|detach|favorite|unfavorite|read_file|update_file] skill ID'),
|
|
2699
2700
|
projectId: z.string().optional().describe('[list] project to list skills for (defaults to active project; falls back to org-attached skills if no project)'),
|
|
2700
2701
|
name: z.string().optional().describe('[add|update] skill name'),
|
|
@@ -2732,6 +2733,17 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
2732
2733
|
if (result?.id) getSessionState().loadedSkillIds.add(result.id);
|
|
2733
2734
|
return ok(result);
|
|
2734
2735
|
}
|
|
2736
|
+
case 'history': {
|
|
2737
|
+
// Skill version git-log. Omit `version` for the list; pass it for a
|
|
2738
|
+
// single version's full snapshot (content for view/diff).
|
|
2739
|
+
const { skillId, skill: slugArg, version, org } = args;
|
|
2740
|
+
const extra = org ? { 'X-Drafted-Org': org } : {};
|
|
2741
|
+
let id = skillId;
|
|
2742
|
+
if (!id && slugArg) { const s = await api('GET', `/api/skills/slug/${slugArg}`, undefined, extra); id = s.id; }
|
|
2743
|
+
if (!id) throw new Error('skillId or skill (slug) required for action=history');
|
|
2744
|
+
if (version != null) return ok(await api('GET', `/api/skills/${id}/versions/${version}`, undefined, extra));
|
|
2745
|
+
return ok(await api('GET', `/api/skills/${id}/versions`, undefined, extra));
|
|
2746
|
+
}
|
|
2735
2747
|
case 'list': {
|
|
2736
2748
|
if (args.scope || args.tags?.length) {
|
|
2737
2749
|
const params = new URLSearchParams();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
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": [
|