@mcp-abap-adt/compact-modify 14.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.
Files changed (52) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +17 -0
  3. package/README.md +32 -0
  4. package/dist/group.d.ts +30 -0
  5. package/dist/group.d.ts.map +1 -0
  6. package/dist/group.js +87 -0
  7. package/dist/group.js.map +1 -0
  8. package/dist/handlers/compactWriteRoutes.d.ts +16 -0
  9. package/dist/handlers/compactWriteRoutes.d.ts.map +1 -0
  10. package/dist/handlers/compactWriteRoutes.js +131 -0
  11. package/dist/handlers/compactWriteRoutes.js.map +1 -0
  12. package/dist/handlers/handleHandlerActivate.d.ts +74 -0
  13. package/dist/handlers/handleHandlerActivate.d.ts.map +1 -0
  14. package/dist/handlers/handleHandlerActivate.js +112 -0
  15. package/dist/handlers/handleHandlerActivate.js.map +1 -0
  16. package/dist/handlers/handleHandlerCreate.d.ts +227 -0
  17. package/dist/handlers/handleHandlerCreate.d.ts.map +1 -0
  18. package/dist/handlers/handleHandlerCreate.js +16 -0
  19. package/dist/handlers/handleHandlerCreate.js.map +1 -0
  20. package/dist/handlers/handleHandlerDelete.d.ts +92 -0
  21. package/dist/handlers/handleHandlerDelete.d.ts.map +1 -0
  22. package/dist/handlers/handleHandlerDelete.js +16 -0
  23. package/dist/handlers/handleHandlerDelete.js.map +1 -0
  24. package/dist/handlers/handleHandlerLock.d.ts +68 -0
  25. package/dist/handlers/handleHandlerLock.d.ts.map +1 -0
  26. package/dist/handlers/handleHandlerLock.js +26 -0
  27. package/dist/handlers/handleHandlerLock.js.map +1 -0
  28. package/dist/handlers/handleHandlerProfileRun.d.ts +115 -0
  29. package/dist/handlers/handleHandlerProfileRun.d.ts.map +1 -0
  30. package/dist/handlers/handleHandlerProfileRun.js +70 -0
  31. package/dist/handlers/handleHandlerProfileRun.js.map +1 -0
  32. package/dist/handlers/handleHandlerTransportCreate.d.ts +45 -0
  33. package/dist/handlers/handleHandlerTransportCreate.d.ts.map +1 -0
  34. package/dist/handlers/handleHandlerTransportCreate.js +16 -0
  35. package/dist/handlers/handleHandlerTransportCreate.js.map +1 -0
  36. package/dist/handlers/handleHandlerUnitTestRun.d.ts +124 -0
  37. package/dist/handlers/handleHandlerUnitTestRun.d.ts.map +1 -0
  38. package/dist/handlers/handleHandlerUnitTestRun.js +16 -0
  39. package/dist/handlers/handleHandlerUnitTestRun.js.map +1 -0
  40. package/dist/handlers/handleHandlerUnlock.d.ts +68 -0
  41. package/dist/handlers/handleHandlerUnlock.d.ts.map +1 -0
  42. package/dist/handlers/handleHandlerUnlock.js +26 -0
  43. package/dist/handlers/handleHandlerUnlock.js.map +1 -0
  44. package/dist/handlers/handleHandlerUpdate.d.ts +196 -0
  45. package/dist/handlers/handleHandlerUpdate.d.ts.map +1 -0
  46. package/dist/handlers/handleHandlerUpdate.js +16 -0
  47. package/dist/handlers/handleHandlerUpdate.js.map +1 -0
  48. package/dist/index.d.ts +15 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +20 -0
  51. package/dist/index.js.map +1 -0
  52. package/package.json +60 -0
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_DEFINITION = void 0;
4
+ exports.handleHandlerActivate = handleHandlerActivate;
5
+ const compact_shared_1 = require("@mcp-abap-adt/lib/compact-shared");
6
+ const write_1 = require("@mcp-abap-adt/lib/handlers/write");
7
+ /**
8
+ * ADT type codes for compact types the activation map does not name, taken
9
+ * from documents this repository has actually seen — `DEVC/K` in twenty
10
+ * corpus documents, `SRVD/SRV`, `SRVB/SVB` and `FUGR/FF` in its handlers and
11
+ * captures. A code nobody here has observed is not added: the point of
12
+ * refusing is that a guess reaches SAP looking exactly like knowledge.
13
+ */
14
+ const ADT_TYPE_BY_COMPACT_TYPE = {
15
+ PACKAGE: 'DEVC/K',
16
+ SERVICE_DEFINITION: 'SRVD/SRV',
17
+ SERVICE_BINDING: 'SRVB/SVB',
18
+ };
19
+ /**
20
+ * **`FUNCTION_MODULE` is deliberately absent, and a code is not what it
21
+ * lacks.** `FUGR/FF` is the right type, and it was in the table above until
22
+ * this note replaced it — but a function module's ADT address is built under
23
+ * its function GROUP, and the single-object form carries one name. Given only
24
+ * the module's, the group activation addresses a group by that name: a
25
+ * request for an object that does not exist, sent confidently.
26
+ * `handleActivateObject` says the same thing in its own module comment —
27
+ * *"`FUGR/FF` needs a group name this array does not carry"* — which is
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 the batch form with objects[].parentName set to the group (name stays the module, type FUGR/FF), or ActivateFunctionModuleLow, which takes the group as its own argument',
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);
61
+ }
62
+ exports.TOOL_DEFINITION = {
63
+ name: 'HandlerActivate',
64
+ available_in: ['onprem', 'cloud'],
65
+ description: 'Activate operation. Single mode(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 needs object_adt_type (e.g. "CLAS/OC"). FUNCTION_MODULE needs the batch mode with objects[].parentName set to its function group, because a module is addressed under the group. Batch mode(objects[].name*, objects[].type*, objects[].parentName, objects[].uri).',
66
+ inputSchema: compact_shared_1.compactActivateSchema,
67
+ };
68
+ async function handleHandlerActivate(context, args) {
69
+ if (args.objects && args.objects.length > 0) {
70
+ return (0, write_1.handleActivateObject)(context, {
71
+ objects: args.objects,
72
+ preaudit: args.preaudit,
73
+ });
74
+ }
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
+ if (!args.object_name) {
94
+ throw new Error('Provide either objects[] or object_name + (object_type or object_adt_type) for activation');
95
+ }
96
+ const singleType = args.object_adt_type ?? adtTypeFor(args.object_type);
97
+ if (!singleType) {
98
+ const why = args.object_type
99
+ ? NEEDS_MORE_THAN_A_NAME[args.object_type]
100
+ : undefined;
101
+ throw new Error(why
102
+ ? `HandlerActivate cannot activate ${args.object_type} from a name alone: ${why}.`
103
+ : args.object_type
104
+ ? `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: ${knownCompactTypes().join(', ')}.`
105
+ : 'Provide either objects[] or object_name + (object_type or object_adt_type) for activation');
106
+ }
107
+ return (0, write_1.handleActivateObject)(context, {
108
+ objects: [{ name: args.object_name, type: singleType }],
109
+ preaudit: args.preaudit,
110
+ });
111
+ }
112
+ //# sourceMappingURL=handleHandlerActivate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerActivate.js","sourceRoot":"","sources":["../../src/handlers/handleHandlerActivate.ts"],"names":[],"mappings":";;;AAsFA,sDAsDC;AA3ID,qEAI0C;AAE1C,4DAG0C;AAE1C;;;;;;GAMG;AACH,MAAM,wBAAwB,GAA+C;IAC3E,OAAO,EAAE,QAAQ;IACjB,kBAAkB,EAAE,UAAU;IAC9B,eAAe,EAAE,UAAU;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,sBAAsB,GAA+C;IACzE,eAAe,EACb,uQAAuQ;CAC1Q,CAAC;AAEF,kEAAkE;AAClE,SAAS,UAAU,CAAC,IAAmC;IACrD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACpC,IAAI,sBAAc,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC9C,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,0EAA0E;AAC1E,SAAS,iBAAiB;IACxB,OAAO,qCAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC;AAC/E,CAAC;AAEY,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,8jBAA8jB;IAChkB,WAAW,EAAE,sCAAqB;CAC1B,CAAC;AAUJ,KAAK,UAAU,qBAAqB,CACzC,OAAuB,EACvB,IAAyB;IAEzB,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAA,4BAAoB,EAAC,OAAO,EAAE;YACnC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,CAAC;IAED,0EAA0E;IAC1E,0EAA0E;IAC1E,2EAA2E;IAC3E,4EAA4E;IAC5E,kBAAkB;IAClB,EAAE;IACF,sEAAsE;IACtE,sEAAsE;IACtE,0EAA0E;IAC1E,uEAAuE;IACvE,0EAA0E;IAC1E,wEAAwE;IACxE,yEAAyE;IACzE,EAAE;IACF,wEAAwE;IACxE,qEAAqE;IACrE,yEAAyE;IACzE,wEAAwE;IACxE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAExE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW;YAC1B,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC;YAC1C,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,IAAI,KAAK,CACb,GAAG;YACD,CAAC,CAAC,mCAAmC,IAAI,CAAC,WAAW,uBAAuB,GAAG,GAAG;YAClF,CAAC,CAAC,IAAI,CAAC,WAAW;gBAChB,CAAC,CAAC,4CAA4C,IAAI,CAAC,WAAW,8FAA8F,iBAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;gBAC7L,CAAC,CAAC,2FAA2F,CAClG,CAAC;IACJ,CAAC;IAED,OAAO,IAAA,4BAAoB,EAAC,OAAO,EAAE;QACnC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACvD,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,227 @@
1
+ import type { CompactObjectType } from '@mcp-abap-adt/lib/compact-shared';
2
+ import type { HandlerContext } from '@mcp-abap-adt/lib/handlers';
3
+ export declare const TOOL_DEFINITION: {
4
+ readonly name: "HandlerCreate";
5
+ readonly available_in: readonly ["onprem", "cloud"];
6
+ readonly description: "Create operation. object_type required: PACKAGE(package_name*), DOMAIN(domain_name*), DATA_ELEMENT(data_element_name*), TABLE(table_name*), STRUCTURE(structure_name*), DDL(ddl_name*), SERVICE_DEFINITION(service_definition_name*), SERVICE_BINDING(service_binding_name*), CLASS(class_name*), PROGRAM(program_name*) [onprem only], INTERFACE(interface_name*), FUNCTION_GROUP(function_group_name*), FUNCTION_MODULE(function_module_name*, function_group_name*), BEHAVIOR_DEFINITION(name*, package_name*, root_entity*, implementation_type*), BEHAVIOR_IMPLEMENTATION(class_name*, behavior_definition*, package_name*), METADATA_EXTENSION(name*, package_name*), UNIT_TEST(tests*), CDS_UNIT_TEST(class_name*, package_name*, cds_view_name*).";
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly object_type: {
11
+ readonly type: "string";
12
+ readonly enum: import("../../../dist/lib/compact/compactObjectTypes").CompactObjectType[];
13
+ readonly description: "ABAP object type for routed compact operation.";
14
+ };
15
+ readonly class_name: {
16
+ readonly type: "string";
17
+ readonly description: "ABAP class name.";
18
+ };
19
+ readonly program_name: {
20
+ readonly type: "string";
21
+ readonly description: "ABAP program name.";
22
+ };
23
+ readonly domain_name: {
24
+ readonly type: "string";
25
+ readonly description: "ABAP domain name.";
26
+ };
27
+ readonly function_module_name: {
28
+ readonly type: "string";
29
+ readonly description: "ABAP function module name.";
30
+ };
31
+ readonly function_group_name: {
32
+ readonly type: "string";
33
+ readonly description: "ABAP function group name.";
34
+ };
35
+ readonly package_name: {
36
+ readonly type: "string";
37
+ readonly description: "ABAP package name.";
38
+ };
39
+ readonly ddl_name: {
40
+ readonly type: "string";
41
+ readonly description: "DDL source name (CDS view, AMDP table function, etc.).";
42
+ };
43
+ readonly description: {
44
+ readonly type: "string";
45
+ readonly description: "Human-readable object description.";
46
+ };
47
+ readonly transport_request: {
48
+ readonly type: "string";
49
+ readonly description: "Transport request id (if required by system).";
50
+ };
51
+ readonly activate: {
52
+ readonly type: "boolean";
53
+ readonly description: "Activate object after create.";
54
+ };
55
+ readonly program_type: {
56
+ readonly type: "string";
57
+ readonly description: "ABAP program type.";
58
+ };
59
+ readonly application: {
60
+ readonly type: "string";
61
+ readonly description: "Domain application area.";
62
+ };
63
+ readonly datatype: {
64
+ readonly type: "string";
65
+ readonly description: "ABAP data type.";
66
+ };
67
+ readonly length: {
68
+ readonly type: "number";
69
+ readonly description: "Length for typed artifacts.";
70
+ };
71
+ readonly decimals: {
72
+ readonly type: "number";
73
+ readonly description: "Decimal places.";
74
+ };
75
+ readonly conversion_exit: {
76
+ readonly type: "string";
77
+ readonly description: "Conversion exit name.";
78
+ };
79
+ readonly lowercase: {
80
+ readonly type: "boolean";
81
+ readonly description: "Allow lowercase values (domain setting).";
82
+ };
83
+ readonly sign_exists: {
84
+ readonly type: "boolean";
85
+ readonly description: "Allow signed values (domain setting).";
86
+ };
87
+ readonly value_table: {
88
+ readonly type: "string";
89
+ readonly description: "Foreign key value table.";
90
+ };
91
+ readonly fixed_values: {
92
+ readonly type: "array";
93
+ readonly description: "Domain fixed values list.";
94
+ readonly items: {
95
+ readonly type: "object";
96
+ readonly properties: {
97
+ readonly low: {
98
+ readonly type: "string";
99
+ readonly description: "Fixed value key.";
100
+ };
101
+ readonly text: {
102
+ readonly type: "string";
103
+ readonly description: "Fixed value text.";
104
+ };
105
+ };
106
+ readonly required: readonly ["low", "text"];
107
+ };
108
+ };
109
+ readonly table_name: {
110
+ readonly type: "string";
111
+ readonly description: "Table name.";
112
+ };
113
+ readonly structure_name: {
114
+ readonly type: "string";
115
+ readonly description: "Structure name.";
116
+ };
117
+ readonly data_element_name: {
118
+ readonly type: "string";
119
+ readonly description: "Data element name.";
120
+ };
121
+ readonly interface_name: {
122
+ readonly type: "string";
123
+ readonly description: "Interface name.";
124
+ };
125
+ readonly service_definition_name: {
126
+ readonly type: "string";
127
+ readonly description: "Service definition name.";
128
+ };
129
+ readonly service_binding_name: {
130
+ readonly type: "string";
131
+ readonly description: "Service binding name.";
132
+ };
133
+ readonly name: {
134
+ readonly type: "string";
135
+ readonly description: "Object name for handlers that require a generic `name` (behavior definition, metadata extension).";
136
+ };
137
+ readonly root_entity: {
138
+ readonly type: "string";
139
+ readonly description: "Root CDS entity name (behavior definition create).";
140
+ };
141
+ readonly implementation_type: {
142
+ readonly type: "string";
143
+ readonly enum: readonly ["Managed", "Unmanaged", "Abstract", "Projection"];
144
+ readonly description: "Behavior definition implementation type.";
145
+ };
146
+ readonly behavior_definition: {
147
+ readonly type: "string";
148
+ readonly description: "Referenced behavior definition name (behavior implementation create).";
149
+ };
150
+ readonly cds_view_name: {
151
+ readonly type: "string";
152
+ readonly description: "CDS view name to validate for unit test doubles.";
153
+ };
154
+ readonly fields: {
155
+ readonly type: "array";
156
+ readonly description: "Structure fields (for STRUCTURE create).";
157
+ readonly items: {
158
+ readonly type: "object";
159
+ readonly properties: {
160
+ readonly name: {
161
+ readonly type: "string";
162
+ readonly description: "Field name.";
163
+ };
164
+ readonly data_type: {
165
+ readonly type: "string";
166
+ readonly description: "Field data type.";
167
+ };
168
+ readonly length: {
169
+ readonly type: "number";
170
+ readonly description: "Field length.";
171
+ };
172
+ readonly decimals: {
173
+ readonly type: "number";
174
+ readonly description: "Decimal places.";
175
+ };
176
+ readonly domain: {
177
+ readonly type: "string";
178
+ readonly description: "Domain reference.";
179
+ };
180
+ readonly data_element: {
181
+ readonly type: "string";
182
+ readonly description: "Data element reference.";
183
+ };
184
+ readonly structure_ref: {
185
+ readonly type: "string";
186
+ readonly description: "Included structure reference.";
187
+ };
188
+ readonly table_ref: {
189
+ readonly type: "string";
190
+ readonly description: "Table type reference.";
191
+ };
192
+ readonly description: {
193
+ readonly type: "string";
194
+ readonly description: "Field description.";
195
+ };
196
+ };
197
+ readonly required: readonly ["name"];
198
+ };
199
+ };
200
+ readonly tests: {
201
+ readonly type: "array";
202
+ readonly description: "Container/test class pairs (for UNIT_TEST create).";
203
+ readonly items: {
204
+ readonly type: "object";
205
+ readonly properties: {
206
+ readonly container_class: {
207
+ readonly type: "string";
208
+ readonly description: "Class that owns the test include.";
209
+ };
210
+ readonly test_class: {
211
+ readonly type: "string";
212
+ readonly description: "Test class inside the include.";
213
+ };
214
+ };
215
+ readonly required: readonly ["container_class", "test_class"];
216
+ };
217
+ };
218
+ };
219
+ readonly required: readonly ["object_type"];
220
+ };
221
+ };
222
+ type HandlerCreateArgs = {
223
+ object_type: CompactObjectType;
224
+ } & Record<string, unknown>;
225
+ export declare function handleHandlerCreate(context: HandlerContext, args: HandlerCreateArgs): Promise<unknown>;
226
+ export {};
227
+ //# sourceMappingURL=handleHandlerCreate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerCreate.d.ts","sourceRoot":"","sources":["../../src/handlers/handleHandlerCreate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC;AAEX,KAAK,iBAAiB,GAAG;IAAE,WAAW,EAAE,iBAAiB,CAAA;CAAE,GAAG,MAAM,CAClE,MAAM,EACN,OAAO,CACR,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,iBAAiB,oBAGxB"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_DEFINITION = void 0;
4
+ exports.handleHandlerCreate = handleHandlerCreate;
5
+ const compact_shared_1 = require("@mcp-abap-adt/lib/compact-shared");
6
+ const compactWriteRoutes_1 = require("./compactWriteRoutes");
7
+ exports.TOOL_DEFINITION = {
8
+ name: 'HandlerCreate',
9
+ available_in: ['onprem', 'cloud'],
10
+ description: 'Create operation. object_type required: PACKAGE(package_name*), DOMAIN(domain_name*), DATA_ELEMENT(data_element_name*), TABLE(table_name*), STRUCTURE(structure_name*), DDL(ddl_name*), SERVICE_DEFINITION(service_definition_name*), SERVICE_BINDING(service_binding_name*), CLASS(class_name*), PROGRAM(program_name*) [onprem only], INTERFACE(interface_name*), FUNCTION_GROUP(function_group_name*), FUNCTION_MODULE(function_module_name*, function_group_name*), BEHAVIOR_DEFINITION(name*, package_name*, root_entity*, implementation_type*), BEHAVIOR_IMPLEMENTATION(class_name*, behavior_definition*, package_name*), METADATA_EXTENSION(name*, package_name*), UNIT_TEST(tests*), CDS_UNIT_TEST(class_name*, package_name*, cds_view_name*).',
11
+ inputSchema: compact_shared_1.compactCreateSchema,
12
+ };
13
+ async function handleHandlerCreate(context, args) {
14
+ return (0, compactWriteRoutes_1.routeCompactWrite)(context, 'create', args);
15
+ }
16
+ //# sourceMappingURL=handleHandlerCreate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerCreate.js","sourceRoot":"","sources":["../../src/handlers/handleHandlerCreate.ts"],"names":[],"mappings":";;;AAkBA,kDAKC;AAtBD,qEAAuE;AAEvE,6DAAyD;AAE5C,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,eAAe;IACrB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,2tBAA2tB;IAC7tB,WAAW,EAAE,oCAAmB;CACxB,CAAC;AAOJ,KAAK,UAAU,mBAAmB,CACvC,OAAuB,EACvB,IAAuB;IAEvB,OAAO,IAAA,sCAAiB,EAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,92 @@
1
+ import type { CompactObjectType } from '@mcp-abap-adt/lib/compact-shared';
2
+ import type { HandlerContext } from '@mcp-abap-adt/lib/handlers';
3
+ export declare const TOOL_DEFINITION: {
4
+ readonly name: "HandlerDelete";
5
+ readonly available_in: readonly ["onprem", "cloud"];
6
+ readonly description: "Delete operation. object_type required: DOMAIN(domain_name*), DATA_ELEMENT(data_element_name*), TABLE(table_name*), STRUCTURE(structure_name*), DDL(ddl_name*), SERVICE_DEFINITION(service_definition_name*), SERVICE_BINDING(service_binding_name*), CLASS(class_name*), LOCAL_TEST_CLASS(class_name*), LOCAL_TYPES(class_name*), LOCAL_DEFINITIONS(class_name*), LOCAL_MACROS(class_name*), PROGRAM(program_name*) [onprem only], INTERFACE(interface_name*), FUNCTION_GROUP(function_group_name*), FUNCTION_MODULE(function_module_name*, function_group_name*), BEHAVIOR_DEFINITION(behavior_definition_name*), BEHAVIOR_IMPLEMENTATION(behavior_implementation_name*), METADATA_EXTENSION(metadata_extension_name*), UNIT_TEST(run_id*), CDS_UNIT_TEST(class_name*).";
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly object_type: {
11
+ readonly type: "string";
12
+ readonly enum: import("../../../dist/lib/compact/compactObjectTypes").CompactObjectType[];
13
+ readonly description: "ABAP object type for routed compact operation.";
14
+ };
15
+ readonly class_name: {
16
+ readonly type: "string";
17
+ readonly description: "ABAP class name.";
18
+ };
19
+ readonly program_name: {
20
+ readonly type: "string";
21
+ readonly description: "ABAP program name.";
22
+ };
23
+ readonly domain_name: {
24
+ readonly type: "string";
25
+ readonly description: "ABAP domain name.";
26
+ };
27
+ readonly function_module_name: {
28
+ readonly type: "string";
29
+ readonly description: "ABAP function module name.";
30
+ };
31
+ readonly function_group_name: {
32
+ readonly type: "string";
33
+ readonly description: "ABAP function group name.";
34
+ };
35
+ readonly ddl_name: {
36
+ readonly type: "string";
37
+ readonly description: "DDL source name (CDS view, AMDP table function, etc.).";
38
+ };
39
+ readonly transport_request: {
40
+ readonly type: "string";
41
+ readonly description: "Transport request id (if required by system).";
42
+ };
43
+ readonly table_name: {
44
+ readonly type: "string";
45
+ readonly description: "Table name.";
46
+ };
47
+ readonly structure_name: {
48
+ readonly type: "string";
49
+ readonly description: "Structure name.";
50
+ };
51
+ readonly data_element_name: {
52
+ readonly type: "string";
53
+ readonly description: "Data element name.";
54
+ };
55
+ readonly interface_name: {
56
+ readonly type: "string";
57
+ readonly description: "Interface name.";
58
+ };
59
+ readonly service_definition_name: {
60
+ readonly type: "string";
61
+ readonly description: "Service definition name.";
62
+ };
63
+ readonly service_binding_name: {
64
+ readonly type: "string";
65
+ readonly description: "Service binding name.";
66
+ };
67
+ readonly behavior_definition_name: {
68
+ readonly type: "string";
69
+ readonly description: "Behavior definition name.";
70
+ };
71
+ readonly behavior_implementation_name: {
72
+ readonly type: "string";
73
+ readonly description: "Behavior implementation name.";
74
+ };
75
+ readonly metadata_extension_name: {
76
+ readonly type: "string";
77
+ readonly description: "Metadata extension name.";
78
+ };
79
+ readonly run_id: {
80
+ readonly type: "string";
81
+ readonly description: "Unit test run id (UNIT_TEST delete).";
82
+ };
83
+ };
84
+ readonly required: readonly ["object_type"];
85
+ };
86
+ };
87
+ type HandlerDeleteArgs = {
88
+ object_type: CompactObjectType;
89
+ } & Record<string, unknown>;
90
+ export declare function handleHandlerDelete(context: HandlerContext, args: HandlerDeleteArgs): Promise<unknown>;
91
+ export {};
92
+ //# sourceMappingURL=handleHandlerDelete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerDelete.d.ts","sourceRoot":"","sources":["../../src/handlers/handleHandlerDelete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC;AAEX,KAAK,iBAAiB,GAAG;IAAE,WAAW,EAAE,iBAAiB,CAAA;CAAE,GAAG,MAAM,CAClE,MAAM,EACN,OAAO,CACR,CAAC;AAEF,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,iBAAiB,oBAGxB"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_DEFINITION = void 0;
4
+ exports.handleHandlerDelete = handleHandlerDelete;
5
+ const compact_shared_1 = require("@mcp-abap-adt/lib/compact-shared");
6
+ const compactWriteRoutes_1 = require("./compactWriteRoutes");
7
+ exports.TOOL_DEFINITION = {
8
+ name: 'HandlerDelete',
9
+ available_in: ['onprem', 'cloud'],
10
+ description: 'Delete operation. object_type required: DOMAIN(domain_name*), DATA_ELEMENT(data_element_name*), TABLE(table_name*), STRUCTURE(structure_name*), DDL(ddl_name*), SERVICE_DEFINITION(service_definition_name*), SERVICE_BINDING(service_binding_name*), CLASS(class_name*), LOCAL_TEST_CLASS(class_name*), LOCAL_TYPES(class_name*), LOCAL_DEFINITIONS(class_name*), LOCAL_MACROS(class_name*), PROGRAM(program_name*) [onprem only], INTERFACE(interface_name*), FUNCTION_GROUP(function_group_name*), FUNCTION_MODULE(function_module_name*, function_group_name*), BEHAVIOR_DEFINITION(behavior_definition_name*), BEHAVIOR_IMPLEMENTATION(behavior_implementation_name*), METADATA_EXTENSION(metadata_extension_name*), UNIT_TEST(run_id*), CDS_UNIT_TEST(class_name*).',
11
+ inputSchema: compact_shared_1.compactDeleteSchema,
12
+ };
13
+ async function handleHandlerDelete(context, args) {
14
+ return (0, compactWriteRoutes_1.routeCompactWrite)(context, 'delete', args);
15
+ }
16
+ //# sourceMappingURL=handleHandlerDelete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerDelete.js","sourceRoot":"","sources":["../../src/handlers/handleHandlerDelete.ts"],"names":[],"mappings":";;;AAkBA,kDAKC;AAtBD,qEAAuE;AAEvE,6DAAyD;AAE5C,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,eAAe;IACrB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,2uBAA2uB;IAC7uB,WAAW,EAAE,oCAAmB;CACxB,CAAC;AAOJ,KAAK,UAAU,mBAAmB,CACvC,OAAuB,EACvB,IAAuB;IAEvB,OAAO,IAAA,sCAAiB,EAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,68 @@
1
+ import type { CompactObjectType } from '@mcp-abap-adt/lib/compact-shared';
2
+ import type { HandlerContext } from '@mcp-abap-adt/lib/handlers';
3
+ export declare const TOOL_DEFINITION: {
4
+ readonly name: "HandlerLock";
5
+ readonly available_in: readonly ["onprem", "cloud"];
6
+ readonly description: "Lock operation. object_type required: CLASS(object_name*), PROGRAM(object_name*) [onprem only], INTERFACE(object_name*), FUNCTION_GROUP(object_name*), FUNCTION_MODULE(object_name*), TABLE(object_name*), STRUCTURE(object_name*), DDL(object_name*), DOMAIN(object_name*), DATA_ELEMENT(object_name*), PACKAGE(object_name*), BEHAVIOR_DEFINITION(object_name*), BEHAVIOR_IMPLEMENTATION(object_name*), METADATA_EXTENSION(object_name*).";
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly super_package: {
11
+ readonly type: "string";
12
+ readonly description: "Super package context when relevant.";
13
+ };
14
+ readonly session_id: {
15
+ readonly type: "string";
16
+ readonly description: "Optional ADT session id for stateful lock flow.";
17
+ };
18
+ readonly session_state: {
19
+ readonly type: "object";
20
+ readonly description: "Optional ADT session state container (cookies/CSRF) for stateful lock flow.";
21
+ readonly properties: {
22
+ readonly cookies: {
23
+ readonly type: "string";
24
+ readonly description: "Serialized Cookie header to reuse server session.";
25
+ };
26
+ readonly csrf_token: {
27
+ readonly type: "string";
28
+ readonly description: "CSRF token to reuse server session.";
29
+ };
30
+ readonly cookie_store: {
31
+ readonly type: "object";
32
+ readonly description: "Cookie key/value map to reuse server session.";
33
+ };
34
+ };
35
+ };
36
+ readonly object_type: {
37
+ readonly type: "string";
38
+ readonly enum: import("../../../dist/lib/compact/compactObjectTypes").CompactObjectType[];
39
+ readonly description: "ABAP object type for routed compact operation.";
40
+ };
41
+ readonly object_name: {
42
+ readonly type: "string";
43
+ readonly description: "Primary object name for lifecycle operation.";
44
+ };
45
+ };
46
+ readonly required: readonly ["object_type", "object_name"];
47
+ };
48
+ };
49
+ type HandlerLockArgs = {
50
+ object_type: CompactObjectType;
51
+ object_name: string;
52
+ super_package?: string;
53
+ session_id?: string;
54
+ session_state?: {
55
+ cookies?: string;
56
+ csrf_token?: string;
57
+ cookie_store?: Record<string, string>;
58
+ };
59
+ };
60
+ export declare function handleHandlerLock(context: HandlerContext, args: HandlerLockArgs): Promise<{
61
+ isError: boolean;
62
+ content: {
63
+ type: string;
64
+ text: string;
65
+ }[];
66
+ }>;
67
+ export {};
68
+ //# sourceMappingURL=handleHandlerLock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerLock.d.ts","sourceRoot":"","sources":["../../src/handlers/handleHandlerLock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAK1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC;AAEX,KAAK,eAAe,GAAG;IACrB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACvC,CAAC;CACH,CAAC;AAEF,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,eAAe;;;;;;GAgBtB"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOL_DEFINITION = void 0;
4
+ exports.handleHandlerLock = handleHandlerLock;
5
+ const compact_shared_1 = require("@mcp-abap-adt/lib/compact-shared");
6
+ const write_1 = require("@mcp-abap-adt/lib/handlers/write");
7
+ exports.TOOL_DEFINITION = {
8
+ name: 'HandlerLock',
9
+ available_in: ['onprem', 'cloud'],
10
+ description: 'Lock operation. object_type required: CLASS(object_name*), PROGRAM(object_name*) [onprem only], INTERFACE(object_name*), FUNCTION_GROUP(object_name*), FUNCTION_MODULE(object_name*), TABLE(object_name*), STRUCTURE(object_name*), DDL(object_name*), DOMAIN(object_name*), DATA_ELEMENT(object_name*), PACKAGE(object_name*), BEHAVIOR_DEFINITION(object_name*), BEHAVIOR_IMPLEMENTATION(object_name*), METADATA_EXTENSION(object_name*).',
11
+ inputSchema: compact_shared_1.compactLockSchema,
12
+ };
13
+ async function handleHandlerLock(context, args) {
14
+ const lowType = (0, compact_shared_1.toLowObjectType)(args.object_type);
15
+ if (!lowType) {
16
+ throw new Error(`Lock is not supported for object_type: ${args.object_type}`);
17
+ }
18
+ return (0, write_1.handleLockObject)(context, {
19
+ object_name: args.object_name,
20
+ object_type: lowType,
21
+ super_package: args.super_package,
22
+ session_id: args.session_id,
23
+ session_state: args.session_state,
24
+ });
25
+ }
26
+ //# sourceMappingURL=handleHandlerLock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleHandlerLock.js","sourceRoot":"","sources":["../../src/handlers/handleHandlerLock.ts"],"names":[],"mappings":";;;AA4BA,8CAkBC;AA7CD,qEAG0C;AAE1C,4DAAoE;AAEvD,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAU;IAC1C,WAAW,EACT,6aAA6a;IAC/a,WAAW,EAAE,kCAAiB;CACtB,CAAC;AAcJ,KAAK,UAAU,iBAAiB,CACrC,OAAuB,EACvB,IAAqB;IAErB,MAAM,OAAO,GAAG,IAAA,gCAAe,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,0CAA0C,IAAI,CAAC,WAAW,EAAE,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,IAAA,wBAAgB,EAAC,OAAO,EAAE;QAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,WAAW,EAAE,OAAO;QACpB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;KAClC,CAAC,CAAC;AACL,CAAC"}