mobbdev 1.0.151 → 1.0.153
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.mjs +34 -28
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5210,20 +5210,14 @@ var GetReportFixesQueryZ = z11.object({
|
|
|
5210
5210
|
)
|
|
5211
5211
|
}).nullish();
|
|
5212
5212
|
var GetFixReportStatsQueryZ = z11.object({
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
vulnerabilityReportIrrelevantIssuesCount: z11.object({
|
|
5220
|
-
vulnerabilityReportIssues_aggregate: z11.object({
|
|
5221
|
-
aggregate: z11.object({ count: z11.number() })
|
|
5222
|
-
})
|
|
5223
|
-
})
|
|
5224
|
-
})
|
|
5213
|
+
fixReport_by_pk: z11.object({
|
|
5214
|
+
id: z11.string().uuid(),
|
|
5215
|
+
vulnerabilitySeverities: z11.record(z11.nativeEnum(Vulnerability_Severity_Enum), z11.number()).nullable(),
|
|
5216
|
+
vulnerabilityReportIrrelevantIssuesCount: z11.object({
|
|
5217
|
+
vulnerabilityReportIssues_aggregate: z11.object({
|
|
5218
|
+
aggregate: z11.object({ count: z11.number() })
|
|
5225
5219
|
})
|
|
5226
|
-
)
|
|
5220
|
+
})
|
|
5227
5221
|
}).nullable()
|
|
5228
5222
|
});
|
|
5229
5223
|
var ProjectVulnerabilityReport = z11.object({
|
|
@@ -12517,8 +12511,6 @@ var McpGQLClient = class {
|
|
|
12517
12511
|
reportCount: res.fixReport?.length || 0
|
|
12518
12512
|
});
|
|
12519
12513
|
const fixes = this.mergeUserAndSystemFixes(res.fixReport?.[0], limit);
|
|
12520
|
-
const fixIds = fixes.map((fix) => fix.id);
|
|
12521
|
-
await this.updateFixesDownloadStatus(fixIds);
|
|
12522
12514
|
return {
|
|
12523
12515
|
fixReport: res.fixReport?.[0] ? {
|
|
12524
12516
|
...res.fixReport?.[0],
|
|
@@ -12585,8 +12577,6 @@ var McpGQLClient = class {
|
|
|
12585
12577
|
return null;
|
|
12586
12578
|
}
|
|
12587
12579
|
const fixes = this.mergeUserAndSystemFixes(res.fixReport?.[0], limit);
|
|
12588
|
-
const fixIds = fixes.map((fix) => fix.id);
|
|
12589
|
-
await this.updateFixesDownloadStatus(fixIds);
|
|
12590
12580
|
return {
|
|
12591
12581
|
fixes,
|
|
12592
12582
|
totalCount: res.fixReport?.[0]?.filteredFixesCount?.aggregate?.count || 0,
|
|
@@ -13090,7 +13080,8 @@ var applyFixesPrompt = ({
|
|
|
13090
13080
|
shownCount,
|
|
13091
13081
|
currentTool,
|
|
13092
13082
|
offset,
|
|
13093
|
-
limit
|
|
13083
|
+
limit,
|
|
13084
|
+
gqlClient
|
|
13094
13085
|
}) => {
|
|
13095
13086
|
if (fixes.length === 0) {
|
|
13096
13087
|
if (totalCount > 0) {
|
|
@@ -13114,9 +13105,12 @@ var applyFixesPrompt = ({
|
|
|
13114
13105
|
vulnerabilityType,
|
|
13115
13106
|
vulnerabilityDescription,
|
|
13116
13107
|
patch,
|
|
13117
|
-
gitBlameLogin
|
|
13108
|
+
gitBlameLogin,
|
|
13109
|
+
id: fix.id
|
|
13118
13110
|
};
|
|
13119
13111
|
});
|
|
13112
|
+
const fixIds = fixList.map((fix) => fix.id);
|
|
13113
|
+
void gqlClient.updateFixesDownloadStatus(fixIds);
|
|
13120
13114
|
return `## CRITICAL INSTRUCTIONS - READ CAREFULLY
|
|
13121
13115
|
|
|
13122
13116
|
You are an AI code assistant tasked with applying security vulnerability fixes. Follow these instructions EXACTLY:
|
|
@@ -13261,7 +13255,8 @@ var noFixesAvailablePrompt = `There are no fixes available for this repository a
|
|
|
13261
13255
|
var fixesFoundPrompt = ({
|
|
13262
13256
|
fixReport,
|
|
13263
13257
|
offset,
|
|
13264
|
-
limit
|
|
13258
|
+
limit,
|
|
13259
|
+
gqlClient
|
|
13265
13260
|
}) => {
|
|
13266
13261
|
const totalFixes = fixReport.filteredFixesCount.aggregate?.count || 0;
|
|
13267
13262
|
if (totalFixes === 0) {
|
|
@@ -13306,7 +13301,8 @@ ${applyFixesPrompt({
|
|
|
13306
13301
|
shownCount: fixReport.fixes.length,
|
|
13307
13302
|
currentTool: MCP_TOOL_FETCH_AVAILABLE_FIXES,
|
|
13308
13303
|
offset,
|
|
13309
|
-
limit
|
|
13304
|
+
limit,
|
|
13305
|
+
gqlClient
|
|
13310
13306
|
})}`;
|
|
13311
13307
|
};
|
|
13312
13308
|
var nextStepsPrompt = ({ scannedFiles }) => `
|
|
@@ -13344,7 +13340,8 @@ var fixesPrompt = ({
|
|
|
13344
13340
|
totalCount,
|
|
13345
13341
|
offset,
|
|
13346
13342
|
scannedFiles,
|
|
13347
|
-
limit
|
|
13343
|
+
limit,
|
|
13344
|
+
gqlClient
|
|
13348
13345
|
}) => {
|
|
13349
13346
|
if (totalCount === 0) {
|
|
13350
13347
|
return noFixesFoundPrompt({ scannedFiles });
|
|
@@ -13362,7 +13359,8 @@ ${applyFixesPrompt({
|
|
|
13362
13359
|
shownCount,
|
|
13363
13360
|
currentTool: MCP_TOOL_SCAN_AND_FIX_VULNERABILITIES,
|
|
13364
13361
|
offset,
|
|
13365
|
-
limit
|
|
13362
|
+
limit,
|
|
13363
|
+
gqlClient
|
|
13366
13364
|
})}
|
|
13367
13365
|
|
|
13368
13366
|
${nextStepsPrompt({ scannedFiles })}
|
|
@@ -13372,7 +13370,8 @@ var noFreshFixesPrompt = `No fresh fixes available for this repository at this t
|
|
|
13372
13370
|
var initialScanInProgressPrompt = `Initial scan is still in progress. No user message needed. Do not show any comments to the user.`;
|
|
13373
13371
|
var freshFixesPrompt = ({
|
|
13374
13372
|
fixes,
|
|
13375
|
-
limit
|
|
13373
|
+
limit,
|
|
13374
|
+
gqlClient
|
|
13376
13375
|
}) => {
|
|
13377
13376
|
return `Here are the fresh fixes to the vulnerabilities discovered by Mobb MCP
|
|
13378
13377
|
|
|
@@ -13384,7 +13383,8 @@ ${applyFixesPrompt({
|
|
|
13384
13383
|
shownCount: fixes.length,
|
|
13385
13384
|
currentTool: MCP_TOOL_FETCH_AVAILABLE_FIXES,
|
|
13386
13385
|
offset: 0,
|
|
13387
|
-
limit
|
|
13386
|
+
limit,
|
|
13387
|
+
gqlClient
|
|
13388
13388
|
})}
|
|
13389
13389
|
`;
|
|
13390
13390
|
};
|
|
@@ -14142,7 +14142,11 @@ var _CheckForNewAvailableFixesService = class _CheckForNewAvailableFixesService
|
|
|
14142
14142
|
`[${scanContext}] Reporting ${freshFixes.length} fresh fixes to user`
|
|
14143
14143
|
);
|
|
14144
14144
|
this.reportedFixes.push(...freshFixes);
|
|
14145
|
-
return freshFixesPrompt({
|
|
14145
|
+
return freshFixesPrompt({
|
|
14146
|
+
fixes: freshFixes,
|
|
14147
|
+
limit: MCP_DEFAULT_LIMIT,
|
|
14148
|
+
gqlClient: this.gqlClient
|
|
14149
|
+
});
|
|
14146
14150
|
}
|
|
14147
14151
|
logInfo(`[${scanContext}] No fresh fixes to report`);
|
|
14148
14152
|
return noFreshFixesPrompt;
|
|
@@ -14277,7 +14281,8 @@ var _FetchAvailableFixesService = class _FetchAvailableFixesService {
|
|
|
14277
14281
|
const prompt = fixesFoundPrompt({
|
|
14278
14282
|
fixReport,
|
|
14279
14283
|
offset: effectiveOffset,
|
|
14280
|
-
limit
|
|
14284
|
+
limit,
|
|
14285
|
+
gqlClient
|
|
14281
14286
|
});
|
|
14282
14287
|
this.currentOffset = effectiveOffset + (fixReport.fixes?.length || 0);
|
|
14283
14288
|
return prompt;
|
|
@@ -14474,7 +14479,8 @@ var _ScanAndFixVulnerabilitiesService = class _ScanAndFixVulnerabilitiesService
|
|
|
14474
14479
|
totalCount: fixes.totalCount,
|
|
14475
14480
|
offset: effectiveOffset,
|
|
14476
14481
|
scannedFiles: [...fileList],
|
|
14477
|
-
limit: effectiveLimit
|
|
14482
|
+
limit: effectiveLimit,
|
|
14483
|
+
gqlClient: this.gqlClient
|
|
14478
14484
|
});
|
|
14479
14485
|
this.currentOffset = effectiveOffset + (fixes.fixes?.length || 0);
|
|
14480
14486
|
return prompt;
|