wolfpack-mcp 1.0.53 → 1.0.55
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/agentBuilderTools.js +38 -4
- package/dist/client.js +8 -5
- package/dist/index.js +15 -13
- package/package.json +1 -1
|
@@ -61,6 +61,14 @@ export const AGENT_BUILDER_TOOLS = [
|
|
|
61
61
|
type: 'string',
|
|
62
62
|
description: 'Username for the agent (e.g. "k9"). Set to null to clear.',
|
|
63
63
|
},
|
|
64
|
+
specialisation: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'Short label describing the agent\'s area of expertise (e.g. "Frontend Engineer"). Set to null to clear.',
|
|
67
|
+
},
|
|
68
|
+
description: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: 'README-style description for human reference. Not used in any agent context. Set to null to clear.',
|
|
71
|
+
},
|
|
64
72
|
instructions: {
|
|
65
73
|
type: 'string',
|
|
66
74
|
description: 'Agent-specific instructions (supplements template instructions). Set to null to clear.',
|
|
@@ -180,6 +188,14 @@ export const AGENT_BUILDER_TOOLS = [
|
|
|
180
188
|
agent_id: { type: 'string', description: 'Agent profile ID' },
|
|
181
189
|
prompt: { type: 'string', description: 'What the agent should do' },
|
|
182
190
|
project_slug: { type: 'string', description: 'Project to scope the session to (optional)' },
|
|
191
|
+
git_ref: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
description: 'Git ref (branch, tag, SHA) to check out after cloning. Mutually exclusive with pr_number.',
|
|
194
|
+
},
|
|
195
|
+
pr_number: {
|
|
196
|
+
type: 'integer',
|
|
197
|
+
description: 'GitHub PR number to check out after cloning. Mutually exclusive with git_ref.',
|
|
198
|
+
},
|
|
183
199
|
...ORG_SLUG_PROP,
|
|
184
200
|
},
|
|
185
201
|
required: ['agent_id', 'prompt'],
|
|
@@ -288,6 +304,14 @@ export const AGENT_BUILDER_TOOLS = [
|
|
|
288
304
|
agent_id: { type: 'string', description: 'Agent profile ID' },
|
|
289
305
|
task_id: { type: 'string', description: 'Task ID to run' },
|
|
290
306
|
project_slug: { type: 'string', description: 'Project to scope the session to (optional)' },
|
|
307
|
+
git_ref: {
|
|
308
|
+
type: 'string',
|
|
309
|
+
description: 'Git ref (branch, tag, SHA) to check out after cloning. Mutually exclusive with pr_number.',
|
|
310
|
+
},
|
|
311
|
+
pr_number: {
|
|
312
|
+
type: 'integer',
|
|
313
|
+
description: 'GitHub PR number to check out after cloning. Mutually exclusive with git_ref.',
|
|
314
|
+
},
|
|
291
315
|
...ORG_SLUG_PROP,
|
|
292
316
|
},
|
|
293
317
|
required: ['agent_id', 'task_id'],
|
|
@@ -573,6 +597,8 @@ export async function handleAgentBuilderTool(name, args, client) {
|
|
|
573
597
|
agent_id: z.string(),
|
|
574
598
|
name: z.string().optional(),
|
|
575
599
|
username: z.string().nullable().optional(),
|
|
600
|
+
specialisation: z.string().nullable().optional(),
|
|
601
|
+
description: z.string().nullable().optional(),
|
|
576
602
|
instructions: z.string().nullable().optional(),
|
|
577
603
|
llm_provider: z.string().nullable().optional(),
|
|
578
604
|
llm_model: z.string().nullable().optional(),
|
|
@@ -587,6 +613,10 @@ export async function handleAgentBuilderTool(name, args, client) {
|
|
|
587
613
|
fields.name = rest.name;
|
|
588
614
|
if (rest.username !== undefined)
|
|
589
615
|
fields.username = rest.username;
|
|
616
|
+
if (rest.specialisation !== undefined)
|
|
617
|
+
fields.specialisation = rest.specialisation;
|
|
618
|
+
if (rest.description !== undefined)
|
|
619
|
+
fields.description = rest.description;
|
|
590
620
|
if (rest.instructions !== undefined)
|
|
591
621
|
fields.instructions = rest.instructions;
|
|
592
622
|
if (rest.llm_provider !== undefined)
|
|
@@ -668,10 +698,12 @@ export async function handleAgentBuilderTool(name, args, client) {
|
|
|
668
698
|
agent_id: z.string(),
|
|
669
699
|
prompt: z.string(),
|
|
670
700
|
project_slug: z.string().optional(),
|
|
701
|
+
git_ref: z.string().optional(),
|
|
702
|
+
pr_number: z.number().int().positive().optional(),
|
|
671
703
|
org_slug: orgSlugField,
|
|
672
704
|
})
|
|
673
705
|
.parse(args);
|
|
674
|
-
const result = await client.runAgent(parsed.agent_id, parsed.prompt, parsed.project_slug, resolveOrg(parsed));
|
|
706
|
+
const result = await client.runAgent(parsed.agent_id, parsed.prompt, parsed.project_slug, resolveOrg(parsed), parsed.git_ref, parsed.pr_number);
|
|
675
707
|
return {
|
|
676
708
|
content: [
|
|
677
709
|
{
|
|
@@ -767,10 +799,12 @@ export async function handleAgentBuilderTool(name, args, client) {
|
|
|
767
799
|
agent_id: z.string(),
|
|
768
800
|
task_id: z.string(),
|
|
769
801
|
project_slug: z.string().optional(),
|
|
802
|
+
git_ref: z.string().optional(),
|
|
803
|
+
pr_number: z.number().int().positive().optional(),
|
|
770
804
|
org_slug: orgSlugField,
|
|
771
805
|
})
|
|
772
806
|
.parse(args);
|
|
773
|
-
const result = await client.runAgentTask(parsed.agent_id, parsed.task_id, parsed.project_slug, resolveOrg(parsed));
|
|
807
|
+
const result = await client.runAgentTask(parsed.agent_id, parsed.task_id, parsed.project_slug, resolveOrg(parsed), parsed.git_ref, parsed.pr_number);
|
|
774
808
|
return {
|
|
775
809
|
content: [
|
|
776
810
|
{
|
|
@@ -880,8 +914,8 @@ export async function handleAgentBuilderTool(name, args, client) {
|
|
|
880
914
|
}
|
|
881
915
|
// ─── Skills (reading) ─────────────────────────────────────────────────────
|
|
882
916
|
case 'list_agent_skills': {
|
|
883
|
-
const parsed = z.object({ agent_id: z.string() }).parse(args);
|
|
884
|
-
const skills = await client.listAgentSkills(parsed.agent_id);
|
|
917
|
+
const parsed = z.object({ agent_id: z.string(), org_slug: orgSlugField }).parse(args);
|
|
918
|
+
const skills = await client.listAgentSkills(parsed.agent_id, resolveOrg(parsed));
|
|
885
919
|
return { content: [{ type: 'text', text: text(skills) }] };
|
|
886
920
|
}
|
|
887
921
|
case 'get_skill_detail': {
|
package/dist/client.js
CHANGED
|
@@ -651,10 +651,12 @@ export class WolfpackClient {
|
|
|
651
651
|
const q = params.toString();
|
|
652
652
|
return this.api.get(`/agents/${agentId}/sessions/${sessionId}/conversation${q ? `?${q}` : ''}`);
|
|
653
653
|
}
|
|
654
|
-
async runAgent(agentId, prompt, teamSlug, orgSlug) {
|
|
654
|
+
async runAgent(agentId, prompt, teamSlug, orgSlug, gitRef, prNumber) {
|
|
655
655
|
return this.api.post(this.withOrgSlug(`/agents/${agentId}/run`, orgSlug), {
|
|
656
656
|
prompt,
|
|
657
657
|
teamSlug,
|
|
658
|
+
gitRef,
|
|
659
|
+
prNumber,
|
|
658
660
|
});
|
|
659
661
|
}
|
|
660
662
|
async stopAgentSession(agentId, sessionId, orgSlug) {
|
|
@@ -683,8 +685,8 @@ export class WolfpackClient {
|
|
|
683
685
|
async updateAgentTask(agentId, taskId, body, orgSlug) {
|
|
684
686
|
return this.api.patch(this.withOrgSlug(`/agents/${agentId}/tasks/${taskId}`, orgSlug), body);
|
|
685
687
|
}
|
|
686
|
-
async runAgentTask(agentId, taskId, teamSlug, orgSlug) {
|
|
687
|
-
return this.api.post(this.withOrgSlug(`/agents/${agentId}/tasks/${taskId}/run`, orgSlug), { teamSlug });
|
|
688
|
+
async runAgentTask(agentId, taskId, teamSlug, orgSlug, gitRef, prNumber) {
|
|
689
|
+
return this.api.post(this.withOrgSlug(`/agents/${agentId}/tasks/${taskId}/run`, orgSlug), { teamSlug, gitRef, prNumber });
|
|
688
690
|
}
|
|
689
691
|
// ─── Agent Builder: Queue ──────────────────────────────────────────────────
|
|
690
692
|
async listAgentQueue(agentId, status, orgSlug) {
|
|
@@ -725,8 +727,9 @@ export class WolfpackClient {
|
|
|
725
727
|
return this.api.post(this.withOrgSlug(`/skills/agent-assignments/${agentId}`, orgSlug), { skillIds });
|
|
726
728
|
}
|
|
727
729
|
// ─── Agent Builder: Skills (read) ──────────────────────────────────────────
|
|
728
|
-
async listAgentSkills(agentId) {
|
|
729
|
-
|
|
730
|
+
async listAgentSkills(agentId, orgSlug) {
|
|
731
|
+
const agent = await this.getAgent(agentId, orgSlug);
|
|
732
|
+
return agent?.skills ?? [];
|
|
730
733
|
}
|
|
731
734
|
async listOrgSkills(orgSlug) {
|
|
732
735
|
return this.api.get(this.withOrgSlug('/agents/org-skills', orgSlug));
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,8 @@ const CONTENT_LINKING_HELP = 'CROSS-REFERENCES: In any markdown content, you can
|
|
|
53
53
|
'#j123 or #journal-123 for journal entries, #c123 or #case-123 for cases, #p123 or #proc-123 for procedures. ' +
|
|
54
54
|
'Use @username to mention team members (triggers notifications). ' +
|
|
55
55
|
'Standard markdown links also work: [link text](/project/{slug}/work-items/123).';
|
|
56
|
+
/** Zod string that strips a leading '#' so agents can pass "#42" or "42". */
|
|
57
|
+
const refIdString = () => z.string().transform((v) => v.replace(/^#/, ''));
|
|
56
58
|
// Work Item schemas
|
|
57
59
|
// Use z.coerce.string() to handle any type coercion issues from MCP args
|
|
58
60
|
const ListWorkItemsSchema = z.object({
|
|
@@ -94,11 +96,11 @@ const ListWorkItemsSchema = z.object({
|
|
|
94
96
|
offset: z.number().optional().describe('Number of items to skip'),
|
|
95
97
|
});
|
|
96
98
|
const GetWorkItemSchema = z.object({
|
|
97
|
-
work_item_id:
|
|
99
|
+
work_item_id: refIdString().describe('The refId (number) of the work item'),
|
|
98
100
|
project_slug: z.string().optional().describe('Project slug (required when looking up by refId)'),
|
|
99
101
|
});
|
|
100
102
|
const UpdateWorkProgressSchema = z.object({
|
|
101
|
-
work_item_id:
|
|
103
|
+
work_item_id: refIdString().describe('The ID of the work item'),
|
|
102
104
|
description: z.string().describe('Updated description/notes for the work item'),
|
|
103
105
|
project_slug: z
|
|
104
106
|
.string()
|
|
@@ -117,7 +119,7 @@ const VALID_STATUSES = [
|
|
|
117
119
|
'archived',
|
|
118
120
|
];
|
|
119
121
|
const UpdateWorkItemSchema = z.object({
|
|
120
|
-
work_item_id:
|
|
122
|
+
work_item_id: refIdString().describe('The ID of the work item'),
|
|
121
123
|
title: z.string().optional().describe('New title for the work item'),
|
|
122
124
|
description: z
|
|
123
125
|
.string()
|
|
@@ -172,7 +174,7 @@ const UpdateWorkItemSchema = z.object({
|
|
|
172
174
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
173
175
|
});
|
|
174
176
|
const PullWorkItemSchema = z.object({
|
|
175
|
-
work_item_id:
|
|
177
|
+
work_item_id: refIdString().describe('The ID of the work item to pull from backlog'),
|
|
176
178
|
leading_user_id: z
|
|
177
179
|
.string()
|
|
178
180
|
.optional()
|
|
@@ -183,7 +185,7 @@ const PullWorkItemSchema = z.object({
|
|
|
183
185
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
184
186
|
});
|
|
185
187
|
const SubmitWorkItemFormSchema = z.object({
|
|
186
|
-
work_item_id:
|
|
188
|
+
work_item_id: refIdString().describe('The ID of the work item'),
|
|
187
189
|
form_values: z.record(z.any()).describe('Key-value pairs matching formDefinition field names'),
|
|
188
190
|
project_slug: z
|
|
189
191
|
.string()
|
|
@@ -264,7 +266,7 @@ const ListIssuesSchema = z.object({
|
|
|
264
266
|
offset: z.number().optional().describe('Number of items to skip'),
|
|
265
267
|
});
|
|
266
268
|
const GetIssueSchema = z.object({
|
|
267
|
-
issue_id:
|
|
269
|
+
issue_id: refIdString().describe('The refId (number) of the issue'),
|
|
268
270
|
project_slug: z.string().optional().describe('Project slug (required when looking up by refId)'),
|
|
269
271
|
});
|
|
270
272
|
// Create schemas
|
|
@@ -309,7 +311,7 @@ const CreateIssueSchema = z.object({
|
|
|
309
311
|
actual_behavior: z.string().optional().describe('Actual behavior observed'),
|
|
310
312
|
});
|
|
311
313
|
const UpdateIssueSchema = z.object({
|
|
312
|
-
issue_id:
|
|
314
|
+
issue_id: refIdString().describe('The refId (number) of the issue to update'),
|
|
313
315
|
title: z.string().optional().describe('Updated title'),
|
|
314
316
|
description: z.string().optional().describe('Updated description'),
|
|
315
317
|
status: z
|
|
@@ -415,21 +417,21 @@ const UpdateJournalEntrySchema = z.object({
|
|
|
415
417
|
});
|
|
416
418
|
// Comment schemas
|
|
417
419
|
const ListWorkItemCommentsSchema = z.object({
|
|
418
|
-
work_item_id:
|
|
420
|
+
work_item_id: refIdString().describe('The work item refId (number)'),
|
|
419
421
|
project_slug: z
|
|
420
422
|
.string()
|
|
421
423
|
.optional()
|
|
422
424
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
423
425
|
});
|
|
424
426
|
const ListIssueCommentsSchema = z.object({
|
|
425
|
-
issue_id:
|
|
427
|
+
issue_id: refIdString().describe('The issue refId (number)'),
|
|
426
428
|
project_slug: z
|
|
427
429
|
.string()
|
|
428
430
|
.optional()
|
|
429
431
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
430
432
|
});
|
|
431
433
|
const CreateWorkItemCommentSchema = z.object({
|
|
432
|
-
work_item_id:
|
|
434
|
+
work_item_id: refIdString().describe('The work item refId (number)'),
|
|
433
435
|
content: z.string().describe('Comment content (markdown)'),
|
|
434
436
|
project_slug: z
|
|
435
437
|
.string()
|
|
@@ -437,7 +439,7 @@ const CreateWorkItemCommentSchema = z.object({
|
|
|
437
439
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
438
440
|
});
|
|
439
441
|
const CreateIssueCommentSchema = z.object({
|
|
440
|
-
issue_id:
|
|
442
|
+
issue_id: refIdString().describe('The issue refId (number)'),
|
|
441
443
|
content: z.string().describe('Comment content (markdown)'),
|
|
442
444
|
project_slug: z
|
|
443
445
|
.string()
|
|
@@ -445,7 +447,7 @@ const CreateIssueCommentSchema = z.object({
|
|
|
445
447
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
446
448
|
});
|
|
447
449
|
const DeleteWorkItemCommentSchema = z.object({
|
|
448
|
-
work_item_id:
|
|
450
|
+
work_item_id: refIdString().describe('The work item refId (number)'),
|
|
449
451
|
comment_id: z.string().describe('The comment ID to delete'),
|
|
450
452
|
project_slug: z
|
|
451
453
|
.string()
|
|
@@ -453,7 +455,7 @@ const DeleteWorkItemCommentSchema = z.object({
|
|
|
453
455
|
.describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
|
|
454
456
|
});
|
|
455
457
|
const DeleteIssueCommentSchema = z.object({
|
|
456
|
-
issue_id:
|
|
458
|
+
issue_id: refIdString().describe('The issue refId (number)'),
|
|
457
459
|
comment_id: z.string().describe('The comment ID to delete'),
|
|
458
460
|
project_slug: z
|
|
459
461
|
.string()
|