@mcp-abap-adt/compact-modify 21.0.0 → 22.0.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/README.md +3 -0
- package/dist/handlers/compactWriteRoutes.d.ts +1 -1
- package/dist/handlers/compactWriteRoutes.d.ts.map +1 -1
- package/dist/handlers/compactWriteRoutes.js.map +1 -1
- package/dist/handlers/handleHandlerActivate.d.ts +137 -12
- package/dist/handlers/handleHandlerActivate.d.ts.map +1 -1
- package/dist/handlers/handleHandlerActivate.js +64 -86
- package/dist/handlers/handleHandlerActivate.js.map +1 -1
- package/dist/handlers/handleHandlerCreate.d.ts +317 -8
- package/dist/handlers/handleHandlerCreate.d.ts.map +1 -1
- package/dist/handlers/handleHandlerCreate.js +26 -3
- package/dist/handlers/handleHandlerCreate.js.map +1 -1
- package/dist/handlers/handleHandlerDelete.d.ts +173 -5
- package/dist/handlers/handleHandlerDelete.d.ts.map +1 -1
- package/dist/handlers/handleHandlerDelete.js +4 -2
- package/dist/handlers/handleHandlerDelete.js.map +1 -1
- package/dist/handlers/handleHandlerLock.d.ts +48 -9
- package/dist/handlers/handleHandlerLock.d.ts.map +1 -1
- package/dist/handlers/handleHandlerLock.js +14 -8
- package/dist/handlers/handleHandlerLock.js.map +1 -1
- package/dist/handlers/handleHandlerProfileRun.d.ts +62 -4
- package/dist/handlers/handleHandlerProfileRun.d.ts.map +1 -1
- package/dist/handlers/handleHandlerProfileRun.js +4 -2
- package/dist/handlers/handleHandlerProfileRun.js.map +1 -1
- package/dist/handlers/handleHandlerProfileSchedule.d.ts +1 -1
- package/dist/handlers/handleHandlerProfileSchedule.js +1 -1
- package/dist/handlers/handleHandlerProfileSchedule.js.map +1 -1
- package/dist/handlers/handleHandlerUnitTestRun.d.ts +35 -5
- package/dist/handlers/handleHandlerUnitTestRun.d.ts.map +1 -1
- package/dist/handlers/handleHandlerUnitTestRun.js +1 -1
- package/dist/handlers/handleHandlerUnitTestRun.js.map +1 -1
- package/dist/handlers/handleHandlerUnlock.d.ts +47 -14
- package/dist/handlers/handleHandlerUnlock.d.ts.map +1 -1
- package/dist/handlers/handleHandlerUnlock.js +14 -8
- package/dist/handlers/handleHandlerUnlock.js.map +1 -1
- package/dist/handlers/handleHandlerUpdate.d.ts +267 -8
- package/dist/handlers/handleHandlerUpdate.d.ts.map +1 -1
- package/dist/handlers/handleHandlerUpdate.js +21 -3
- package/dist/handlers/handleHandlerUpdate.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -10,6 +10,9 @@ A different decomposition of the same ABAP ADT surface: the **operation** is the
|
|
|
10
10
|
tool and the object moves into the arguments. Where the object-oriented surface has
|
|
11
11
|
`CreateClass`, `CreateDomain`, `CreateDdl` and so on, compact has one
|
|
12
12
|
`HandlerCreate` with `object_type`. Twenty-seven tool schemas instead of hundreds.
|
|
13
|
+
Each `object_type` enum, and each tool's description, is the declared system type's: its
|
|
14
|
+
members are those the system type's ADT type table serves (22.0.0) — on cloud the writes offer
|
|
15
|
+
no `PROGRAM` — and a member outside them is refused naming the list, before anything is sent.
|
|
13
16
|
|
|
14
17
|
It exists for a host that **cannot build a retrieval pipeline of its own** — a small
|
|
15
18
|
context, no tool-RAG, no way to select tools per request — and must still drive ABAP
|
|
@@ -11,6 +11,6 @@ import { type CompactRouterMap, dispatchCompact } from '@mcp-abap-adt/lib/compac
|
|
|
11
11
|
export declare const compactWriteRouterMap: CompactRouterMap;
|
|
12
12
|
/** Route a compact write: `create`, `update` or `delete`. */
|
|
13
13
|
export declare function routeCompactWrite(context: Parameters<typeof dispatchCompact>[0], operation: Exclude<CompactCrudOperation, 'get'>, args: {
|
|
14
|
-
object_type
|
|
14
|
+
object_type?: CompactObjectType;
|
|
15
15
|
} & Record<string, unknown>): Promise<unknown>;
|
|
16
16
|
//# sourceMappingURL=compactWriteRoutes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compactWriteRoutes.d.ts","sourceRoot":"","sources":["../../src/handlers/compactWriteRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,gBAAgB,EACrB,eAAe,EAChB,MAAM,kCAAkC,CAAC;AA2B1C,eAAO,MAAM,qBAAqB,EAAE,gBAiHnC,CAAC;AAEF,6DAA6D;AAC7D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,EAC9C,SAAS,EAAE,OAAO,CAAC,oBAAoB,EAAE,KAAK,CAAC,EAC/C,IAAI,EAAE;IAAE,WAAW,EAAE,iBAAiB,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"compactWriteRoutes.d.ts","sourceRoot":"","sources":["../../src/handlers/compactWriteRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,gBAAgB,EACrB,eAAe,EAChB,MAAM,kCAAkC,CAAC;AA2B1C,eAAO,MAAM,qBAAqB,EAAE,gBAiHnC,CAAC;AAEF,6DAA6D;AAC7D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,EAC9C,SAAS,EAAE,OAAO,CAAC,oBAAoB,EAAE,KAAK,CAAC,EAC/C,IAAI,EAAE;IAAE,WAAW,CAAC,EAAE,iBAAiB,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClE,OAAO,CAAC,OAAO,CAAC,CAElB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compactWriteRoutes.js","sourceRoot":"","sources":["../../src/handlers/compact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Y,EAAE;QACZ,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,OAAO,EAAE;QACP,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,SAAS,EAAE;QACT,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,eAAe,EAAE;QACf,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,mBAAmB,EAAE;QACnB,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,uBAAuB,EAAE;QACvB,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,kBAAkB,EAAE;QAClB,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,uEAAuE;IACvE,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE,EAAE;CACjB,CAAC;AAEF,6DAA6D;AACtD,KAAK,UAAU,iBAAiB,CACrC,OAA8C,EAC9C,SAA+C,EAC/C,
|
|
1
|
+
{"version":3,"file":"compactWriteRoutes.js","sourceRoot":"","sources":["../../src/handlers/compactWriteRoutes.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAyJH,8CAMC;AAzJD,qEAI0C;AAC1C,4DAI0C;AAE1C;;;;GAIG;AACH,MAAM,MAAM,GAAG,wBAA6C,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,GAAG,6BAAkD,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,GAAG,wBAA6C,CAAC;AAEhD,QAAA,qBAAqB,GAAqB;IACrD,OAAO,EAAE;QACP,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,YAAY,EAAE;QACZ,MAAM;QACN,MAAM;QACN,MAAM,EAAE,MAAM;KACf;IACD,SAA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;QACN,MAAM,EAAE,MAAM;KACf;IACD,uEAAuE;IACvE,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE,EAAE;CACjB,CAAC;AAEF,6DAA6D;AACtD,KAAK,UAAU,iBAAiB,CACrC,OAA8C,EAC9C,SAA+C,EAC/C,IAAmE;IAEnE,OAAO,IAAA,gCAAe,EAAC,OAAO,EAAE,6BAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type CompactObjectType } from '@mcp-abap-adt/lib/compact-shared';
|
|
3
|
-
import type { HandlerContext } from '@mcp-abap-adt/lib/handlers';
|
|
1
|
+
import { type HandlerContext } from '@mcp-abap-adt/lib/handlers';
|
|
4
2
|
export declare const TOOL_DEFINITION: {
|
|
5
|
-
readonly
|
|
6
|
-
readonly available_in: readonly ["onprem", "cloud"];
|
|
7
|
-
readonly description: "Activates the object named by object_name and object_type (or object_adt_type), or the objects named by objects, in one request. Single form (object_name*, object_type or object_adt_type*): object_type is enough for CLASS, PROGRAM [onprem only], INTERFACE, FUNCTION_GROUP, TABLE, STRUCTURE, DDL, DOMAIN, DATA_ELEMENT, BEHAVIOR_DEFINITION, METADATA_EXTENSION, PACKAGE, SERVICE_DEFINITION and SERVICE_BINDING; any other type takes object_adt_type (e.g. \"CLAS/OC\"). List form (objects[].name*, objects[].type*, objects[].parentName, objects[].uri); a function module is listed with objects[].parentName set to its function group, type FUGR/FF. One object of CLASS, PROGRAM, INTERFACE, FUNCTION_GROUP, TABLE, STRUCTURE, DDL, DOMAIN, DATA_ELEMENT, BEHAVIOR_DEFINITION or METADATA_EXTENSION (by object_type or its ADT type code) is activated directly and answers the activation verdict. Every other call starts an activation run and answers { run_id }: the id of the accepted run, whose status and messages are read by that id.";
|
|
3
|
+
readonly description: string;
|
|
8
4
|
readonly inputSchema: {
|
|
9
5
|
readonly type: "object";
|
|
10
6
|
readonly properties: {
|
|
11
7
|
readonly object_type: {
|
|
12
|
-
readonly description: "ABAP object type for routed compact operation. Names the object's type in the single form.";
|
|
13
8
|
readonly type: "string";
|
|
14
|
-
readonly enum:
|
|
9
|
+
readonly enum: readonly ["CLASS", "PROGRAM", "INTERFACE", "FUNCTION_GROUP", "TABLE", "STRUCTURE", "DDL", "DOMAIN", "DATA_ELEMENT", "BEHAVIOR_DEFINITION", "METADATA_EXTENSION", "PACKAGE", "SERVICE_DEFINITION", "SERVICE_BINDING", "FUNCTION_MODULE", "BEHAVIOR_IMPLEMENTATION"] | readonly ["CLASS", "INTERFACE", "FUNCTION_GROUP", "TABLE", "STRUCTURE", "DDL", "DOMAIN", "DATA_ELEMENT", "BEHAVIOR_DEFINITION", "METADATA_EXTENSION", "PACKAGE", "SERVICE_DEFINITION", "SERVICE_BINDING", "FUNCTION_MODULE", "BEHAVIOR_IMPLEMENTATION"];
|
|
10
|
+
readonly description: string;
|
|
15
11
|
};
|
|
16
12
|
readonly object_name: {
|
|
17
13
|
readonly type: "string";
|
|
18
|
-
readonly description: "Object name (single form).";
|
|
14
|
+
readonly description: "Object name (single form). A function module is named GROUP|MODULE, its function group first, or the module alone with function_group_name.";
|
|
15
|
+
};
|
|
16
|
+
readonly function_group_name: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly description: "A function module's function group (single form, FUNCTION_MODULE).";
|
|
19
19
|
};
|
|
20
20
|
readonly object_adt_type: {
|
|
21
21
|
readonly type: "string";
|
|
22
22
|
readonly description: "ADT object type code (e.g. CLAS/OC, PROG/P) of the object (single form).";
|
|
23
23
|
};
|
|
24
|
+
readonly parentName: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly description: `With object_adt_type (single form): ${string}`;
|
|
27
|
+
};
|
|
24
28
|
readonly objects: {
|
|
25
29
|
readonly type: "array";
|
|
26
30
|
readonly description: "The objects activated together (list form).";
|
|
@@ -41,7 +45,7 @@ export declare const TOOL_DEFINITION: {
|
|
|
41
45
|
};
|
|
42
46
|
readonly parentName: {
|
|
43
47
|
readonly type: "string";
|
|
44
|
-
readonly description:
|
|
48
|
+
readonly description: string;
|
|
45
49
|
};
|
|
46
50
|
};
|
|
47
51
|
readonly required: readonly ["name", "type"];
|
|
@@ -53,12 +57,133 @@ export declare const TOOL_DEFINITION: {
|
|
|
53
57
|
};
|
|
54
58
|
};
|
|
55
59
|
};
|
|
60
|
+
readonly variants: {
|
|
61
|
+
readonly onprem: import("../../../dist/lib/variantDefinition").StatedOnVariant<{
|
|
62
|
+
readonly type: "object";
|
|
63
|
+
readonly properties: {
|
|
64
|
+
readonly object_type: {
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly enum: readonly ["CLASS", "PROGRAM", "INTERFACE", "FUNCTION_GROUP", "TABLE", "STRUCTURE", "DDL", "DOMAIN", "DATA_ELEMENT", "BEHAVIOR_DEFINITION", "METADATA_EXTENSION", "PACKAGE", "SERVICE_DEFINITION", "SERVICE_BINDING", "FUNCTION_MODULE", "BEHAVIOR_IMPLEMENTATION"] | readonly ["CLASS", "INTERFACE", "FUNCTION_GROUP", "TABLE", "STRUCTURE", "DDL", "DOMAIN", "DATA_ELEMENT", "BEHAVIOR_DEFINITION", "METADATA_EXTENSION", "PACKAGE", "SERVICE_DEFINITION", "SERVICE_BINDING", "FUNCTION_MODULE", "BEHAVIOR_IMPLEMENTATION"];
|
|
67
|
+
readonly description: string;
|
|
68
|
+
};
|
|
69
|
+
readonly object_name: {
|
|
70
|
+
readonly type: "string";
|
|
71
|
+
readonly description: "Object name (single form). A function module is named GROUP|MODULE, its function group first, or the module alone with function_group_name.";
|
|
72
|
+
};
|
|
73
|
+
readonly function_group_name: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly description: "A function module's function group (single form, FUNCTION_MODULE).";
|
|
76
|
+
};
|
|
77
|
+
readonly object_adt_type: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly description: "ADT object type code (e.g. CLAS/OC, PROG/P) of the object (single form).";
|
|
80
|
+
};
|
|
81
|
+
readonly parentName: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly description: `With object_adt_type (single form): ${string}`;
|
|
84
|
+
};
|
|
85
|
+
readonly objects: {
|
|
86
|
+
readonly type: "array";
|
|
87
|
+
readonly description: "The objects activated together (list form).";
|
|
88
|
+
readonly items: {
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly properties: {
|
|
91
|
+
readonly name: {
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly description: "Object name.";
|
|
94
|
+
};
|
|
95
|
+
readonly type: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly description: "ADT object type code.";
|
|
98
|
+
};
|
|
99
|
+
readonly uri: {
|
|
100
|
+
readonly type: "string";
|
|
101
|
+
readonly description: "Optional ADT object URI.";
|
|
102
|
+
};
|
|
103
|
+
readonly parentName: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
readonly description: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly required: readonly ["name", "type"];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly preaudit: {
|
|
112
|
+
readonly type: "boolean";
|
|
113
|
+
readonly description: "Run pre-audit checks before activation.";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}>;
|
|
117
|
+
readonly cloud: import("../../../dist/lib/variantDefinition").StatedOnVariant<{
|
|
118
|
+
readonly type: "object";
|
|
119
|
+
readonly properties: {
|
|
120
|
+
readonly object_type: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly enum: readonly ["CLASS", "PROGRAM", "INTERFACE", "FUNCTION_GROUP", "TABLE", "STRUCTURE", "DDL", "DOMAIN", "DATA_ELEMENT", "BEHAVIOR_DEFINITION", "METADATA_EXTENSION", "PACKAGE", "SERVICE_DEFINITION", "SERVICE_BINDING", "FUNCTION_MODULE", "BEHAVIOR_IMPLEMENTATION"] | readonly ["CLASS", "INTERFACE", "FUNCTION_GROUP", "TABLE", "STRUCTURE", "DDL", "DOMAIN", "DATA_ELEMENT", "BEHAVIOR_DEFINITION", "METADATA_EXTENSION", "PACKAGE", "SERVICE_DEFINITION", "SERVICE_BINDING", "FUNCTION_MODULE", "BEHAVIOR_IMPLEMENTATION"];
|
|
123
|
+
readonly description: string;
|
|
124
|
+
};
|
|
125
|
+
readonly object_name: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly description: "Object name (single form). A function module is named GROUP|MODULE, its function group first, or the module alone with function_group_name.";
|
|
128
|
+
};
|
|
129
|
+
readonly function_group_name: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly description: "A function module's function group (single form, FUNCTION_MODULE).";
|
|
132
|
+
};
|
|
133
|
+
readonly object_adt_type: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly description: "ADT object type code (e.g. CLAS/OC, PROG/P) of the object (single form).";
|
|
136
|
+
};
|
|
137
|
+
readonly parentName: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
readonly description: `With object_adt_type (single form): ${string}`;
|
|
140
|
+
};
|
|
141
|
+
readonly objects: {
|
|
142
|
+
readonly type: "array";
|
|
143
|
+
readonly description: "The objects activated together (list form).";
|
|
144
|
+
readonly items: {
|
|
145
|
+
readonly type: "object";
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly name: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly description: "Object name.";
|
|
150
|
+
};
|
|
151
|
+
readonly type: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
readonly description: "ADT object type code.";
|
|
154
|
+
};
|
|
155
|
+
readonly uri: {
|
|
156
|
+
readonly type: "string";
|
|
157
|
+
readonly description: "Optional ADT object URI.";
|
|
158
|
+
};
|
|
159
|
+
readonly parentName: {
|
|
160
|
+
readonly type: "string";
|
|
161
|
+
readonly description: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly required: readonly ["name", "type"];
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly preaudit: {
|
|
168
|
+
readonly type: "boolean";
|
|
169
|
+
readonly description: "Run pre-audit checks before activation.";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
}>;
|
|
173
|
+
};
|
|
174
|
+
readonly name: "HandlerActivate";
|
|
175
|
+
readonly available_in: readonly ["onprem", "cloud"];
|
|
56
176
|
};
|
|
57
177
|
type HandlerActivateArgs = {
|
|
58
|
-
object_type?:
|
|
178
|
+
object_type?: string;
|
|
59
179
|
object_name?: string;
|
|
60
180
|
object_adt_type?: string;
|
|
61
|
-
|
|
181
|
+
parentName?: string;
|
|
182
|
+
function_group_name?: string;
|
|
183
|
+
objects?: Array<{
|
|
184
|
+
name: string;
|
|
185
|
+
type: string;
|
|
186
|
+
parentName?: string;
|
|
62
187
|
uri?: string;
|
|
63
188
|
}>;
|
|
64
189
|
preaudit?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleHandlerActivate.d.ts","sourceRoot":"","sources":["../../src/handlers/handleHandlerActivate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handleHandlerActivate.d.ts","sourceRoot":"","sources":["../../src/handlers/handleHandlerActivate.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,4BAA4B,CAAC;AAqC5E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOlB,CAAC;AAEX,KAAK,mBAAmB,GAAG;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,mBAAmB;;;;;;GA4D1B"}
|
|
@@ -3,67 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TOOL_DEFINITION = void 0;
|
|
4
4
|
exports.handleHandlerActivate = handleHandlerActivate;
|
|
5
5
|
const compact_shared_1 = require("@mcp-abap-adt/lib/compact-shared");
|
|
6
|
+
const handlers_1 = require("@mcp-abap-adt/lib/handlers");
|
|
6
7
|
const write_1 = require("@mcp-abap-adt/lib/handlers/write");
|
|
8
|
+
const utils_1 = require("@mcp-abap-adt/lib/utils");
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* A function module is activated in a group activation addressed under its
|
|
11
|
+
* function group (`FUGR/FF` with the group as `parentName`): the group comes
|
|
12
|
+
* from `object_name` as `GROUP|MODULE` or from `function_group_name`, as
|
|
13
|
+
* HandlerGet takes a function module. Without it the call is refused before
|
|
14
|
+
* anything is sent — a group activation named only by the module addresses a
|
|
15
|
+
* group of the module's name, which SAP answers about an object nobody meant.
|
|
16
|
+
* Both may be given when they name the same group.
|
|
13
17
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* exactly the sentence the map entry contradicted.
|
|
29
|
-
*
|
|
30
|
-
* So the translation stops here and the refusal says what does work. What
|
|
31
|
-
* that is was established by CALLING the builder the activation path uses —
|
|
32
|
-
* `utils/activationUtils.buildObjectUri` — rather than by reading a function
|
|
33
|
-
* of the same name in `whereUsed.js`, which is a different one with a
|
|
34
|
-
* different convention and cost this file two wrong recommendations:
|
|
35
|
-
*
|
|
36
|
-
* name 'ZAC_FGR01|Z_AC_FM01' → groups/zac_fgr01%7cz_ac_fm01/
|
|
37
|
-
* fmodules/zac_fgr01%7cz_ac_fm01
|
|
38
|
-
* name 'Z_AC_FM01', parentName 'ZAC_FGR01' → groups/zac_fgr01/
|
|
39
|
-
* fmodules/z_ac_fm01
|
|
40
|
-
* name 'Z_AC_FM01' alone → groups/z_ac_fm01/fmodules/z_ac_fm01
|
|
41
|
-
*
|
|
42
|
-
* The middle one is the address. The last is the failure this refusal exists
|
|
43
|
-
* to prevent, and note that it does not throw: a group named after the module
|
|
44
|
-
* is a request SAP answers, about an object nobody meant.
|
|
45
|
-
*/
|
|
46
|
-
const NEEDS_MORE_THAN_A_NAME = {
|
|
47
|
-
FUNCTION_MODULE: 'a function module is addressed under its function group, which this form does not take — use objects[] with objects[].parentName set to the group (name stays the module, type FUGR/FF)',
|
|
48
|
-
};
|
|
49
|
-
/** What `object_type` alone can be activated as, or undefined. */
|
|
50
|
-
function adtTypeFor(type) {
|
|
51
|
-
if (!type)
|
|
52
|
-
return undefined;
|
|
53
|
-
const friendly = type.toLowerCase();
|
|
54
|
-
if (write_1.TYPE_TO_FAMILY[friendly])
|
|
55
|
-
return friendly;
|
|
56
|
-
return ADT_TYPE_BY_COMPACT_TYPE[type];
|
|
57
|
-
}
|
|
58
|
-
/** The types a caller may name without reaching for `object_adt_type`. */
|
|
59
|
-
function knownCompactTypes() {
|
|
60
|
-
return compact_shared_1.COMPACT_OBJECT_TYPES.filter((type) => adtTypeFor(type) !== undefined);
|
|
18
|
+
function functionModuleReference(objectName, functionGroupName) {
|
|
19
|
+
const separate = (functionGroupName ?? '').trim().toUpperCase();
|
|
20
|
+
const segments = objectName.split('|');
|
|
21
|
+
const named = segments.length > 1;
|
|
22
|
+
const [first = '', second = ''] = named ? segments : ['', objectName];
|
|
23
|
+
const group = named ? first.trim().toUpperCase() : separate;
|
|
24
|
+
const module = second.trim().toUpperCase();
|
|
25
|
+
if (segments.length > 2 || !group || !module) {
|
|
26
|
+
return 'FUNCTION_MODULE is named GROUP|MODULE in object_name, or with function_group_name: the function group and the module are both required; nothing was sent';
|
|
27
|
+
}
|
|
28
|
+
if (named && separate && separate !== group) {
|
|
29
|
+
return `object_name names group ${group}, function_group_name names ${separate}: give the group once; nothing was sent`;
|
|
30
|
+
}
|
|
31
|
+
return { name: module, parentName: group };
|
|
61
32
|
}
|
|
62
33
|
exports.TOOL_DEFINITION = {
|
|
63
34
|
name: 'HandlerActivate',
|
|
64
35
|
available_in: ['onprem', 'cloud'],
|
|
65
|
-
|
|
66
|
-
|
|
36
|
+
...(0, compact_shared_1.byVariant)((variant) => ({
|
|
37
|
+
description: (0, compact_shared_1.compactActivateDescription)(variant),
|
|
38
|
+
inputSchema: (0, compact_shared_1.compactActivateSchemaFor)(compact_shared_1.COMPACT_ACTIVATE[variant], variant),
|
|
39
|
+
})),
|
|
67
40
|
};
|
|
68
41
|
async function handleHandlerActivate(context, args) {
|
|
69
42
|
if (args.objects && args.objects.length > 0) {
|
|
@@ -72,41 +45,46 @@ async function handleHandlerActivate(context, args) {
|
|
|
72
45
|
preaudit: args.preaudit,
|
|
73
46
|
});
|
|
74
47
|
}
|
|
75
|
-
// `handleActivateObject`'s own type map accepts a lowercase friendly name
|
|
76
|
-
// alongside the raw ADT code — 'program' next to 'prog/p' — and every one
|
|
77
|
-
// of those names is a `CompactObjectType.toLowerCase()`, because both were
|
|
78
|
-
// named from the same object list. So `object_type` is enough for the types
|
|
79
|
-
// that map names.
|
|
80
|
-
//
|
|
81
|
-
// **It is not enough for the rest, and handing them on lowercased was
|
|
82
|
-
// wrong.** The schema admits 25 object types and the map knows eleven
|
|
83
|
-
// names; a `PACKAGE` lowercased to `package` is not an ADT type code, and
|
|
84
|
-
// it reached the group-activation request as though it were. That is a
|
|
85
|
-
// malformed request answered by SAP rather than an argument refused here,
|
|
86
|
-
// and it is worse than the inconvenience it replaced — before, a caller
|
|
87
|
-
// had to pass `object_adt_type` and therefore passed a code that worked.
|
|
88
|
-
//
|
|
89
|
-
// So: a friendly name the map knows goes through as before; a type this
|
|
90
|
-
// repository has a MEASURED code for is translated; anything else is
|
|
91
|
-
// refused, naming the field that settles it. Nothing is guessed — a code
|
|
92
|
-
// invented here would be the same malformed request with more ceremony.
|
|
93
48
|
if (!args.object_name) {
|
|
94
49
|
throw new Error('Provide either objects[] or object_name + (object_type or object_adt_type) for activation');
|
|
95
50
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
51
|
+
// An ADT type code given as such is the list form's one object, with the
|
|
52
|
+
// parent the caller named, checked at that boundary (`objects[].type`,
|
|
53
|
+
// `objects[].parentName`).
|
|
54
|
+
if (args.object_adt_type) {
|
|
55
|
+
return (0, write_1.handleActivateObjectOnce)(context, {
|
|
56
|
+
objects: [
|
|
57
|
+
{
|
|
58
|
+
name: args.object_name,
|
|
59
|
+
type: args.object_adt_type,
|
|
60
|
+
...(args.parentName ? { parentName: args.parentName } : {}),
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
preaudit: args.preaudit,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (!args.object_type) {
|
|
67
|
+
throw new Error('Provide either objects[] or object_name + (object_type or object_adt_type) for activation');
|
|
68
|
+
}
|
|
69
|
+
// The boundary of object_type: one of the names the declared variant's
|
|
70
|
+
// table activates (`COMPACT_ACTIVATE`), each with its code
|
|
71
|
+
// (`COMPACT_ACTIVATE_ROUTES`). Its code goes on as the list form's one
|
|
72
|
+
// object (`activationPlan`): one object of a type its own API activates
|
|
73
|
+
// directly through that API, every other one in a group activation typed
|
|
74
|
+
// by the declared variant.
|
|
75
|
+
const variant = (0, handlers_1.variantOf)(context.connection);
|
|
76
|
+
const member = (0, compact_shared_1.acceptedOf)(args.object_type, compact_shared_1.COMPACT_ACTIVATE[variant]);
|
|
77
|
+
if (member === undefined) {
|
|
78
|
+
throw new Error(`HandlerActivate cannot turn object_type "${args.object_type}" into an ADT type code — pass object_adt_type instead (e.g. "CLAS/OC"). Known without it: ${(0, write_1.compactActivatableTypes)(context.connection).join(', ')}.`);
|
|
106
79
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
80
|
+
const reference = member === 'FUNCTION_MODULE'
|
|
81
|
+
? functionModuleReference(args.object_name, args.function_group_name)
|
|
82
|
+
: { name: args.object_name.toUpperCase() };
|
|
83
|
+
if (typeof reference === 'string')
|
|
84
|
+
return (0, utils_1.return_error)(reference);
|
|
85
|
+
const plan = (0, write_1.activationPlan)([{ ...reference, type: compact_shared_1.COMPACT_ACTIVATE_ROUTES[member] }], variant);
|
|
86
|
+
if (typeof plan === 'string')
|
|
87
|
+
return (0, utils_1.return_error)(plan);
|
|
88
|
+
return (0, write_1.activatePlanOnce)(context, plan, args.preaudit);
|
|
111
89
|
}
|
|
112
90
|
//# sourceMappingURL=handleHandlerActivate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleHandlerActivate.js","sourceRoot":"","sources":["../../src/handlers/handleHandlerActivate.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"handleHandlerActivate.js","sourceRoot":"","sources":["../../src/handlers/handleHandlerActivate.ts"],"names":[],"mappings":";;;AAsEA,sDA8DC;AApID,qEAQ0C;AAC1C,yDAA4E;AAC5E,4DAK0C;AAC1C,mDAAuD;AAEvD;;;;;;;;GAQG;AACH,SAAS,uBAAuB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