drafted 1.25.3 → 1.25.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.
- package/mcp/server.mjs +8 -3
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -2829,7 +2829,10 @@ tool('trigger', {
|
|
|
2829
2829
|
dailyLimit: z.number().optional().describe('[create|update] max deliveries per UTC day (default 50) — the cost cap.'),
|
|
2830
2830
|
enabled: z.boolean().optional().describe('[update] enable/disable the trigger (the kill switch). Re-enabling resets the failure counter.'),
|
|
2831
2831
|
payload: z.object({}).passthrough().optional().describe('[test] synthetic payload for the test delivery (default { test: true }).'),
|
|
2832
|
-
executor: z.enum(['minion', 'queue']).optional().describe('[create|update] who runs deliveries: "minion" (default) runs the server-side agent immediately; "queue" parks deliveries for a LOCAL agent to poll via pending/claim/complete — use this to relay webhooks to yourself or a scheduled Causeway session.'),
|
|
2832
|
+
executor: z.enum(['minion', 'queue', 'automation']).optional().describe('[create|update] who runs deliveries: "minion" (default) runs the server-side agent immediately; "queue" parks deliveries for a LOCAL agent to poll via pending/claim/complete — use this to relay webhooks to yourself or a scheduled Causeway session; "automation" runs a skill\'s chain (automationSkill) at a pinned version in Drafted for each delivery, payload as the untrusted input trigger.json — only an org OWNER can create one or move its pin, and the chain must use built-ins Drafted runs (template@1, approval@1, when:).'),
|
|
2833
|
+
automationSkill: z.string().optional().describe('[create|update, executor=automation] the skill whose chain runs: its slug or id, in the project\'s org.'),
|
|
2834
|
+
automationChain: z.string().optional().describe('[create|update, executor=automation] which named chain (default "default").'),
|
|
2835
|
+
automationSkillVersion: z.number().optional().describe('[create|update, executor=automation] the pinned skill version to run (default: the skill\'s current version). Moving the pin is publishing: owner only.'),
|
|
2833
2836
|
deliveryId: z.string().optional().describe('[complete] delivery ID returned by claim'),
|
|
2834
2837
|
ok: z.boolean().optional().describe('[complete] whether the claimed work succeeded (default true)'),
|
|
2835
2838
|
error: z.string().optional().describe('[complete] error note when ok=false'),
|
|
@@ -2846,9 +2849,10 @@ tool('trigger', {
|
|
|
2846
2849
|
const scoped = (fn) => project ? withProjectOverride(project, fn) : fn();
|
|
2847
2850
|
switch (action) {
|
|
2848
2851
|
case 'create': {
|
|
2849
|
-
if (!args.name || !args.promptTemplate) throw new Error('name and promptTemplate required for action=create');
|
|
2850
|
-
const body = { name: args.name, promptTemplate: args.promptTemplate, projectId: project.id };
|
|
2852
|
+
if (!args.name || (!args.promptTemplate && args.executor !== 'automation')) throw new Error('name and promptTemplate required for action=create (an automation needs automationSkill instead of a prompt)');
|
|
2853
|
+
const body = { name: args.name, promptTemplate: args.promptTemplate || '', projectId: project.id };
|
|
2851
2854
|
if (args.executor) body.executor = args.executor;
|
|
2855
|
+
for (const k of ['automationSkill', 'automationChain', 'automationSkillVersion']) if (args[k] !== undefined) body[k] = args[k];
|
|
2852
2856
|
if (args.signingSecret) body.signingSecret = args.signingSecret;
|
|
2853
2857
|
if (args.dailyLimit !== undefined) body.dailyLimit = args.dailyLimit;
|
|
2854
2858
|
const created = await scoped(() => api('POST', '/api/triggers', body));
|
|
@@ -2874,6 +2878,7 @@ tool('trigger', {
|
|
|
2874
2878
|
if (args.dailyLimit !== undefined) body.dailyLimit = args.dailyLimit;
|
|
2875
2879
|
if (args.signingSecret !== undefined) body.signingSecret = args.signingSecret || null;
|
|
2876
2880
|
if (args.executor) body.executor = args.executor;
|
|
2881
|
+
for (const k of ['automationSkill', 'automationChain', 'automationSkillVersion']) if (args[k] !== undefined) body[k] = args[k];
|
|
2877
2882
|
if (Object.keys(body).length === 0) throw new Error('At least one field is required for action=update');
|
|
2878
2883
|
return ok(await api('PATCH', `/api/triggers/${args.triggerId}`, body));
|
|
2879
2884
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drafted",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.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
|
"bin": {
|