@artyfacts/mcp-server 1.0.2 → 1.0.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/dist/chunk-MO7NJ56L.js +579 -0
- package/dist/chunk-VCIOVYRM.js +556 -0
- package/dist/index.cjs +59 -16
- package/dist/index.js +1 -1
- package/dist/server.cjs +59 -16
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/src/server.ts +62 -16
package/dist/server.cjs
CHANGED
|
@@ -91,18 +91,17 @@ var ARTYFACTS_TOOLS = [
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
name: "create_artifact",
|
|
94
|
-
description: "Create a new artifact",
|
|
94
|
+
description: "Create a new artifact (document, goal, spec, etc.)",
|
|
95
95
|
inputSchema: {
|
|
96
96
|
type: "object",
|
|
97
97
|
properties: {
|
|
98
98
|
title: { type: "string", description: "Artifact title" },
|
|
99
|
-
type: { type: "string", description: "
|
|
99
|
+
type: { type: "string", description: "Artifact type: goal, spec, research, report, experiment, decision, doc" },
|
|
100
100
|
content: { type: "string", description: "Markdown content" },
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
tags: { type: "array", items: { type: "string" }, description: "Tags" }
|
|
101
|
+
parent_id: { type: "string", description: "Parent artifact ID for nested artifacts" },
|
|
102
|
+
tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" }
|
|
104
103
|
},
|
|
105
|
-
required: ["title"]
|
|
104
|
+
required: ["title", "type"]
|
|
106
105
|
}
|
|
107
106
|
},
|
|
108
107
|
{
|
|
@@ -156,7 +155,7 @@ var ARTYFACTS_TOOLS = [
|
|
|
156
155
|
type: { type: "string", description: "Type: content, task, decision, blocker" },
|
|
157
156
|
position: { type: "number", description: "Order position" }
|
|
158
157
|
},
|
|
159
|
-
required: ["artifact_id", "section_id", "heading"]
|
|
158
|
+
required: ["artifact_id", "section_id", "heading", "content"]
|
|
160
159
|
}
|
|
161
160
|
},
|
|
162
161
|
{
|
|
@@ -262,18 +261,27 @@ var ARTYFACTS_TOOLS = [
|
|
|
262
261
|
},
|
|
263
262
|
{
|
|
264
263
|
name: "create_agent",
|
|
265
|
-
description: "Register a new agent",
|
|
264
|
+
description: "Register a new AI agent with role, capabilities, and permissions",
|
|
266
265
|
inputSchema: {
|
|
267
266
|
type: "object",
|
|
268
267
|
properties: {
|
|
269
268
|
agentId: { type: "string", description: 'Unique agent ID (e.g., "engineering-agent", "qa-agent")' },
|
|
270
269
|
name: { type: "string", description: "Agent display name" },
|
|
271
|
-
|
|
272
|
-
description: { type: "string", description: "What this agent does" },
|
|
273
|
-
capabilities: { type: "array", items: { type: "string" }, description:
|
|
274
|
-
|
|
270
|
+
role: { type: "string", description: "Role: pm, engineering, qa, research, content, design" },
|
|
271
|
+
description: { type: "string", description: "What this agent does - detailed description" },
|
|
272
|
+
capabilities: { type: "array", items: { type: "string" }, description: 'List of capabilities (e.g., ["code-review", "testing", "debugging"])' },
|
|
273
|
+
permissions: {
|
|
274
|
+
type: "object",
|
|
275
|
+
description: "Permission settings",
|
|
276
|
+
properties: {
|
|
277
|
+
write: { type: "boolean", description: "Can create/edit artifacts" },
|
|
278
|
+
delete: { type: "boolean", description: "Can delete artifacts" },
|
|
279
|
+
delegate_tasks: { type: "boolean", description: "Can assign tasks to other agents" }
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
systemPrompt: { type: "string", description: "System prompt for the agent" }
|
|
275
283
|
},
|
|
276
|
-
required: ["agentId", "name", "
|
|
284
|
+
required: ["agentId", "name", "role", "description"]
|
|
277
285
|
}
|
|
278
286
|
},
|
|
279
287
|
{
|
|
@@ -414,7 +422,27 @@ var toolHandlers = {
|
|
|
414
422
|
return client.get(`/artifacts?${params}`);
|
|
415
423
|
},
|
|
416
424
|
get_artifact: (client, args) => client.get(`/artifacts/${args.artifact_id}`),
|
|
417
|
-
create_artifact: (client, args) =>
|
|
425
|
+
create_artifact: (client, args) => {
|
|
426
|
+
const envelope = {
|
|
427
|
+
aah_version: "0.3",
|
|
428
|
+
artifact: {
|
|
429
|
+
id: args.id || `artifact-${Date.now()}`,
|
|
430
|
+
title: args.title,
|
|
431
|
+
type: args.type || "document/sectioned",
|
|
432
|
+
artifact_type: args.artifact_type || args.type || "doc",
|
|
433
|
+
parent_id: args.parent_id,
|
|
434
|
+
tags: args.tags
|
|
435
|
+
},
|
|
436
|
+
content: args.content ? {
|
|
437
|
+
media_type: "text/markdown",
|
|
438
|
+
body: args.content
|
|
439
|
+
} : void 0,
|
|
440
|
+
source: {
|
|
441
|
+
agent_id: "mcp-agent"
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
return client.post("/artifacts", envelope);
|
|
445
|
+
},
|
|
418
446
|
update_artifact: (client, args) => {
|
|
419
447
|
const { artifact_id, ...body } = args;
|
|
420
448
|
return client.patch(`/artifacts/${artifact_id}`, body);
|
|
@@ -423,7 +451,8 @@ var toolHandlers = {
|
|
|
423
451
|
list_sections: (client, args) => client.get(`/artifacts/${args.artifact_id}/sections`),
|
|
424
452
|
get_section: (client, args) => client.get(`/artifacts/${args.artifact_id}/sections/${args.section_id}`),
|
|
425
453
|
create_section: (client, args) => {
|
|
426
|
-
const { artifact_id, ...
|
|
454
|
+
const { artifact_id, section_id, ...rest } = args;
|
|
455
|
+
const body = { id: section_id, ...rest };
|
|
427
456
|
return client.post(`/artifacts/${artifact_id}/sections`, body);
|
|
428
457
|
},
|
|
429
458
|
update_section: (client, args) => {
|
|
@@ -455,7 +484,21 @@ var toolHandlers = {
|
|
|
455
484
|
return client.get(`/agents?${params}`);
|
|
456
485
|
},
|
|
457
486
|
get_agent: (client, args) => client.get(`/agents/${args.agent_id}`),
|
|
458
|
-
create_agent: (client, args) =>
|
|
487
|
+
create_agent: (client, args) => {
|
|
488
|
+
const body = {
|
|
489
|
+
agentId: args.agentId,
|
|
490
|
+
name: args.name,
|
|
491
|
+
role: args.role,
|
|
492
|
+
description: args.description,
|
|
493
|
+
permissions: args.permissions || { write: true, delete: false, delegate_tasks: false },
|
|
494
|
+
metadata: {
|
|
495
|
+
capabilities: args.capabilities || [],
|
|
496
|
+
systemPrompt: args.systemPrompt,
|
|
497
|
+
createdVia: "mcp"
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
return client.post("/agents", body);
|
|
501
|
+
},
|
|
459
502
|
update_agent: (client, args) => {
|
|
460
503
|
const { agent_id, ...body } = args;
|
|
461
504
|
return client.patch(`/agents/${agent_id}`, body);
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
package/src/server.ts
CHANGED
|
@@ -97,18 +97,17 @@ const ARTYFACTS_TOOLS: Tool[] = [
|
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
name: 'create_artifact',
|
|
100
|
-
description: 'Create a new artifact',
|
|
100
|
+
description: 'Create a new artifact (document, goal, spec, etc.)',
|
|
101
101
|
inputSchema: {
|
|
102
102
|
type: 'object',
|
|
103
103
|
properties: {
|
|
104
104
|
title: { type: 'string', description: 'Artifact title' },
|
|
105
|
-
type: { type: 'string', description: '
|
|
105
|
+
type: { type: 'string', description: 'Artifact type: goal, spec, research, report, experiment, decision, doc' },
|
|
106
106
|
content: { type: 'string', description: 'Markdown content' },
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
tags: { type: 'array', items: { type: 'string' }, description: 'Tags' },
|
|
107
|
+
parent_id: { type: 'string', description: 'Parent artifact ID for nested artifacts' },
|
|
108
|
+
tags: { type: 'array', items: { type: 'string' }, description: 'Tags for categorization' },
|
|
110
109
|
},
|
|
111
|
-
required: ['title'],
|
|
110
|
+
required: ['title', 'type'],
|
|
112
111
|
},
|
|
113
112
|
},
|
|
114
113
|
{
|
|
@@ -163,7 +162,7 @@ const ARTYFACTS_TOOLS: Tool[] = [
|
|
|
163
162
|
type: { type: 'string', description: 'Type: content, task, decision, blocker' },
|
|
164
163
|
position: { type: 'number', description: 'Order position' },
|
|
165
164
|
},
|
|
166
|
-
required: ['artifact_id', 'section_id', 'heading'],
|
|
165
|
+
required: ['artifact_id', 'section_id', 'heading', 'content'],
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
168
|
{
|
|
@@ -271,18 +270,27 @@ const ARTYFACTS_TOOLS: Tool[] = [
|
|
|
271
270
|
},
|
|
272
271
|
{
|
|
273
272
|
name: 'create_agent',
|
|
274
|
-
description: 'Register a new agent',
|
|
273
|
+
description: 'Register a new AI agent with role, capabilities, and permissions',
|
|
275
274
|
inputSchema: {
|
|
276
275
|
type: 'object',
|
|
277
276
|
properties: {
|
|
278
277
|
agentId: { type: 'string', description: 'Unique agent ID (e.g., "engineering-agent", "qa-agent")' },
|
|
279
278
|
name: { type: 'string', description: 'Agent display name' },
|
|
280
|
-
|
|
281
|
-
description: { type: 'string', description: 'What this agent does' },
|
|
282
|
-
capabilities: { type: 'array', items: { type: 'string' }, description: '
|
|
283
|
-
|
|
279
|
+
role: { type: 'string', description: 'Role: pm, engineering, qa, research, content, design' },
|
|
280
|
+
description: { type: 'string', description: 'What this agent does - detailed description' },
|
|
281
|
+
capabilities: { type: 'array', items: { type: 'string' }, description: 'List of capabilities (e.g., ["code-review", "testing", "debugging"])' },
|
|
282
|
+
permissions: {
|
|
283
|
+
type: 'object',
|
|
284
|
+
description: 'Permission settings',
|
|
285
|
+
properties: {
|
|
286
|
+
write: { type: 'boolean', description: 'Can create/edit artifacts' },
|
|
287
|
+
delete: { type: 'boolean', description: 'Can delete artifacts' },
|
|
288
|
+
delegate_tasks: { type: 'boolean', description: 'Can assign tasks to other agents' },
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
systemPrompt: { type: 'string', description: 'System prompt for the agent' },
|
|
284
292
|
},
|
|
285
|
-
required: ['agentId', 'name', '
|
|
293
|
+
required: ['agentId', 'name', 'role', 'description'],
|
|
286
294
|
},
|
|
287
295
|
},
|
|
288
296
|
{
|
|
@@ -437,7 +445,28 @@ const toolHandlers: Record<string, ToolHandler> = {
|
|
|
437
445
|
return client.get(`/artifacts?${params}`);
|
|
438
446
|
},
|
|
439
447
|
get_artifact: (client, args) => client.get(`/artifacts/${args.artifact_id}`),
|
|
440
|
-
create_artifact: (client, args) =>
|
|
448
|
+
create_artifact: (client, args) => {
|
|
449
|
+
// API expects AAH envelope format
|
|
450
|
+
const envelope = {
|
|
451
|
+
aah_version: '0.3',
|
|
452
|
+
artifact: {
|
|
453
|
+
id: args.id || `artifact-${Date.now()}`,
|
|
454
|
+
title: args.title,
|
|
455
|
+
type: args.type || 'document/sectioned',
|
|
456
|
+
artifact_type: args.artifact_type || args.type || 'doc',
|
|
457
|
+
parent_id: args.parent_id,
|
|
458
|
+
tags: args.tags,
|
|
459
|
+
},
|
|
460
|
+
content: args.content ? {
|
|
461
|
+
media_type: 'text/markdown',
|
|
462
|
+
body: args.content,
|
|
463
|
+
} : undefined,
|
|
464
|
+
source: {
|
|
465
|
+
agent_id: 'mcp-agent',
|
|
466
|
+
},
|
|
467
|
+
};
|
|
468
|
+
return client.post('/artifacts', envelope);
|
|
469
|
+
},
|
|
441
470
|
update_artifact: (client, args) => {
|
|
442
471
|
const { artifact_id, ...body } = args;
|
|
443
472
|
return client.patch(`/artifacts/${artifact_id}`, body);
|
|
@@ -447,7 +476,9 @@ const toolHandlers: Record<string, ToolHandler> = {
|
|
|
447
476
|
list_sections: (client, args) => client.get(`/artifacts/${args.artifact_id}/sections`),
|
|
448
477
|
get_section: (client, args) => client.get(`/artifacts/${args.artifact_id}/sections/${args.section_id}`),
|
|
449
478
|
create_section: (client, args) => {
|
|
450
|
-
const { artifact_id, ...
|
|
479
|
+
const { artifact_id, section_id, ...rest } = args;
|
|
480
|
+
// API expects 'id' not 'section_id'
|
|
481
|
+
const body = { id: section_id, ...rest };
|
|
451
482
|
return client.post(`/artifacts/${artifact_id}/sections`, body);
|
|
452
483
|
},
|
|
453
484
|
update_section: (client, args) => {
|
|
@@ -481,7 +512,22 @@ const toolHandlers: Record<string, ToolHandler> = {
|
|
|
481
512
|
return client.get(`/agents?${params}`);
|
|
482
513
|
},
|
|
483
514
|
get_agent: (client, args) => client.get(`/agents/${args.agent_id}`),
|
|
484
|
-
create_agent: (client, args) =>
|
|
515
|
+
create_agent: (client, args) => {
|
|
516
|
+
// Map MCP fields to API fields
|
|
517
|
+
const body = {
|
|
518
|
+
agentId: args.agentId,
|
|
519
|
+
name: args.name,
|
|
520
|
+
role: args.role,
|
|
521
|
+
description: args.description,
|
|
522
|
+
permissions: args.permissions || { write: true, delete: false, delegate_tasks: false },
|
|
523
|
+
metadata: {
|
|
524
|
+
capabilities: args.capabilities || [],
|
|
525
|
+
systemPrompt: args.systemPrompt,
|
|
526
|
+
createdVia: 'mcp',
|
|
527
|
+
},
|
|
528
|
+
};
|
|
529
|
+
return client.post('/agents', body);
|
|
530
|
+
},
|
|
485
531
|
update_agent: (client, args) => {
|
|
486
532
|
const { agent_id, ...body } = args;
|
|
487
533
|
return client.patch(`/agents/${agent_id}`, body);
|