viewgate-mcp 1.0.33 → 1.0.35

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -35
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ function createMcpServer(apiKey, personalKey) {
56
56
  type: "object",
57
57
  properties: {
58
58
  limit: { type: "number", description: "Maximum number of annotations to retrieve (default: 3, automatically increased if specific keys are provided)", default: 3 },
59
- status: { type: "string", description: "Comma-separated list (e.g. 'pending,bug_fixing'). Use 'all' for any state.", default: "pending,bug_fixing" },
59
+ status: { type: "string", description: "Comma-separated list (e.g. 'pending,bug_fixing'). Only 'pending' and 'bug_fixing' are allowed for MCP resolution flow.", default: "pending,bug_fixing" },
60
60
  search: { type: "string", description: "Search term to filter by message or file." },
61
61
  key: { type: "string", description: "Human key (e.g. VG-XXXX) or comma-separated keys to find specific annotations." },
62
62
  keys: { type: "array", items: { type: "string" }, description: "List of human keys (e.g. VG-XXXX) to find specific annotations." },
@@ -157,22 +157,6 @@ function createMcpServer(apiKey, personalKey) {
157
157
  description: "Retrieves the list of endpoints currently synchronized in the backend.",
158
158
  inputSchema: { type: "object", properties: {} },
159
159
  },
160
- {
161
- name: "get_optimizations",
162
- description: "Retrieves reported JSON payload optimizations.",
163
- inputSchema: { type: "object", properties: {} },
164
- },
165
- {
166
- name: "mark_optimization_applied",
167
- description: "Marks a payload optimization as applied.",
168
- inputSchema: {
169
- type: "object",
170
- properties: {
171
- id: { type: "string" }
172
- },
173
- required: ["id"]
174
- },
175
- },
176
160
  {
177
161
  name: "get_ai_resolved_tickets",
178
162
  description: "Retrieves the list of ticket IDs that have already been resolved by the AI in the current sprint.",
@@ -189,7 +173,10 @@ function createMcpServer(apiKey, personalKey) {
189
173
  case "get_annotations": {
190
174
  const args = request.params.arguments;
191
175
  const limit = args.limit || 3;
192
- const statuses = args.status || 'pending,bug_fixing';
176
+ // Strictly enforce allowed statuses: pending and bug_fixing
177
+ const allowedStatuses = ['pending', 'bug_fixing'];
178
+ const requestedStatuses = (args.status || 'pending,bug_fixing').split(',').map(s => s.trim()).filter(s => allowedStatuses.includes(s));
179
+ const statuses = requestedStatuses.length > 0 ? requestedStatuses.join(',') : 'pending,bug_fixing';
193
180
  const search = args.search || '';
194
181
  // Normalize keys and ids
195
182
  let keysToFetch = [];
@@ -391,23 +378,6 @@ Instruction: ${ann.message}`
391
378
  const data = await response.json();
392
379
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
393
380
  }
394
- case "get_optimizations": {
395
- const response = await fetch(`${BACKEND_URL}/api/mcp/optimizations`, {
396
- headers: { 'x-api-key': apiKey, ...(personalKey ? { 'x-personal-key': personalKey } : {}) }
397
- });
398
- if (!response.ok)
399
- throw new Error(`Backend responded with ${response.status}`);
400
- const data = await response.json();
401
- return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
402
- }
403
- case "mark_optimization_applied": {
404
- const args = request.params.arguments;
405
- const response = await fetch(`${BACKEND_URL}/api/mcp/optimizations/${args.id}/applied`, {
406
- method: 'PATCH',
407
- headers: { 'x-api-key': apiKey, ...(personalKey ? { 'x-personal-key': personalKey } : {}) }
408
- });
409
- return { content: [{ type: "text", text: "Optimization marked as applied." }] };
410
- }
411
381
  case "get_ai_resolved_tickets": {
412
382
  const response = await fetch(`${BACKEND_URL}/api/mcp/resolved-tickets`, {
413
383
  headers: { 'x-api-key': apiKey, ...(personalKey ? { 'x-personal-key': personalKey } : {}) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-mcp",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "viewgate-mcp": "./dist/index.js"