mobbdev 1.0.148 → 1.0.152

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.mjs +44 -24
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -5209,6 +5209,23 @@ var GetReportFixesQueryZ = z11.object({
5209
5209
  })
5210
5210
  )
5211
5211
  }).nullish();
5212
+ var GetFixReportStatsQueryZ = z11.object({
5213
+ project_by_pk: z11.object({
5214
+ vulnerabilityReports: z11.array(
5215
+ z11.object({
5216
+ fixReport: z11.object({
5217
+ id: z11.string().uuid(),
5218
+ vulnerabilitySeverities: z11.record(z11.nativeEnum(Vulnerability_Severity_Enum), z11.number()).nullable(),
5219
+ vulnerabilityReportIrrelevantIssuesCount: z11.object({
5220
+ vulnerabilityReportIssues_aggregate: z11.object({
5221
+ aggregate: z11.object({ count: z11.number() })
5222
+ })
5223
+ })
5224
+ })
5225
+ })
5226
+ )
5227
+ }).nullable()
5228
+ });
5212
5229
  var ProjectVulnerabilityReport = z11.object({
5213
5230
  id: z11.string().uuid(),
5214
5231
  name: z11.string().nullable(),
@@ -5216,18 +5233,9 @@ var ProjectVulnerabilityReport = z11.object({
5216
5233
  fixReport: z11.object({
5217
5234
  id: z11.string().uuid(),
5218
5235
  createdOn: z11.string(),
5219
- vulnerabilityReportIrrelevantIssuesCount: z11.object({
5220
- vulnerabilityReportIssues_aggregate: z11.object({
5221
- aggregate: z11.object({ count: z11.number() })
5222
- })
5223
- }),
5224
5236
  issueTypes: z11.record(z11.string(), z11.number()).nullable(),
5225
5237
  issueLanguages: z11.record(z11.nativeEnum(IssueLanguage_Enum), z11.number()).nullable(),
5226
5238
  fixesCountByEffort: z11.record(z11.nativeEnum(Effort_To_Apply_Fix_Enum), z11.number()).nullable(),
5227
- vulnerabilitySeverities: z11.record(z11.nativeEnum(Vulnerability_Severity_Enum), z11.number()).nullable(),
5228
- fixesDoneCount: z11.number(),
5229
- fixesInprogressCount: z11.number(),
5230
- fixesReadyCount: z11.number(),
5231
5239
  repo: z11.object({
5232
5240
  originalUrl: z11.string(),
5233
5241
  reference: z11.string(),
@@ -12509,8 +12517,6 @@ var McpGQLClient = class {
12509
12517
  reportCount: res.fixReport?.length || 0
12510
12518
  });
12511
12519
  const fixes = this.mergeUserAndSystemFixes(res.fixReport?.[0], limit);
12512
- const fixIds = fixes.map((fix) => fix.id);
12513
- await this.updateFixesDownloadStatus(fixIds);
12514
12520
  return {
12515
12521
  fixReport: res.fixReport?.[0] ? {
12516
12522
  ...res.fixReport?.[0],
@@ -12577,8 +12583,6 @@ var McpGQLClient = class {
12577
12583
  return null;
12578
12584
  }
12579
12585
  const fixes = this.mergeUserAndSystemFixes(res.fixReport?.[0], limit);
12580
- const fixIds = fixes.map((fix) => fix.id);
12581
- await this.updateFixesDownloadStatus(fixIds);
12582
12586
  return {
12583
12587
  fixes,
12584
12588
  totalCount: res.fixReport?.[0]?.filteredFixesCount?.aggregate?.count || 0,
@@ -13082,7 +13086,8 @@ var applyFixesPrompt = ({
13082
13086
  shownCount,
13083
13087
  currentTool,
13084
13088
  offset,
13085
- limit
13089
+ limit,
13090
+ gqlClient
13086
13091
  }) => {
13087
13092
  if (fixes.length === 0) {
13088
13093
  if (totalCount > 0) {
@@ -13106,9 +13111,12 @@ var applyFixesPrompt = ({
13106
13111
  vulnerabilityType,
13107
13112
  vulnerabilityDescription,
13108
13113
  patch,
13109
- gitBlameLogin
13114
+ gitBlameLogin,
13115
+ id: fix.id
13110
13116
  };
13111
13117
  });
13118
+ const fixIds = fixList.map((fix) => fix.id);
13119
+ void gqlClient.updateFixesDownloadStatus(fixIds);
13112
13120
  return `## CRITICAL INSTRUCTIONS - READ CAREFULLY
13113
13121
 
13114
13122
  You are an AI code assistant tasked with applying security vulnerability fixes. Follow these instructions EXACTLY:
@@ -13253,7 +13261,8 @@ var noFixesAvailablePrompt = `There are no fixes available for this repository a
13253
13261
  var fixesFoundPrompt = ({
13254
13262
  fixReport,
13255
13263
  offset,
13256
- limit
13264
+ limit,
13265
+ gqlClient
13257
13266
  }) => {
13258
13267
  const totalFixes = fixReport.filteredFixesCount.aggregate?.count || 0;
13259
13268
  if (totalFixes === 0) {
@@ -13298,7 +13307,8 @@ ${applyFixesPrompt({
13298
13307
  shownCount: fixReport.fixes.length,
13299
13308
  currentTool: MCP_TOOL_FETCH_AVAILABLE_FIXES,
13300
13309
  offset,
13301
- limit
13310
+ limit,
13311
+ gqlClient
13302
13312
  })}`;
13303
13313
  };
13304
13314
  var nextStepsPrompt = ({ scannedFiles }) => `
@@ -13336,7 +13346,8 @@ var fixesPrompt = ({
13336
13346
  totalCount,
13337
13347
  offset,
13338
13348
  scannedFiles,
13339
- limit
13349
+ limit,
13350
+ gqlClient
13340
13351
  }) => {
13341
13352
  if (totalCount === 0) {
13342
13353
  return noFixesFoundPrompt({ scannedFiles });
@@ -13354,7 +13365,8 @@ ${applyFixesPrompt({
13354
13365
  shownCount,
13355
13366
  currentTool: MCP_TOOL_SCAN_AND_FIX_VULNERABILITIES,
13356
13367
  offset,
13357
- limit
13368
+ limit,
13369
+ gqlClient
13358
13370
  })}
13359
13371
 
13360
13372
  ${nextStepsPrompt({ scannedFiles })}
@@ -13364,7 +13376,8 @@ var noFreshFixesPrompt = `No fresh fixes available for this repository at this t
13364
13376
  var initialScanInProgressPrompt = `Initial scan is still in progress. No user message needed. Do not show any comments to the user.`;
13365
13377
  var freshFixesPrompt = ({
13366
13378
  fixes,
13367
- limit
13379
+ limit,
13380
+ gqlClient
13368
13381
  }) => {
13369
13382
  return `Here are the fresh fixes to the vulnerabilities discovered by Mobb MCP
13370
13383
 
@@ -13376,7 +13389,8 @@ ${applyFixesPrompt({
13376
13389
  shownCount: fixes.length,
13377
13390
  currentTool: MCP_TOOL_FETCH_AVAILABLE_FIXES,
13378
13391
  offset: 0,
13379
- limit
13392
+ limit,
13393
+ gqlClient
13380
13394
  })}
13381
13395
  `;
13382
13396
  };
@@ -14134,7 +14148,11 @@ var _CheckForNewAvailableFixesService = class _CheckForNewAvailableFixesService
14134
14148
  `[${scanContext}] Reporting ${freshFixes.length} fresh fixes to user`
14135
14149
  );
14136
14150
  this.reportedFixes.push(...freshFixes);
14137
- return freshFixesPrompt({ fixes: freshFixes, limit: MCP_DEFAULT_LIMIT });
14151
+ return freshFixesPrompt({
14152
+ fixes: freshFixes,
14153
+ limit: MCP_DEFAULT_LIMIT,
14154
+ gqlClient: this.gqlClient
14155
+ });
14138
14156
  }
14139
14157
  logInfo(`[${scanContext}] No fresh fixes to report`);
14140
14158
  return noFreshFixesPrompt;
@@ -14269,7 +14287,8 @@ var _FetchAvailableFixesService = class _FetchAvailableFixesService {
14269
14287
  const prompt = fixesFoundPrompt({
14270
14288
  fixReport,
14271
14289
  offset: effectiveOffset,
14272
- limit
14290
+ limit,
14291
+ gqlClient
14273
14292
  });
14274
14293
  this.currentOffset = effectiveOffset + (fixReport.fixes?.length || 0);
14275
14294
  return prompt;
@@ -14466,7 +14485,8 @@ var _ScanAndFixVulnerabilitiesService = class _ScanAndFixVulnerabilitiesService
14466
14485
  totalCount: fixes.totalCount,
14467
14486
  offset: effectiveOffset,
14468
14487
  scannedFiles: [...fileList],
14469
- limit: effectiveLimit
14488
+ limit: effectiveLimit,
14489
+ gqlClient: this.gqlClient
14470
14490
  });
14471
14491
  this.currentOffset = effectiveOffset + (fixes.fixes?.length || 0);
14472
14492
  return prompt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.148",
3
+ "version": "1.0.152",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.js",