drafted 1.12.4 → 1.12.5
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 -3
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -3113,7 +3113,7 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
3113
3113
|
path: z.string().optional().describe('[read_file|update_file] relative path inside skill directory (e.g. "examples/react.md")'),
|
|
3114
3114
|
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'),
|
|
3115
3115
|
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.'),
|
|
3116
|
-
org: z.string().optional().describe('[fork|push|update] resolve/fork into this Drafted org (id or name); scopes the request without switching the active org'),
|
|
3116
|
+
org: z.string().optional().describe('[add] org (id or name) to create the skill in — defaults to the bound/active org; [fork|push|update] resolve/fork into this Drafted org (id or name); scopes the request without switching the active org'),
|
|
3117
3117
|
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"]'),
|
|
3118
3118
|
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'),
|
|
3119
3119
|
dir: z.string().optional().describe('[push] local directory to push instead of files[]; walked locally (heavy dirs, .skillinstall/, and .skillignore pre-filtered), server re-enforces. On push the dir\'s .gitignore is auto-updated to exclude .skillinstall/ (the rebuildable bundle).'),
|
|
@@ -3194,13 +3194,16 @@ tool('skill', 'Manage the Drafted skill library. Skills are reusable prompts/gui
|
|
|
3194
3194
|
case 'add': {
|
|
3195
3195
|
const g2 = g2Block(getSessionState().gates);
|
|
3196
3196
|
if (g2) return err(new Error(g2));
|
|
3197
|
-
const { name, description, content, tags, triggerPatterns, setup } = args;
|
|
3197
|
+
const { name, description, content, tags, triggerPatterns, setup, org } = args;
|
|
3198
3198
|
if (!name || !description || !content) throw new Error('name, description, content required for action=add');
|
|
3199
3199
|
const body = { name, description, content };
|
|
3200
3200
|
if (tags) body.tags = tags;
|
|
3201
3201
|
if (triggerPatterns) body.triggerPatterns = triggerPatterns;
|
|
3202
3202
|
if (setup !== undefined) body.setup = setup;
|
|
3203
|
-
|
|
3203
|
+
// org names where the skill is born (UUID-first model: org is explicit at
|
|
3204
|
+
// create) — without this the bound-org guard accepts org= but the write
|
|
3205
|
+
// would land in the session org anyway.
|
|
3206
|
+
return ok(await api('POST', '/api/skills', body, org ? { 'X-Drafted-Org': org } : {}));
|
|
3204
3207
|
}
|
|
3205
3208
|
case 'update': {
|
|
3206
3209
|
// Auto-fork-on-update (tool behavior): if the target is read-only (global/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.5",
|
|
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": [
|