@abapify/adt-mcp 0.4.20 → 0.4.21
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/bin/adt-mcp-http.mjs +1 -1
- package/dist/bin/adt-mcp.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{server-DTLyqZq5.mjs → server-CnctMUQQ.mjs} +13 -1
- package/dist/server-CnctMUQQ.mjs.map +1 -0
- package/dist/{server-D2q3SSjJ.mjs → server-DV_gVN2C.mjs} +2 -2
- package/dist/{server-D2q3SSjJ.mjs.map → server-DV_gVN2C.mjs.map} +1 -1
- package/package.json +17 -16
- package/dist/server-DTLyqZq5.mjs.map +0 -1
package/dist/bin/adt-mcp.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as operationClassForMcpTool, i as assertMcpToolIsClassified, l as resolveObjectUri, n as registerTools, r as MCP_TOOL_SCOPE_CATALOGUE, s as isMcpToolAllowed, t as createMcpServer } from "./server-
|
|
2
|
-
import { a as parseSafeExecutePolicy, c as createSessionRegistry, i as parseDelegatedAssistantReadPolicy, n as startHttpServer, o as parseScopedAdtInvocationPolicy, r as createMcpInvocationVerifier, s as loadMultiSystemConfig, t as createHttpMcpHandler } from "./server-
|
|
1
|
+
import { c as operationClassForMcpTool, i as assertMcpToolIsClassified, l as resolveObjectUri, n as registerTools, r as MCP_TOOL_SCOPE_CATALOGUE, s as isMcpToolAllowed, t as createMcpServer } from "./server-CnctMUQQ.mjs";
|
|
2
|
+
import { a as parseSafeExecutePolicy, c as createSessionRegistry, i as parseDelegatedAssistantReadPolicy, n as startHttpServer, o as parseScopedAdtInvocationPolicy, r as createMcpInvocationVerifier, s as loadMultiSystemConfig, t as createHttpMcpHandler } from "./server-DV_gVN2C.mjs";
|
|
3
3
|
|
|
4
4
|
// src/lib/session/destination-registry.ts
|
|
5
5
|
const DEFAULT_TTL_MS = 18e5;
|
|
@@ -3,6 +3,7 @@ import { AdtResponseTooLargeError, SourceVersionTooLargeError, createAdtClient,
|
|
|
3
3
|
import { AdtAuthError, BadiService, ChangesetService, CheckinService, CtsTransportLifecycleService, CtsTransportMetadataService, ExactSourceHistoryService, GetSourceTooLargeError, ImportService, getAdtClientV2Safe, getSource, resolveConnectionClient } from "@abapify/adt-services";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { buildCoverageQuery, buildStatementsBulkRequest, buildUsageReferenceRequestXml, buildUsageScopeRequestXml, extractCoverageMeasurementId, extractCoverageStatementUris, normalizeOdataEntity, normalizeOdataFeed, normalizeTransportFindResponse } from "@abapify/adt-contracts";
|
|
6
|
+
import { enrichFindingsWithCategories, fetchCheckCategoryIndex, resolveCategoriesViaDocumentation } from "@abapify/adt-atc";
|
|
6
7
|
import { Buffer } from "node:buffer";
|
|
7
8
|
import { FileLockStore, createLockService, resolveLockCorrelation } from "@abapify/adt-locks";
|
|
8
9
|
import { detectMethodBoundary, extractDependencies, lintAndFix, lintSource, listRules, normalizeMethodBody, stripToPublicApi } from "@abapify/adt-lint";
|
|
@@ -1216,11 +1217,17 @@ function lineFromLocation(value) {
|
|
|
1216
1217
|
const line = Number.parseInt(match[1], 10);
|
|
1217
1218
|
return Number.isSafeInteger(line) && line > 0 ? line : void 0;
|
|
1218
1219
|
}
|
|
1220
|
+
/** The trusted documentation link of one worklist finding (atom:link). */
|
|
1221
|
+
function documentationUriFromFinding(finding) {
|
|
1222
|
+
const link = records(finding.link).find((entry) => stringField(entry, "rel") === "http://www.sap.com/adt/relations/documentation");
|
|
1223
|
+
return link ? stringField(link, "href") : void 0;
|
|
1224
|
+
}
|
|
1219
1225
|
function canonicalFindings(response) {
|
|
1220
1226
|
const root = record(response);
|
|
1221
1227
|
return records((record(root?.worklist) ?? root)?.objects).flatMap((entry) => records(entry.object ?? entry)).flatMap((object) => {
|
|
1222
1228
|
return records(record(object.findings)?.finding ?? object.findings).map((finding) => {
|
|
1223
1229
|
const line = lineFromLocation(finding.location);
|
|
1230
|
+
const documentationUri = documentationUriFromFinding(finding);
|
|
1224
1231
|
return {
|
|
1225
1232
|
checkId: stringField(finding, "checkId") ?? "",
|
|
1226
1233
|
checkTitle: stringField(finding, "checkTitle") ?? "",
|
|
@@ -1232,6 +1239,7 @@ function canonicalFindings(response) {
|
|
|
1232
1239
|
lineStart: line,
|
|
1233
1240
|
lineEnd: line
|
|
1234
1241
|
} : {},
|
|
1242
|
+
...documentationUri ? { documentationUri } : {},
|
|
1235
1243
|
...stringField(finding, "messageId") ? { messageId: stringField(finding, "messageId") } : {},
|
|
1236
1244
|
...stringField(object, "packageName") ? { packageName: stringField(object, "packageName") } : {},
|
|
1237
1245
|
...stringField(finding, "checksum") ? { checksum: stringField(finding, "checksum") } : {}
|
|
@@ -1297,6 +1305,10 @@ function registerAtcRunTool(server, ctx) {
|
|
|
1297
1305
|
}] }
|
|
1298
1306
|
} });
|
|
1299
1307
|
const findings = canonicalFindings(await client.adt.atc.worklists.get(worklistId, { includeExemptedFindings: "false" }));
|
|
1308
|
+
const categoryIndex = await fetchCheckCategoryIndex(client, checkVariant);
|
|
1309
|
+
enrichFindingsWithCategories(findings, categoryIndex);
|
|
1310
|
+
await resolveCategoriesViaDocumentation(client, findings, categoryIndex);
|
|
1311
|
+
for (const finding of findings) delete finding.documentationUri;
|
|
1300
1312
|
if (safePolicy && findings.length > safePolicy.maxFindings) return safeExecuteLimitResult("safe_execute_limit_exceeded");
|
|
1301
1313
|
return { content: [{
|
|
1302
1314
|
type: "text",
|
|
@@ -7196,4 +7208,4 @@ function createMcpServer(options) {
|
|
|
7196
7208
|
}
|
|
7197
7209
|
|
|
7198
7210
|
export { isMcpDestinationKey as a, operationClassForMcpTool as c, assertMcpToolIsClassified as i, resolveObjectUri as l, registerTools as n, isMcpOperationClass as o, MCP_TOOL_SCOPE_CATALOGUE as r, isMcpToolAllowed as s, createMcpServer as t };
|
|
7199
|
-
//# sourceMappingURL=server-
|
|
7211
|
+
//# sourceMappingURL=server-CnctMUQQ.mjs.map
|