wolfpack-mcp 1.0.21 → 1.0.22

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 CHANGED
@@ -37,6 +37,32 @@ export class WolfpackClient {
37
37
  setTeamSlug(slug) {
38
38
  this.teamSlug = slug;
39
39
  }
40
+ /**
41
+ * Resolve a team slug from a team ID, the cached slug, or by fetching teams.
42
+ */
43
+ async resolveSlug(teamId) {
44
+ // If a specific team ID is provided, fetch teams to find its slug
45
+ if (teamId) {
46
+ const teams = await this.listTeams();
47
+ const team = teams.find((t) => t.id === teamId);
48
+ if (!team)
49
+ throw new Error(`Team with ID ${teamId} not found`);
50
+ return team.slug;
51
+ }
52
+ // Fall back to cached slug
53
+ if (this.teamSlug)
54
+ return this.teamSlug;
55
+ // Try to resolve from cached team ID
56
+ if (this.teamId) {
57
+ const teams = await this.listTeams();
58
+ const team = teams.find((t) => t.id === this.teamId);
59
+ if (!team)
60
+ throw new Error(`Team with ID ${this.teamId} not found`);
61
+ this.teamSlug = team.slug;
62
+ return team.slug;
63
+ }
64
+ throw new Error('No team selected. Use list_teams first.');
65
+ }
40
66
  /**
41
67
  * List all teams the authenticated user is a member of.
42
68
  */
package/dist/index.js CHANGED
@@ -248,6 +248,10 @@ const UploadImageSchema = z.object({
248
248
  .string()
249
249
  .describe('Absolute path to an image file on disk (e.g., "/tmp/screenshot.png"). ' +
250
250
  'Supported formats: JPEG, PNG, GIF, WebP. Max 5MB.'),
251
+ team_id: z
252
+ .number()
253
+ .optional()
254
+ .describe('Team ID (required for multi-team users, use list_teams to get IDs)'),
251
255
  });
252
256
  // Helper to detect if a work item description contains a plan
253
257
  function hasPlan(description) {
@@ -807,6 +811,10 @@ class WolfpackMCPServer {
807
811
  description: 'Absolute path to an image file on disk (e.g., "/tmp/screenshot.png"). ' +
808
812
  'Supported formats: JPEG, PNG, GIF, WebP. Max 5MB.',
809
813
  },
814
+ team_id: {
815
+ type: 'number',
816
+ description: 'Team ID (required for multi-team users, use list_teams to get IDs)',
817
+ },
810
818
  },
811
819
  required: ['file_path'],
812
820
  },
@@ -1228,10 +1236,7 @@ class WolfpackMCPServer {
1228
1236
  }
1229
1237
  case 'upload_image': {
1230
1238
  const parsed = UploadImageSchema.parse(args);
1231
- const teamSlug = this.client.getTeamSlug();
1232
- if (!teamSlug) {
1233
- throw new Error('No team selected. Use list_teams first.');
1234
- }
1239
+ const teamSlug = await this.client.resolveSlug(parsed.team_id || this.client.getTeamId() || undefined);
1235
1240
  const filePath = resolve(parsed.file_path);
1236
1241
  // Validate file extension
1237
1242
  const ext = extname(filePath).toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolfpack-mcp",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "MCP server for Wolfpack AI-enhanced software delivery tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",