wolfpack-mcp 1.0.23 → 1.0.25
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 +9 -30
- package/dist/index.js +3 -4
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -6,7 +6,6 @@ const PAGE_SIZE = 50;
|
|
|
6
6
|
export class WolfpackClient {
|
|
7
7
|
api;
|
|
8
8
|
teamId = null;
|
|
9
|
-
teamSlug = null;
|
|
10
9
|
constructor() {
|
|
11
10
|
this.api = new ApiClient();
|
|
12
11
|
}
|
|
@@ -18,7 +17,6 @@ export class WolfpackClient {
|
|
|
18
17
|
try {
|
|
19
18
|
const team = await this.api.get(`/team/${teamSlug}`);
|
|
20
19
|
this.teamId = team.id;
|
|
21
|
-
this.teamSlug = team.slug;
|
|
22
20
|
return team.id;
|
|
23
21
|
}
|
|
24
22
|
catch (error) {
|
|
@@ -28,40 +26,21 @@ export class WolfpackClient {
|
|
|
28
26
|
getTeamId() {
|
|
29
27
|
return this.teamId;
|
|
30
28
|
}
|
|
31
|
-
getTeamSlug() {
|
|
32
|
-
return this.teamSlug;
|
|
33
|
-
}
|
|
34
29
|
setTeamId(teamId) {
|
|
35
30
|
this.teamId = teamId;
|
|
36
31
|
}
|
|
37
|
-
setTeamSlug(slug) {
|
|
38
|
-
this.teamSlug = slug;
|
|
39
|
-
}
|
|
40
32
|
/**
|
|
41
|
-
* Resolve a team slug from a team ID
|
|
33
|
+
* Resolve a team slug from a team ID or the cached team ID.
|
|
42
34
|
*/
|
|
43
35
|
async resolveSlug(teamId) {
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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.');
|
|
36
|
+
const id = teamId || this.teamId;
|
|
37
|
+
if (!id)
|
|
38
|
+
throw new Error('No team selected. Use list_teams first.');
|
|
39
|
+
const teams = await this.listTeams();
|
|
40
|
+
const team = teams.find((t) => t.id === id);
|
|
41
|
+
if (!team)
|
|
42
|
+
throw new Error(`Team with ID ${id} not found`);
|
|
43
|
+
return team.slug;
|
|
65
44
|
}
|
|
66
45
|
/**
|
|
67
46
|
* List all teams the authenticated user is a member of.
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextpro
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { createRequire } from 'module';
|
|
7
7
|
import { readFile, stat } from 'fs/promises';
|
|
8
|
-
import {
|
|
8
|
+
import { basename, extname, resolve } from 'path';
|
|
9
9
|
import { WolfpackClient } from './client.js';
|
|
10
10
|
import { validateConfig, config } from './config.js';
|
|
11
11
|
// Get current package version
|
|
@@ -799,8 +799,8 @@ class WolfpackMCPServer {
|
|
|
799
799
|
// Image tools
|
|
800
800
|
{
|
|
801
801
|
name: 'upload_image',
|
|
802
|
-
description: 'Upload an image file from disk and get back a permanent URL.
|
|
803
|
-
'
|
|
802
|
+
description: 'Upload an image file from disk and get back a permanent URL. ' +
|
|
803
|
+
'Reads the file directly from disk, avoiding slow base64 token generation. ' +
|
|
804
804
|
'Returns a markdown image URL you can include in any content field. ' +
|
|
805
805
|
'Requires mcp:images:upload permission.',
|
|
806
806
|
inputSchema: {
|
|
@@ -1333,7 +1333,6 @@ class WolfpackMCPServer {
|
|
|
1333
1333
|
if (teams.length === 1) {
|
|
1334
1334
|
// Auto-select the only team
|
|
1335
1335
|
this.client.setTeamId(teams[0].id);
|
|
1336
|
-
this.client.setTeamSlug(teams[0].slug);
|
|
1337
1336
|
console.error(`Auto-selected team: ${teams[0].name} (${teams[0].slug})`);
|
|
1338
1337
|
}
|
|
1339
1338
|
else if (teams.length === 0) {
|