@bbearai/mcp-server 0.7.0 → 0.7.1
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/index.js +54 -0
- package/package.json +1 -1
- package/src/index.ts +58 -0
package/dist/index.js
CHANGED
|
@@ -193,6 +193,25 @@ const tools = [
|
|
|
193
193
|
required: ['report_id'],
|
|
194
194
|
},
|
|
195
195
|
},
|
|
196
|
+
{
|
|
197
|
+
name: 'resolve_conversations',
|
|
198
|
+
description: 'Mark one or more discussion threads as resolved (closed) or reopen them. Use this to close conversations after issues are addressed.',
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
properties: {
|
|
202
|
+
thread_ids: {
|
|
203
|
+
type: 'array',
|
|
204
|
+
items: { type: 'string' },
|
|
205
|
+
description: 'UUIDs of the discussion threads to resolve/reopen',
|
|
206
|
+
},
|
|
207
|
+
resolved: {
|
|
208
|
+
type: 'boolean',
|
|
209
|
+
description: 'true to mark as resolved (default), false to reopen',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
required: ['thread_ids'],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
196
215
|
{
|
|
197
216
|
name: 'get_project_info',
|
|
198
217
|
description: 'Get project information including QA tracks, test case counts, and common bug patterns',
|
|
@@ -2155,6 +2174,38 @@ async function getReportComments(args) {
|
|
|
2155
2174
|
return { error: error.message };
|
|
2156
2175
|
return { comments: (messages || []).map(m => ({ id: m.id, sender_type: m.sender_type, content: m.content, created_at: m.created_at, attachments: m.attachments })), total: (messages || []).length };
|
|
2157
2176
|
}
|
|
2177
|
+
async function resolveConversations(args) {
|
|
2178
|
+
if (!args.thread_ids || args.thread_ids.length === 0) {
|
|
2179
|
+
return { error: 'At least one thread_id is required' };
|
|
2180
|
+
}
|
|
2181
|
+
if (args.thread_ids.length > 50) {
|
|
2182
|
+
return { error: 'Maximum 50 threads per request' };
|
|
2183
|
+
}
|
|
2184
|
+
for (const id of args.thread_ids) {
|
|
2185
|
+
if (!isValidUUID(id))
|
|
2186
|
+
return { error: `Invalid thread_id format: ${id}` };
|
|
2187
|
+
}
|
|
2188
|
+
const resolved = args.resolved !== false;
|
|
2189
|
+
const { data, error } = await supabase
|
|
2190
|
+
.from('discussion_threads')
|
|
2191
|
+
.update({ is_resolved: resolved })
|
|
2192
|
+
.eq('project_id', currentProjectId)
|
|
2193
|
+
.in('id', args.thread_ids)
|
|
2194
|
+
.select('id, subject, is_resolved');
|
|
2195
|
+
if (error)
|
|
2196
|
+
return { error: error.message };
|
|
2197
|
+
const updated = data || [];
|
|
2198
|
+
const updatedIds = new Set(updated.map((t) => t.id));
|
|
2199
|
+
const notFound = args.thread_ids.filter(id => !updatedIds.has(id));
|
|
2200
|
+
return {
|
|
2201
|
+
success: true,
|
|
2202
|
+
updatedCount: updated.length,
|
|
2203
|
+
resolved,
|
|
2204
|
+
notFound: notFound.length > 0 ? notFound : undefined,
|
|
2205
|
+
threads: updated.map((t) => ({ id: t.id, subject: t.subject, is_resolved: t.is_resolved })),
|
|
2206
|
+
message: `${resolved ? 'Resolved' : 'Reopened'} ${updated.length} conversation(s).${notFound.length > 0 ? ` ${notFound.length} not found.` : ''}`,
|
|
2207
|
+
};
|
|
2208
|
+
}
|
|
2158
2209
|
async function getProjectInfo() {
|
|
2159
2210
|
// Get project details
|
|
2160
2211
|
const { data: project, error: projectError } = await supabase
|
|
@@ -6122,6 +6173,9 @@ async function main() {
|
|
|
6122
6173
|
case 'get_report_comments':
|
|
6123
6174
|
result = await getReportComments(args);
|
|
6124
6175
|
break;
|
|
6176
|
+
case 'resolve_conversations':
|
|
6177
|
+
result = await resolveConversations(args);
|
|
6178
|
+
break;
|
|
6125
6179
|
case 'get_project_info':
|
|
6126
6180
|
result = await getProjectInfo();
|
|
6127
6181
|
break;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -210,6 +210,25 @@ const tools = [
|
|
|
210
210
|
required: ['report_id'],
|
|
211
211
|
},
|
|
212
212
|
},
|
|
213
|
+
{
|
|
214
|
+
name: 'resolve_conversations',
|
|
215
|
+
description: 'Mark one or more discussion threads as resolved (closed) or reopen them. Use this to close conversations after issues are addressed.',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object' as const,
|
|
218
|
+
properties: {
|
|
219
|
+
thread_ids: {
|
|
220
|
+
type: 'array',
|
|
221
|
+
items: { type: 'string' },
|
|
222
|
+
description: 'UUIDs of the discussion threads to resolve/reopen',
|
|
223
|
+
},
|
|
224
|
+
resolved: {
|
|
225
|
+
type: 'boolean',
|
|
226
|
+
description: 'true to mark as resolved (default), false to reopen',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
required: ['thread_ids'],
|
|
230
|
+
},
|
|
231
|
+
},
|
|
213
232
|
{
|
|
214
233
|
name: 'get_project_info',
|
|
215
234
|
description: 'Get project information including QA tracks, test case counts, and common bug patterns',
|
|
@@ -2283,6 +2302,42 @@ async function getReportComments(args: { report_id: string }) {
|
|
|
2283
2302
|
return { comments: (messages || []).map(m => ({ id: m.id, sender_type: m.sender_type, content: m.content, created_at: m.created_at, attachments: m.attachments })), total: (messages || []).length };
|
|
2284
2303
|
}
|
|
2285
2304
|
|
|
2305
|
+
async function resolveConversations(args: { thread_ids: string[]; resolved?: boolean }) {
|
|
2306
|
+
if (!args.thread_ids || args.thread_ids.length === 0) {
|
|
2307
|
+
return { error: 'At least one thread_id is required' };
|
|
2308
|
+
}
|
|
2309
|
+
if (args.thread_ids.length > 50) {
|
|
2310
|
+
return { error: 'Maximum 50 threads per request' };
|
|
2311
|
+
}
|
|
2312
|
+
for (const id of args.thread_ids) {
|
|
2313
|
+
if (!isValidUUID(id)) return { error: `Invalid thread_id format: ${id}` };
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
const resolved = args.resolved !== false;
|
|
2317
|
+
|
|
2318
|
+
const { data, error } = await supabase
|
|
2319
|
+
.from('discussion_threads')
|
|
2320
|
+
.update({ is_resolved: resolved })
|
|
2321
|
+
.eq('project_id', currentProjectId)
|
|
2322
|
+
.in('id', args.thread_ids)
|
|
2323
|
+
.select('id, subject, is_resolved');
|
|
2324
|
+
|
|
2325
|
+
if (error) return { error: error.message };
|
|
2326
|
+
|
|
2327
|
+
const updated = data || [];
|
|
2328
|
+
const updatedIds = new Set(updated.map((t: any) => t.id));
|
|
2329
|
+
const notFound = args.thread_ids.filter(id => !updatedIds.has(id));
|
|
2330
|
+
|
|
2331
|
+
return {
|
|
2332
|
+
success: true,
|
|
2333
|
+
updatedCount: updated.length,
|
|
2334
|
+
resolved,
|
|
2335
|
+
notFound: notFound.length > 0 ? notFound : undefined,
|
|
2336
|
+
threads: updated.map((t: any) => ({ id: t.id, subject: t.subject, is_resolved: t.is_resolved })),
|
|
2337
|
+
message: `${resolved ? 'Resolved' : 'Reopened'} ${updated.length} conversation(s).${notFound.length > 0 ? ` ${notFound.length} not found.` : ''}`,
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2286
2341
|
async function getProjectInfo() {
|
|
2287
2342
|
// Get project details
|
|
2288
2343
|
const { data: project, error: projectError } = await supabase
|
|
@@ -6955,6 +7010,9 @@ async function main() {
|
|
|
6955
7010
|
case 'get_report_comments':
|
|
6956
7011
|
result = await getReportComments(args as any);
|
|
6957
7012
|
break;
|
|
7013
|
+
case 'resolve_conversations':
|
|
7014
|
+
result = await resolveConversations(args as any);
|
|
7015
|
+
break;
|
|
6958
7016
|
case 'get_project_info':
|
|
6959
7017
|
result = await getProjectInfo();
|
|
6960
7018
|
break;
|