mobbdev 1.0.151 → 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.
- package/dist/index.mjs +27 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12517,8 +12517,6 @@ var McpGQLClient = class {
|
|
|
12517
12517
|
reportCount: res.fixReport?.length || 0
|
|
12518
12518
|
});
|
|
12519
12519
|
const fixes = this.mergeUserAndSystemFixes(res.fixReport?.[0], limit);
|
|
12520
|
-
const fixIds = fixes.map((fix) => fix.id);
|
|
12521
|
-
await this.updateFixesDownloadStatus(fixIds);
|
|
12522
12520
|
return {
|
|
12523
12521
|
fixReport: res.fixReport?.[0] ? {
|
|
12524
12522
|
...res.fixReport?.[0],
|
|
@@ -12585,8 +12583,6 @@ var McpGQLClient = class {
|
|
|
12585
12583
|
return null;
|
|
12586
12584
|
}
|
|
12587
12585
|
const fixes = this.mergeUserAndSystemFixes(res.fixReport?.[0], limit);
|
|
12588
|
-
const fixIds = fixes.map((fix) => fix.id);
|
|
12589
|
-
await this.updateFixesDownloadStatus(fixIds);
|
|
12590
12586
|
return {
|
|
12591
12587
|
fixes,
|
|
12592
12588
|
totalCount: res.fixReport?.[0]?.filteredFixesCount?.aggregate?.count || 0,
|
|
@@ -13090,7 +13086,8 @@ var applyFixesPrompt = ({
|
|
|
13090
13086
|
shownCount,
|
|
13091
13087
|
currentTool,
|
|
13092
13088
|
offset,
|
|
13093
|
-
limit
|
|
13089
|
+
limit,
|
|
13090
|
+
gqlClient
|
|
13094
13091
|
}) => {
|
|
13095
13092
|
if (fixes.length === 0) {
|
|
13096
13093
|
if (totalCount > 0) {
|
|
@@ -13114,9 +13111,12 @@ var applyFixesPrompt = ({
|
|
|
13114
13111
|
vulnerabilityType,
|
|
13115
13112
|
vulnerabilityDescription,
|
|
13116
13113
|
patch,
|
|
13117
|
-
gitBlameLogin
|
|
13114
|
+
gitBlameLogin,
|
|
13115
|
+
id: fix.id
|
|
13118
13116
|
};
|
|
13119
13117
|
});
|
|
13118
|
+
const fixIds = fixList.map((fix) => fix.id);
|
|
13119
|
+
void gqlClient.updateFixesDownloadStatus(fixIds);
|
|
13120
13120
|
return `## CRITICAL INSTRUCTIONS - READ CAREFULLY
|
|
13121
13121
|
|
|
13122
13122
|
You are an AI code assistant tasked with applying security vulnerability fixes. Follow these instructions EXACTLY:
|
|
@@ -13261,7 +13261,8 @@ var noFixesAvailablePrompt = `There are no fixes available for this repository a
|
|
|
13261
13261
|
var fixesFoundPrompt = ({
|
|
13262
13262
|
fixReport,
|
|
13263
13263
|
offset,
|
|
13264
|
-
limit
|
|
13264
|
+
limit,
|
|
13265
|
+
gqlClient
|
|
13265
13266
|
}) => {
|
|
13266
13267
|
const totalFixes = fixReport.filteredFixesCount.aggregate?.count || 0;
|
|
13267
13268
|
if (totalFixes === 0) {
|
|
@@ -13306,7 +13307,8 @@ ${applyFixesPrompt({
|
|
|
13306
13307
|
shownCount: fixReport.fixes.length,
|
|
13307
13308
|
currentTool: MCP_TOOL_FETCH_AVAILABLE_FIXES,
|
|
13308
13309
|
offset,
|
|
13309
|
-
limit
|
|
13310
|
+
limit,
|
|
13311
|
+
gqlClient
|
|
13310
13312
|
})}`;
|
|
13311
13313
|
};
|
|
13312
13314
|
var nextStepsPrompt = ({ scannedFiles }) => `
|
|
@@ -13344,7 +13346,8 @@ var fixesPrompt = ({
|
|
|
13344
13346
|
totalCount,
|
|
13345
13347
|
offset,
|
|
13346
13348
|
scannedFiles,
|
|
13347
|
-
limit
|
|
13349
|
+
limit,
|
|
13350
|
+
gqlClient
|
|
13348
13351
|
}) => {
|
|
13349
13352
|
if (totalCount === 0) {
|
|
13350
13353
|
return noFixesFoundPrompt({ scannedFiles });
|
|
@@ -13362,7 +13365,8 @@ ${applyFixesPrompt({
|
|
|
13362
13365
|
shownCount,
|
|
13363
13366
|
currentTool: MCP_TOOL_SCAN_AND_FIX_VULNERABILITIES,
|
|
13364
13367
|
offset,
|
|
13365
|
-
limit
|
|
13368
|
+
limit,
|
|
13369
|
+
gqlClient
|
|
13366
13370
|
})}
|
|
13367
13371
|
|
|
13368
13372
|
${nextStepsPrompt({ scannedFiles })}
|
|
@@ -13372,7 +13376,8 @@ var noFreshFixesPrompt = `No fresh fixes available for this repository at this t
|
|
|
13372
13376
|
var initialScanInProgressPrompt = `Initial scan is still in progress. No user message needed. Do not show any comments to the user.`;
|
|
13373
13377
|
var freshFixesPrompt = ({
|
|
13374
13378
|
fixes,
|
|
13375
|
-
limit
|
|
13379
|
+
limit,
|
|
13380
|
+
gqlClient
|
|
13376
13381
|
}) => {
|
|
13377
13382
|
return `Here are the fresh fixes to the vulnerabilities discovered by Mobb MCP
|
|
13378
13383
|
|
|
@@ -13384,7 +13389,8 @@ ${applyFixesPrompt({
|
|
|
13384
13389
|
shownCount: fixes.length,
|
|
13385
13390
|
currentTool: MCP_TOOL_FETCH_AVAILABLE_FIXES,
|
|
13386
13391
|
offset: 0,
|
|
13387
|
-
limit
|
|
13392
|
+
limit,
|
|
13393
|
+
gqlClient
|
|
13388
13394
|
})}
|
|
13389
13395
|
`;
|
|
13390
13396
|
};
|
|
@@ -14142,7 +14148,11 @@ var _CheckForNewAvailableFixesService = class _CheckForNewAvailableFixesService
|
|
|
14142
14148
|
`[${scanContext}] Reporting ${freshFixes.length} fresh fixes to user`
|
|
14143
14149
|
);
|
|
14144
14150
|
this.reportedFixes.push(...freshFixes);
|
|
14145
|
-
return freshFixesPrompt({
|
|
14151
|
+
return freshFixesPrompt({
|
|
14152
|
+
fixes: freshFixes,
|
|
14153
|
+
limit: MCP_DEFAULT_LIMIT,
|
|
14154
|
+
gqlClient: this.gqlClient
|
|
14155
|
+
});
|
|
14146
14156
|
}
|
|
14147
14157
|
logInfo(`[${scanContext}] No fresh fixes to report`);
|
|
14148
14158
|
return noFreshFixesPrompt;
|
|
@@ -14277,7 +14287,8 @@ var _FetchAvailableFixesService = class _FetchAvailableFixesService {
|
|
|
14277
14287
|
const prompt = fixesFoundPrompt({
|
|
14278
14288
|
fixReport,
|
|
14279
14289
|
offset: effectiveOffset,
|
|
14280
|
-
limit
|
|
14290
|
+
limit,
|
|
14291
|
+
gqlClient
|
|
14281
14292
|
});
|
|
14282
14293
|
this.currentOffset = effectiveOffset + (fixReport.fixes?.length || 0);
|
|
14283
14294
|
return prompt;
|
|
@@ -14474,7 +14485,8 @@ var _ScanAndFixVulnerabilitiesService = class _ScanAndFixVulnerabilitiesService
|
|
|
14474
14485
|
totalCount: fixes.totalCount,
|
|
14475
14486
|
offset: effectiveOffset,
|
|
14476
14487
|
scannedFiles: [...fileList],
|
|
14477
|
-
limit: effectiveLimit
|
|
14488
|
+
limit: effectiveLimit,
|
|
14489
|
+
gqlClient: this.gqlClient
|
|
14478
14490
|
});
|
|
14479
14491
|
this.currentOffset = effectiveOffset + (fixes.fixes?.length || 0);
|
|
14480
14492
|
return prompt;
|