@mcp-abap-adt/core 7.0.3 → 7.1.0
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/CHANGELOG.md +13 -0
- package/dist/handlers/function_include/high/handleCreateFunctionInclude.d.ts +52 -0
- package/dist/handlers/function_include/high/handleCreateFunctionInclude.d.ts.map +1 -0
- package/dist/handlers/function_include/high/handleCreateFunctionInclude.js +99 -0
- package/dist/handlers/function_include/high/handleCreateFunctionInclude.js.map +1 -0
- package/dist/handlers/function_include/high/handleDeleteFunctionInclude.d.ts +48 -0
- package/dist/handlers/function_include/high/handleDeleteFunctionInclude.d.ts.map +1 -0
- package/dist/handlers/function_include/high/handleDeleteFunctionInclude.js +110 -0
- package/dist/handlers/function_include/high/handleDeleteFunctionInclude.js.map +1 -0
- package/dist/handlers/function_include/high/handleUpdateFunctionInclude.d.ts +46 -0
- package/dist/handlers/function_include/high/handleUpdateFunctionInclude.d.ts.map +1 -0
- package/dist/handlers/function_include/high/handleUpdateFunctionInclude.js +124 -0
- package/dist/handlers/function_include/high/handleUpdateFunctionInclude.js.map +1 -0
- package/dist/handlers/function_include/readonly/handleListFunctionGroupIncludes.d.ts +26 -0
- package/dist/handlers/function_include/readonly/handleListFunctionGroupIncludes.d.ts.map +1 -0
- package/dist/handlers/function_include/readonly/handleListFunctionGroupIncludes.js +46 -0
- package/dist/handlers/function_include/readonly/handleListFunctionGroupIncludes.js.map +1 -0
- package/dist/handlers/function_include/readonly/handleListFunctionModules.d.ts +26 -0
- package/dist/handlers/function_include/readonly/handleListFunctionModules.d.ts.map +1 -0
- package/dist/handlers/function_include/readonly/handleListFunctionModules.js +46 -0
- package/dist/handlers/function_include/readonly/handleListFunctionModules.js.map +1 -0
- package/dist/handlers/function_include/readonly/handleReadFunctionInclude.d.ts +38 -0
- package/dist/handlers/function_include/readonly/handleReadFunctionInclude.d.ts.map +1 -0
- package/dist/handlers/function_include/readonly/handleReadFunctionInclude.js +94 -0
- package/dist/handlers/function_include/readonly/handleReadFunctionInclude.js.map +1 -0
- package/dist/handlers/include/readonly/handleGetIncludesList.d.ts.map +1 -1
- package/dist/handlers/include/readonly/handleGetIncludesList.js +63 -69
- package/dist/handlers/include/readonly/handleGetIncludesList.js.map +1 -1
- package/dist/handlers/structure/readonly/handleGetStructuresList.d.ts +62 -0
- package/dist/handlers/structure/readonly/handleGetStructuresList.d.ts.map +1 -0
- package/dist/handlers/structure/readonly/handleGetStructuresList.js +248 -0
- package/dist/handlers/structure/readonly/handleGetStructuresList.js.map +1 -0
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js +15 -0
- package/dist/lib/handlers/groups/HighLevelHandlersGroup.js.map +1 -1
- package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js +20 -0
- package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
2
|
+
export declare const TOOL_DEFINITION: {
|
|
3
|
+
readonly name: "ListFunctionModules";
|
|
4
|
+
readonly available_in: readonly ["onprem", "cloud", "legacy"];
|
|
5
|
+
readonly description: "[read-only] List the function modules of an ABAP function group.";
|
|
6
|
+
readonly inputSchema: {
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
readonly properties: {
|
|
9
|
+
readonly function_group_name: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly description: "Function group name (e.g., Z_MY_FG).";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
readonly required: readonly ["function_group_name"];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare function handleListFunctionModules(context: HandlerContext, args: {
|
|
18
|
+
function_group_name: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
isError: boolean;
|
|
21
|
+
content: {
|
|
22
|
+
type: string;
|
|
23
|
+
text: any;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=handleListFunctionModules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleListFunctionModules.d.ts","sourceRoot":"","sources":["../../../../src/handlers/function_include/readonly/handleListFunctionModules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAOvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAelB,CAAC;AAEX,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE;IAAE,mBAAmB,EAAE,MAAM,CAAA;CAAE;;;;;;GA6BtC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_DEFINITION = void 0;
|
|
4
|
+
exports.handleListFunctionModules = handleListFunctionModules;
|
|
5
|
+
const clients_1 = require("../../../lib/clients");
|
|
6
|
+
const utils_1 = require("../../../lib/utils");
|
|
7
|
+
exports.TOOL_DEFINITION = {
|
|
8
|
+
name: 'ListFunctionModules',
|
|
9
|
+
available_in: ['onprem', 'cloud', 'legacy'],
|
|
10
|
+
description: '[read-only] List the function modules of an ABAP function group.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
function_group_name: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'Function group name (e.g., Z_MY_FG).',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['function_group_name'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
async function handleListFunctionModules(context, args) {
|
|
23
|
+
const { connection, logger } = context;
|
|
24
|
+
try {
|
|
25
|
+
const { function_group_name } = args;
|
|
26
|
+
if (!function_group_name)
|
|
27
|
+
return (0, utils_1.return_error)(new Error('function_group_name is required'));
|
|
28
|
+
const client = (0, clients_1.createAdtClient)(connection, logger);
|
|
29
|
+
const functionGroupName = function_group_name.toUpperCase();
|
|
30
|
+
const modules = await client
|
|
31
|
+
.getUtils()
|
|
32
|
+
.listFunctionModules(functionGroupName);
|
|
33
|
+
return (0, utils_1.return_response)({
|
|
34
|
+
data: JSON.stringify({
|
|
35
|
+
success: true,
|
|
36
|
+
function_group_name: functionGroupName,
|
|
37
|
+
total: modules.length,
|
|
38
|
+
function_modules: modules,
|
|
39
|
+
}, null, 2),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return (0, utils_1.return_error)(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=handleListFunctionModules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleListFunctionModules.js","sourceRoot":"","sources":["../../../../src/handlers/function_include/readonly/handleListFunctionModules.ts"],"names":[],"mappings":";;;AAyBA,8DA+BC;AAxDD,kDAAuD;AAEvD,8CAI4B;AAEf,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,qBAAqB;IAC3B,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU;IACpD,WAAW,EACT,kEAAkE;IACpE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sCAAsC;aACpD;SACF;QACD,QAAQ,EAAE,CAAC,qBAAqB,CAAC;KAClC;CACO,CAAC;AAEJ,KAAK,UAAU,yBAAyB,CAC7C,OAAuB,EACvB,IAAqC;IAErC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,mBAAmB;YACtB,OAAO,IAAA,oBAAY,EAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAEpE,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACnD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,WAAW,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,MAAM,MAAM;aACzB,QAAQ,EAAE;aACV,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;QAE1C,OAAO,IAAA,uBAAe,EAAC;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;gBACE,OAAO,EAAE,IAAI;gBACb,mBAAmB,EAAE,iBAAiB;gBACtC,KAAK,EAAE,OAAO,CAAC,MAAM;gBACrB,gBAAgB,EAAE,OAAO;aAC1B,EACD,IAAI,EACJ,CAAC,CACF;SACe,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
2
|
+
export declare const TOOL_DEFINITION: {
|
|
3
|
+
readonly name: "ReadFunctionInclude";
|
|
4
|
+
readonly available_in: readonly ["onprem", "cloud", "legacy"];
|
|
5
|
+
readonly description: "[read-only] Read ABAP function group include source code and metadata. Answers: \"show function group include code\", \"display include source\", \"view include of function group\". Returns source code and include metadata.";
|
|
6
|
+
readonly inputSchema: {
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
readonly properties: {
|
|
9
|
+
readonly function_group_name: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly description: "Function group name containing the include (e.g., Z_MY_FG).";
|
|
12
|
+
};
|
|
13
|
+
readonly include_name: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly description: "Include name (e.g., LZ_MY_FGTOP, LZ_MY_FGU01).";
|
|
16
|
+
};
|
|
17
|
+
readonly version: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly enum: readonly ["active", "inactive"];
|
|
20
|
+
readonly description: "Version to read: \"active\" (default) or \"inactive\".";
|
|
21
|
+
readonly default: "active";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
readonly required: readonly ["function_group_name", "include_name"];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare function handleReadFunctionInclude(context: HandlerContext, args: {
|
|
28
|
+
function_group_name: string;
|
|
29
|
+
include_name: string;
|
|
30
|
+
version?: 'active' | 'inactive';
|
|
31
|
+
}): Promise<{
|
|
32
|
+
isError: boolean;
|
|
33
|
+
content: {
|
|
34
|
+
type: string;
|
|
35
|
+
text: any;
|
|
36
|
+
}[];
|
|
37
|
+
}>;
|
|
38
|
+
//# sourceMappingURL=handleReadFunctionInclude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleReadFunctionInclude.d.ts","sourceRoot":"","sources":["../../../../src/handlers/function_include/readonly/handleReadFunctionInclude.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAOvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAC;AAEX,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE;IACJ,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CACjC;;;;;;GAgEF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_DEFINITION = void 0;
|
|
4
|
+
exports.handleReadFunctionInclude = handleReadFunctionInclude;
|
|
5
|
+
const clients_1 = require("../../../lib/clients");
|
|
6
|
+
const utils_1 = require("../../../lib/utils");
|
|
7
|
+
exports.TOOL_DEFINITION = {
|
|
8
|
+
name: 'ReadFunctionInclude',
|
|
9
|
+
available_in: ['onprem', 'cloud', 'legacy'],
|
|
10
|
+
description: '[read-only] Read ABAP function group include source code and metadata. Answers: "show function group include code", "display include source", "view include of function group". Returns source code and include metadata.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
function_group_name: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'Function group name containing the include (e.g., Z_MY_FG).',
|
|
17
|
+
},
|
|
18
|
+
include_name: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Include name (e.g., LZ_MY_FGTOP, LZ_MY_FGU01).',
|
|
21
|
+
},
|
|
22
|
+
version: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
enum: ['active', 'inactive'],
|
|
25
|
+
description: 'Version to read: "active" (default) or "inactive".',
|
|
26
|
+
default: 'active',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['function_group_name', 'include_name'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
async function handleReadFunctionInclude(context, args) {
|
|
33
|
+
const { connection, logger } = context;
|
|
34
|
+
try {
|
|
35
|
+
const { function_group_name, include_name, version = 'active' } = args;
|
|
36
|
+
if (!function_group_name || !include_name)
|
|
37
|
+
return (0, utils_1.return_error)(new Error('function_group_name and include_name are required'));
|
|
38
|
+
const client = (0, clients_1.createAdtClient)(connection, logger);
|
|
39
|
+
const functionGroupName = function_group_name.toUpperCase();
|
|
40
|
+
const includeName = include_name.toUpperCase();
|
|
41
|
+
const obj = client.getFunctionInclude();
|
|
42
|
+
let source_code = null;
|
|
43
|
+
try {
|
|
44
|
+
const readResult = await obj.read({ functionGroupName, includeName }, version);
|
|
45
|
+
if (readResult?.readResult?.data) {
|
|
46
|
+
source_code =
|
|
47
|
+
typeof readResult.readResult.data === 'string'
|
|
48
|
+
? readResult.readResult.data
|
|
49
|
+
: safeStringify(readResult.readResult.data);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
logger?.warn(`Could not read source for ${includeName}: ${e?.message}`);
|
|
54
|
+
}
|
|
55
|
+
let metadata = null;
|
|
56
|
+
try {
|
|
57
|
+
const metaResult = await obj.readMetadata({
|
|
58
|
+
functionGroupName,
|
|
59
|
+
includeName,
|
|
60
|
+
});
|
|
61
|
+
if (metaResult?.metadataResult?.data) {
|
|
62
|
+
metadata =
|
|
63
|
+
typeof metaResult.metadataResult.data === 'string'
|
|
64
|
+
? metaResult.metadataResult.data
|
|
65
|
+
: safeStringify(metaResult.metadataResult.data);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
logger?.warn(`Could not read metadata for ${includeName}: ${e?.message}`);
|
|
70
|
+
}
|
|
71
|
+
return (0, utils_1.return_response)({
|
|
72
|
+
data: JSON.stringify({
|
|
73
|
+
success: true,
|
|
74
|
+
function_group_name: functionGroupName,
|
|
75
|
+
include_name: includeName,
|
|
76
|
+
version,
|
|
77
|
+
source_code,
|
|
78
|
+
metadata,
|
|
79
|
+
}, null, 2),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return (0, utils_1.return_error)(error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function safeStringify(data) {
|
|
87
|
+
try {
|
|
88
|
+
return JSON.stringify(data);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return String(data);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=handleReadFunctionInclude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleReadFunctionInclude.js","sourceRoot":"","sources":["../../../../src/handlers/function_include/readonly/handleReadFunctionInclude.ts"],"names":[],"mappings":";;;AAoCA,8DAsEC;AA1G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BACzB,OAAO;gBACP,WAAW;gBACX,QAAQ;aACT,EACD,IAAI,EACJ,CAAC,CACF;SACe,CAAC,CAAC;IACtB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oBAAY,EAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,IAAa;IAClC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleGetIncludesList.d.ts","sourceRoot":"","sources":["../../../../src/handlers/include/readonly/handleGetIncludesList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BlB,CAAC;
|
|
1
|
+
{"version":3,"file":"handleGetIncludesList.d.ts","sourceRoot":"","sources":["../../../../src/handlers/include/readonly/handleGetIncludesList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BlB,CAAC;AA4JX,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,GAAG;;;;;;GAwGV"}
|
|
@@ -112,10 +112,30 @@ function parseIncludeNamesFromXml(xmlData) {
|
|
|
112
112
|
}
|
|
113
113
|
return [...new Set(includeNames)]; // Remove duplicates
|
|
114
114
|
}
|
|
115
|
+
const MAX_INCLUDE_DEPTH = 20;
|
|
116
|
+
/**
|
|
117
|
+
* Discovers the direct child includes of a single object via its ADT node
|
|
118
|
+
* structure. Returns an empty array when the object has no includes node.
|
|
119
|
+
*/
|
|
120
|
+
async function discoverIncludeNames(utils, parentType, parentName, requestTimeout) {
|
|
121
|
+
const withTimeout = (p, what) => Promise.race([
|
|
122
|
+
p,
|
|
123
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${requestTimeout}ms while ${what} for ${parentName}`)), requestTimeout)),
|
|
124
|
+
]);
|
|
125
|
+
// Step 1: root node structure to find the includes node id.
|
|
126
|
+
const rootResponse = (await withTimeout(utils.fetchNodeStructure(parentType, parentName, '000000', true), 'fetching root node structure'));
|
|
127
|
+
const includesInfo = parseIncludesFromXml(rootResponse.data);
|
|
128
|
+
const includesNode = includesInfo.find((info) => info.name === 'PROG/I');
|
|
129
|
+
if (!includesNode)
|
|
130
|
+
return [];
|
|
131
|
+
// Step 2: include list under that node.
|
|
132
|
+
const includesResponse = (await withTimeout(utils.fetchNodeStructure(parentType, parentName, includesNode.node_id, true), 'fetching includes list'));
|
|
133
|
+
return parseIncludeNamesFromXml(includesResponse.data);
|
|
134
|
+
}
|
|
115
135
|
async function handleGetIncludesList(context, args) {
|
|
116
136
|
const { connection, logger } = context;
|
|
117
137
|
try {
|
|
118
|
-
const { object_name, object_type, timeout
|
|
138
|
+
const { object_name, object_type, timeout } = args;
|
|
119
139
|
if (!object_name ||
|
|
120
140
|
typeof object_name !== 'string' ||
|
|
121
141
|
object_name.trim() === '') {
|
|
@@ -126,78 +146,52 @@ async function handleGetIncludesList(context, args) {
|
|
|
126
146
|
}
|
|
127
147
|
// Default timeout: 30 seconds
|
|
128
148
|
const requestTimeout = timeout && typeof timeout === 'number' ? timeout : 30000;
|
|
129
|
-
const isDetailed = detailed === true;
|
|
130
|
-
// Pass object_type straight through as parentType
|
|
131
149
|
const parentName = object_name.toUpperCase();
|
|
132
150
|
const parentType = object_type;
|
|
133
|
-
logger?.info(`Starting includes discovery for ${parentName} (${parentType})
|
|
134
|
-
// Create AdtClient and get utilities
|
|
151
|
+
logger?.info(`Starting includes tree discovery for ${parentName} (${parentType})`);
|
|
135
152
|
const client = (0, clients_1.createAdtClient)(connection, logger);
|
|
136
153
|
const utils = client.getUtils();
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
utils
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
content: [
|
|
179
|
-
{
|
|
180
|
-
type: 'text',
|
|
181
|
-
text: JSON.stringify(detailedResponse, null, 2),
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
};
|
|
185
|
-
return result;
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
// Return minimal text response (original format)
|
|
189
|
-
const responseData = includeNames.length > 0 ? includeNames.join('\n') : '';
|
|
190
|
-
const plainResult = {
|
|
191
|
-
isError: false,
|
|
192
|
-
content: [
|
|
193
|
-
{
|
|
194
|
-
type: 'text',
|
|
195
|
-
text: responseData,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
};
|
|
199
|
-
return plainResult;
|
|
200
|
-
}
|
|
154
|
+
const visited = new Set([parentName]);
|
|
155
|
+
const buildChildren = async (ownerType, ownerName, depth) => {
|
|
156
|
+
const names = await discoverIncludeNames(utils, ownerType, ownerName, requestTimeout);
|
|
157
|
+
const children = [];
|
|
158
|
+
for (const rawName of names) {
|
|
159
|
+
const name = rawName.toUpperCase();
|
|
160
|
+
const node = { name, children: [] };
|
|
161
|
+
if (visited.has(name)) {
|
|
162
|
+
node.cyclic = true;
|
|
163
|
+
children.push(node);
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (depth >= MAX_INCLUDE_DEPTH) {
|
|
167
|
+
node.truncated = true;
|
|
168
|
+
children.push(node);
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
visited.add(name);
|
|
172
|
+
// Recurse into the include as a PROG/I.
|
|
173
|
+
node.children = await buildChildren('PROG/I', name, depth + 1);
|
|
174
|
+
children.push(node);
|
|
175
|
+
}
|
|
176
|
+
return children;
|
|
177
|
+
};
|
|
178
|
+
const tree = {
|
|
179
|
+
name: parentName,
|
|
180
|
+
children: await buildChildren(parentType, parentName, 0),
|
|
181
|
+
};
|
|
182
|
+
return {
|
|
183
|
+
isError: false,
|
|
184
|
+
content: [
|
|
185
|
+
{
|
|
186
|
+
type: 'text',
|
|
187
|
+
text: JSON.stringify({
|
|
188
|
+
object_name: parentName,
|
|
189
|
+
object_type: parentType,
|
|
190
|
+
tree,
|
|
191
|
+
}, null, 2),
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
};
|
|
201
195
|
}
|
|
202
196
|
catch (error) {
|
|
203
197
|
logger?.error(`Error getting includes list: ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleGetIncludesList.js","sourceRoot":"","sources":["../../../../src/handlers/include/readonly/handleGetIncludesList.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"handleGetIncludesList.js","sourceRoot":"","sources":["../../../../src/handlers/include/readonly/handleGetIncludesList.ts"],"names":[],"mappings":";;;AA8LA,sDA0GC;AAxSD,kDAAuD;AAEvD,8CAAuE;AAC1D,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU;IACpD,WA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GAAgB;YACxB,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,MAAM,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;SACzD,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,WAAW,EAAE,UAAU;wBACvB,WAAW,EAAE,UAAU;wBACvB,IAAI;qBACL,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,EAAE,KAAK,CACX,gCAAgC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACzF,CAAC;QACF,OAAO,IAAA,oBAAY,EACjB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAC1D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { HandlerContext } from '../../../lib/handlers/interfaces';
|
|
2
|
+
export declare const TOOL_DEFINITION: {
|
|
3
|
+
readonly name: "GetStructuresList";
|
|
4
|
+
readonly available_in: readonly ["onprem", "cloud", "legacy"];
|
|
5
|
+
readonly description: "[read-only] Recursively list the structures embedded in an ABAP structure (.INCLUDE / append), as a tree.";
|
|
6
|
+
readonly inputSchema: {
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
readonly properties: {
|
|
9
|
+
readonly structure_name: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly description: "Structure name (e.g., Z_MY_STRUCTURE).";
|
|
12
|
+
};
|
|
13
|
+
readonly version: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly enum: readonly ["active", "inactive"];
|
|
16
|
+
readonly description: "Version to read: \"active\" (default) or \"inactive\".";
|
|
17
|
+
readonly default: "active";
|
|
18
|
+
};
|
|
19
|
+
readonly include_extensions: {
|
|
20
|
+
readonly type: "boolean";
|
|
21
|
+
readonly description: "[read-only] Also find extension (append) structures via where-used (objects that `extend type <this> with …`). Default true. Set false to skip the (slower) where-used lookups and return includes only.";
|
|
22
|
+
readonly default: true;
|
|
23
|
+
};
|
|
24
|
+
readonly timeout: {
|
|
25
|
+
readonly type: "number";
|
|
26
|
+
readonly description: "[read-only] Timeout in ms for each ADT request.";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly required: readonly ["structure_name"];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
interface EmbeddedRef {
|
|
33
|
+
name: string;
|
|
34
|
+
attribute: string | null;
|
|
35
|
+
kind: 'include' | 'append';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parses structure/table DDL (or classic field-list) source for embedded
|
|
39
|
+
* STRUCTURES. Recognised forms (see a real table like VBAK):
|
|
40
|
+
* include <name>; -> anonymous include (attribute = null)
|
|
41
|
+
* <attr> : include <name>; -> named include (attribute = <attr>)
|
|
42
|
+
* .INCLUDE <name> -> classic include
|
|
43
|
+
* .APPEND[STRUCTURE] <name> -> classic append
|
|
44
|
+
* Plain component lines (`fld : type;`) and annotations (`@AbapCatalog…`) are
|
|
45
|
+
* NOT structure embeddings and are ignored — do NOT confuse the
|
|
46
|
+
* `@AbapCatalog.enhancement.category` annotation with an include/append.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseEmbeddedStructures(source: string): EmbeddedRef[];
|
|
49
|
+
export declare function handleGetStructuresList(context: HandlerContext, args: {
|
|
50
|
+
structure_name: string;
|
|
51
|
+
version?: 'active' | 'inactive';
|
|
52
|
+
include_extensions?: boolean;
|
|
53
|
+
timeout?: number;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
isError: boolean;
|
|
56
|
+
content: {
|
|
57
|
+
type: string;
|
|
58
|
+
text: any;
|
|
59
|
+
}[];
|
|
60
|
+
}>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=handleGetStructuresList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleGetStructuresList.d.ts","sourceRoot":"","sources":["../../../../src/handlers/structure/readonly/handleGetStructuresList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAOvE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BlB,CAAC;AAWX,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CA0DrE;AAcD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE;IACJ,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;GA2JF"}
|