wolfpack-mcp 1.0.11 → 1.0.13
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/client.js +22 -0
- package/dist/index.js +112 -13
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -166,6 +166,28 @@ export class WolfpackClient {
|
|
|
166
166
|
throw error;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
+
async updateWorkItemAssignee(workItemId, data) {
|
|
170
|
+
try {
|
|
171
|
+
return await this.api.put(`/work-items/${workItemId}/assignee`, data);
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
if (error && typeof error === 'object' && 'status' in error && error.status === 404) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async pullWorkItem(workItemId, data) {
|
|
181
|
+
try {
|
|
182
|
+
return await this.api.post(`/work-items/${workItemId}/pull`, data || {});
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
if (error && typeof error === 'object' && 'status' in error && error.status === 404) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
throw error;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
169
191
|
// Radar Item (Initiative/Roadmap) methods
|
|
170
192
|
async listRadarItems(options) {
|
|
171
193
|
const params = new URLSearchParams();
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ async function checkForUpdates() {
|
|
|
19
19
|
signal: AbortSignal.timeout(5000), // 5 second timeout
|
|
20
20
|
});
|
|
21
21
|
if (!response.ok)
|
|
22
|
-
return;
|
|
22
|
+
return null;
|
|
23
23
|
const data = (await response.json());
|
|
24
24
|
const latestVersion = data.version;
|
|
25
25
|
if (latestVersion && latestVersion !== CURRENT_VERSION) {
|
|
@@ -32,21 +32,14 @@ async function checkForUpdates() {
|
|
|
32
32
|
latestMinor === currentMinor &&
|
|
33
33
|
latestPatch > currentPatch);
|
|
34
34
|
if (isNewer) {
|
|
35
|
-
|
|
36
|
-
console.error('╔════════════════════════════════════════════════════════════╗');
|
|
37
|
-
console.error('║ UPDATE AVAILABLE ║');
|
|
38
|
-
console.error(`║ ${PACKAGE_NAME} ${CURRENT_VERSION} → ${latestVersion}`.padEnd(61) + '║');
|
|
39
|
-
console.error('║ ║');
|
|
40
|
-
console.error('║ Run: npm install -g wolfpack-mcp@latest ║');
|
|
41
|
-
console.error('║ Or update your package.json and run: npm install ║');
|
|
42
|
-
console.error('╚════════════════════════════════════════════════════════════╝');
|
|
43
|
-
console.error('');
|
|
35
|
+
return latestVersion;
|
|
44
36
|
}
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
catch {
|
|
48
40
|
// Silently ignore update check failures - don't block startup
|
|
49
41
|
}
|
|
42
|
+
return null;
|
|
50
43
|
}
|
|
51
44
|
// Work Item schemas
|
|
52
45
|
// Use z.coerce.string() to handle any type coercion issues from MCP args
|
|
@@ -92,6 +85,20 @@ const UpdateWorkItemStatusSchema = z.object({
|
|
|
92
85
|
work_item_id: z.string().describe('The ID of the work item'),
|
|
93
86
|
status: z.string().describe('New status'),
|
|
94
87
|
});
|
|
88
|
+
const UpdateWorkItemAssigneeSchema = z.object({
|
|
89
|
+
work_item_id: z.string().describe('The ID of the work item'),
|
|
90
|
+
leading_user_id: z
|
|
91
|
+
.string()
|
|
92
|
+
.nullable()
|
|
93
|
+
.describe('User ID to assign as leading user, or null to unassign'),
|
|
94
|
+
});
|
|
95
|
+
const PullWorkItemSchema = z.object({
|
|
96
|
+
work_item_id: z.string().describe('The ID of the work item to pull from backlog'),
|
|
97
|
+
leading_user_id: z
|
|
98
|
+
.string()
|
|
99
|
+
.optional()
|
|
100
|
+
.describe('User ID to assign as leading user (defaults to API key owner)'),
|
|
101
|
+
});
|
|
95
102
|
// Radar Item (Initiative/Roadmap) schemas
|
|
96
103
|
const ListRadarItemsSchema = z.object({
|
|
97
104
|
team_id: z.number().optional().describe('Team ID to filter radar items'),
|
|
@@ -223,10 +230,11 @@ class WolfpackMCPServer {
|
|
|
223
230
|
this.client = new WolfpackClient();
|
|
224
231
|
this.server = new Server({
|
|
225
232
|
name: 'wolfpack',
|
|
226
|
-
version:
|
|
233
|
+
version: CURRENT_VERSION,
|
|
227
234
|
}, {
|
|
228
235
|
capabilities: {
|
|
229
236
|
tools: {},
|
|
237
|
+
logging: {},
|
|
230
238
|
},
|
|
231
239
|
});
|
|
232
240
|
this.setupHandlers();
|
|
@@ -352,6 +360,48 @@ class WolfpackMCPServer {
|
|
|
352
360
|
required: ['work_item_id', 'status'],
|
|
353
361
|
},
|
|
354
362
|
},
|
|
363
|
+
{
|
|
364
|
+
name: 'update_work_item_assignee',
|
|
365
|
+
description: 'Change the assignee (leading user) on a work item. ' +
|
|
366
|
+
'Use this to assign work to yourself or another team member, or to unassign by passing null.',
|
|
367
|
+
inputSchema: {
|
|
368
|
+
type: 'object',
|
|
369
|
+
properties: {
|
|
370
|
+
work_item_id: {
|
|
371
|
+
type: 'string',
|
|
372
|
+
description: 'The ID of the work item',
|
|
373
|
+
},
|
|
374
|
+
leading_user_id: {
|
|
375
|
+
type: ['string', 'null'],
|
|
376
|
+
description: 'User ID to assign as leading user, or null to unassign',
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
required: ['work_item_id', 'leading_user_id'],
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: 'pull_work_item',
|
|
384
|
+
description: 'Pull a specific work item from the backlog to the board. ' +
|
|
385
|
+
'WORKFLOW: 1) Use list_work_items with status="pending" to browse backlog items, ' +
|
|
386
|
+
'2) Evaluate and select an item, ' +
|
|
387
|
+
'3) Use this tool to pull it onto the board. ' +
|
|
388
|
+
'This changes the status from "pending" to "new" and assigns the item. ' +
|
|
389
|
+
'If no assignee is specified, assigns to the API key owner.',
|
|
390
|
+
inputSchema: {
|
|
391
|
+
type: 'object',
|
|
392
|
+
properties: {
|
|
393
|
+
work_item_id: {
|
|
394
|
+
type: 'string',
|
|
395
|
+
description: 'The ID of the work item to pull from backlog',
|
|
396
|
+
},
|
|
397
|
+
leading_user_id: {
|
|
398
|
+
type: 'string',
|
|
399
|
+
description: 'User ID to assign as leading user (optional, defaults to API key owner)',
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
required: ['work_item_id'],
|
|
403
|
+
},
|
|
404
|
+
},
|
|
355
405
|
// Radar Item (Initiative/Roadmap) tools
|
|
356
406
|
{
|
|
357
407
|
name: 'list_radar_items',
|
|
@@ -761,6 +811,47 @@ class WolfpackMCPServer {
|
|
|
761
811
|
content: [{ type: 'text', text: 'Work item not found or not assigned to you' }],
|
|
762
812
|
};
|
|
763
813
|
}
|
|
814
|
+
case 'update_work_item_assignee': {
|
|
815
|
+
const parsed = UpdateWorkItemAssigneeSchema.parse(args);
|
|
816
|
+
const workItem = await this.client.updateWorkItemAssignee(parsed.work_item_id, {
|
|
817
|
+
leadingUserId: parsed.leading_user_id,
|
|
818
|
+
});
|
|
819
|
+
if (workItem) {
|
|
820
|
+
const assigneeText = parsed.leading_user_id
|
|
821
|
+
? `assigned to ${parsed.leading_user_id}`
|
|
822
|
+
: 'unassigned';
|
|
823
|
+
return {
|
|
824
|
+
content: [
|
|
825
|
+
{
|
|
826
|
+
type: 'text',
|
|
827
|
+
text: `Updated "${workItem.title}" - now ${assigneeText}\n\n${JSON.stringify(workItem, null, 2)}`,
|
|
828
|
+
},
|
|
829
|
+
],
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
return {
|
|
833
|
+
content: [{ type: 'text', text: 'Work item not found' }],
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
case 'pull_work_item': {
|
|
837
|
+
const parsed = PullWorkItemSchema.parse(args);
|
|
838
|
+
const workItem = await this.client.pullWorkItem(parsed.work_item_id, {
|
|
839
|
+
leadingUserId: parsed.leading_user_id,
|
|
840
|
+
});
|
|
841
|
+
if (workItem) {
|
|
842
|
+
return {
|
|
843
|
+
content: [
|
|
844
|
+
{
|
|
845
|
+
type: 'text',
|
|
846
|
+
text: `Pulled "${workItem.title}" from backlog to board (status: new)\n\n${JSON.stringify(workItem, null, 2)}`,
|
|
847
|
+
},
|
|
848
|
+
],
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
return {
|
|
852
|
+
content: [{ type: 'text', text: 'Work item not found' }],
|
|
853
|
+
};
|
|
854
|
+
}
|
|
764
855
|
// Radar Item handlers
|
|
765
856
|
case 'list_radar_items': {
|
|
766
857
|
const parsed = ListRadarItemsSchema.parse(args);
|
|
@@ -1045,8 +1136,8 @@ class WolfpackMCPServer {
|
|
|
1045
1136
|
});
|
|
1046
1137
|
}
|
|
1047
1138
|
async start() {
|
|
1048
|
-
//
|
|
1049
|
-
checkForUpdates();
|
|
1139
|
+
// Start version check early (non-blocking)
|
|
1140
|
+
const updateCheckPromise = checkForUpdates();
|
|
1050
1141
|
// Resolve team on startup
|
|
1051
1142
|
if (config.teamSlug) {
|
|
1052
1143
|
// Explicit team slug configured - use it
|
|
@@ -1083,6 +1174,14 @@ class WolfpackMCPServer {
|
|
|
1083
1174
|
const transport = new StdioServerTransport();
|
|
1084
1175
|
await this.server.connect(transport);
|
|
1085
1176
|
console.error(`Wolfpack MCP Server v${CURRENT_VERSION} started`);
|
|
1177
|
+
// Send update notification via MCP logging after server is connected
|
|
1178
|
+
const latestVersion = await updateCheckPromise;
|
|
1179
|
+
if (latestVersion) {
|
|
1180
|
+
await this.server.sendLoggingMessage({
|
|
1181
|
+
level: 'warning',
|
|
1182
|
+
data: `Update available: ${PACKAGE_NAME} ${CURRENT_VERSION} → ${latestVersion}. Run: npm install -g wolfpack-mcp@latest`,
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1086
1185
|
}
|
|
1087
1186
|
}
|
|
1088
1187
|
// Validate configuration before starting
|