@mcp-abap-adt/core 6.4.1 → 6.5.1

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 (54) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +8 -1
  3. package/dist/handlers/function_module/high/handleGetFunctionModule.d.ts.map +1 -1
  4. package/dist/handlers/function_module/high/handleGetFunctionModule.js +14 -4
  5. package/dist/handlers/function_module/high/handleGetFunctionModule.js.map +1 -1
  6. package/dist/handlers/function_module/readonly/handleReadFunctionModule.d.ts.map +1 -1
  7. package/dist/handlers/function_module/readonly/handleReadFunctionModule.js +20 -15
  8. package/dist/handlers/function_module/readonly/handleReadFunctionModule.js.map +1 -1
  9. package/dist/handlers/function_module/shared/parseContainerGroup.d.ts +25 -0
  10. package/dist/handlers/function_module/shared/parseContainerGroup.d.ts.map +1 -0
  11. package/dist/handlers/function_module/shared/parseContainerGroup.js +47 -0
  12. package/dist/handlers/function_module/shared/parseContainerGroup.js.map +1 -0
  13. package/dist/lib/config/validateExposition.d.ts +10 -0
  14. package/dist/lib/config/validateExposition.d.ts.map +1 -0
  15. package/dist/lib/config/validateExposition.js +21 -0
  16. package/dist/lib/config/validateExposition.js.map +1 -0
  17. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.d.ts +13 -2
  18. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.d.ts.map +1 -1
  19. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js +18 -1
  20. package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js.map +1 -1
  21. package/dist/lib/handlers/groups/index.d.ts +1 -0
  22. package/dist/lib/handlers/groups/index.d.ts.map +1 -1
  23. package/dist/lib/handlers/groups/index.js +4 -1
  24. package/dist/lib/handlers/groups/index.js.map +1 -1
  25. package/dist/lib/handlers/groups/strategies/IReadOnlyDedupStrategy.d.ts +15 -0
  26. package/dist/lib/handlers/groups/strategies/IReadOnlyDedupStrategy.d.ts.map +1 -0
  27. package/dist/lib/handlers/groups/strategies/IReadOnlyDedupStrategy.js +3 -0
  28. package/dist/lib/handlers/groups/strategies/IReadOnlyDedupStrategy.js.map +1 -0
  29. package/dist/lib/handlers/groups/strategies/NoDedupStrategy.d.ts +10 -0
  30. package/dist/lib/handlers/groups/strategies/NoDedupStrategy.d.ts.map +1 -0
  31. package/dist/lib/handlers/groups/strategies/NoDedupStrategy.js +14 -0
  32. package/dist/lib/handlers/groups/strategies/NoDedupStrategy.js.map +1 -0
  33. package/dist/lib/handlers/groups/strategies/ReadVsGetDedupStrategy.d.ts +14 -0
  34. package/dist/lib/handlers/groups/strategies/ReadVsGetDedupStrategy.d.ts.map +1 -0
  35. package/dist/lib/handlers/groups/strategies/ReadVsGetDedupStrategy.js +22 -0
  36. package/dist/lib/handlers/groups/strategies/ReadVsGetDedupStrategy.js.map +1 -0
  37. package/dist/lib/handlers/groups/strategies/index.d.ts +4 -0
  38. package/dist/lib/handlers/groups/strategies/index.d.ts.map +1 -0
  39. package/dist/lib/handlers/groups/strategies/index.js +8 -0
  40. package/dist/lib/handlers/groups/strategies/index.js.map +1 -0
  41. package/dist/server/EmbeddableMcpServer.d.ts +12 -0
  42. package/dist/server/EmbeddableMcpServer.d.ts.map +1 -1
  43. package/dist/server/EmbeddableMcpServer.js +22 -10
  44. package/dist/server/EmbeddableMcpServer.js.map +1 -1
  45. package/dist/server/launcher.js +23 -9
  46. package/dist/server/launcher.js.map +1 -1
  47. package/docs/user-guide/AVAILABLE_TOOLS.md +97 -65
  48. package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +4 -5
  49. package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +32 -34
  50. package/docs/user-guide/AVAILABLE_TOOLS_LEGACY.md +21 -21
  51. package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +49 -13
  52. package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +17 -19
  53. package/docs/user-guide/HANDLERS_MANAGEMENT.md +63 -3
  54. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  Generated from code in `src/handlers/**` (not from docs).
4
4
 
5
5
  - Level: Read-Only
6
- - Total tools: 54
6
+ - Total tools: 53
7
7
 
8
8
  ## Navigation
9
9
 
@@ -93,7 +93,7 @@ Generated from code in `src/handlers/**` (not from docs).
93
93
 
94
94
  <a id="readbehaviordefinition-read-only-behavior-definition"></a>
95
95
  #### ReadBehaviorDefinition (Read-Only / Behavior Definition)
96
- **Description:** [read-only] Read ABAP RAP behavior definition (BDEF) source code and metadata. Answers:
96
+ **Description:** Operation: Read, Create, Update. Subject: BehaviorDefinition. Will be useful for reading, creating, or updating behavior definition. [read-only] Read ABAP RAP behavior definition (BDEF) source code and metadata. Answers:
97
97
 
98
98
  **Source:** `src/handlers/behavior_definition/readonly/handleReadBehaviorDefinition.ts`
99
99
 
@@ -123,7 +123,7 @@ Generated from code in `src/handlers/**` (not from docs).
123
123
 
124
124
  <a id="readclass-read-only-class"></a>
125
125
  #### ReadClass (Read-Only / Class)
126
- **Description:** [read-only] Read ABAP class source code and metadata. Answers:
126
+ **Description:** Operation: Read, Create, Update. Subject: Class. Will be useful for reading, creating, or updating class. [read-only] Read ABAP class source code and metadata. Answers:
127
127
 
128
128
  **Source:** `src/handlers/class/readonly/handleReadClass.ts`
129
129
 
@@ -138,7 +138,7 @@ Generated from code in `src/handlers/**` (not from docs).
138
138
 
139
139
  <a id="readdataelement-read-only-data-element"></a>
140
140
  #### ReadDataElement (Read-Only / Data Element)
141
- **Description:** [read-only] Read ABAP data element definition and metadata. Answers:
141
+ **Description:** Operation: Read, Create, Update. Subject: DataElement. Will be useful for reading, creating, or updating data element. [read-only] Read ABAP data element definition and metadata. Answers:
142
142
 
143
143
  **Source:** `src/handlers/data_element/readonly/handleReadDataElement.ts`
144
144
 
@@ -153,7 +153,7 @@ Generated from code in `src/handlers/**` (not from docs).
153
153
 
154
154
  <a id="readdomain-read-only-domain"></a>
155
155
  #### ReadDomain (Read-Only / Domain)
156
- **Description:** [read-only] Read ABAP domain definition and metadata. Answers:
156
+ **Description:** Operation: Read, Create, Update. Subject: Domain. Will be useful for reading, creating, or updating domain. [read-only] Read ABAP domain definition and metadata. Answers:
157
157
 
158
158
  **Source:** `src/handlers/domain/readonly/handleReadDomain.ts`
159
159
 
@@ -221,7 +221,7 @@ Generated from code in `src/handlers/**` (not from docs).
221
221
 
222
222
  <a id="readfunctionmodule-read-only-function-module"></a>
223
223
  #### ReadFunctionModule (Read-Only / Function Module)
224
- **Description:** [read-only] Read ABAP function module source code and metadata. Answers:
224
+ **Description:** Operation: Read, Create, Update. Subject: FunctionModule. Will be useful for reading, creating, or updating function module. [read-only] Read ABAP function module source code and metadata. Answers:
225
225
 
226
226
  **Source:** `src/handlers/function_module/readonly/handleReadFunctionModule.ts`
227
227
 
@@ -265,7 +265,7 @@ Generated from code in `src/handlers/**` (not from docs).
265
265
 
266
266
  <a id="readinterface-read-only-interface"></a>
267
267
  #### ReadInterface (Read-Only / Interface)
268
- **Description:** [read-only] Read ABAP interface source code and metadata. Answers:
268
+ **Description:** Operation: Read, Create, Update. Subject: Interface. Will be useful for reading, creating, or updating interface. [read-only] Read ABAP interface source code and metadata. Answers:
269
269
 
270
270
  **Source:** `src/handlers/interface/readonly/handleReadInterface.ts`
271
271
 
@@ -280,7 +280,7 @@ Generated from code in `src/handlers/**` (not from docs).
280
280
 
281
281
  <a id="readmetadataextension-read-only-metadata-extension"></a>
282
282
  #### ReadMetadataExtension (Read-Only / Metadata Extension)
283
- **Description:** [read-only] Read ABAP metadata extension (DDLX) source code and metadata. Answers:
283
+ **Description:** Operation: Read, Create, Update. Subject: MetadataExtension. Will be useful for reading, creating, or updating metadata extension. [read-only] Read ABAP metadata extension (DDLX) source code and metadata. Answers:
284
284
 
285
285
  **Source:** `src/handlers/metadata_extension/readonly/handleReadMetadataExtension.ts`
286
286
 
@@ -333,7 +333,7 @@ Generated from code in `src/handlers/**` (not from docs).
333
333
 
334
334
  <a id="readprogram-read-only-program"></a>
335
335
  #### ReadProgram (Read-Only / Program)
336
- **Description:** [read-only] Read ABAP program (report) source code and metadata. Answers:
336
+ **Description:** Operation: Read, Create, Update. Subject: Program. Will be useful for reading, creating, or updating program. [read-only] Read ABAP program (report) source code and metadata. Answers:
337
337
 
338
338
  **Source:** `src/handlers/program/readonly/handleReadProgram.ts`
339
339
 
@@ -394,7 +394,7 @@ Generated from code in `src/handlers/**` (not from docs).
394
394
 
395
395
  <a id="readservicebinding-read-only-service-binding"></a>
396
396
  #### ReadServiceBinding (Read-Only / Service Binding)
397
- **Description:** [read-only] Read ABAP service binding (SRVB) payload and metadata. Answers:
397
+ **Description:** Operation: Read, Create, Update. Subject: ServiceBinding. Will be useful for reading, creating, or updating service binding. [read-only] Read ABAP service binding (SRVB) payload and metadata. Answers:
398
398
 
399
399
  **Source:** `src/handlers/service_binding/readonly/handleReadServiceBinding.ts`
400
400
 
@@ -408,7 +408,7 @@ Generated from code in `src/handlers/**` (not from docs).
408
408
 
409
409
  <a id="readservicedefinition-read-only-service-definition"></a>
410
410
  #### ReadServiceDefinition (Read-Only / Service Definition)
411
- **Description:** [read-only] Read ABAP service definition (SRVD) source code and metadata. Answers:
411
+ **Description:** Operation: Read, Create, Update. Subject: ServiceDefinition. Will be useful for reading, creating, or updating service definition. [read-only] Read ABAP service definition (SRVD) source code and metadata. Answers:
412
412
 
413
413
  **Source:** `src/handlers/service_definition/readonly/handleReadServiceDefinition.ts`
414
414
 
@@ -423,7 +423,7 @@ Generated from code in `src/handlers/**` (not from docs).
423
423
 
424
424
  <a id="readstructure-read-only-structure"></a>
425
425
  #### ReadStructure (Read-Only / Structure)
426
- **Description:** [read-only] Read ABAP structure definition and metadata. Answers:
426
+ **Description:** Operation: Read, Create, Update. Subject: Structure. Will be useful for reading, creating, or updating structure. [read-only] Read ABAP structure definition and metadata. Answers:
427
427
 
428
428
  **Source:** `src/handlers/structure/readonly/handleReadStructure.ts`
429
429
 
@@ -643,15 +643,13 @@ Generated from code in `src/handlers/**` (not from docs).
643
643
 
644
644
  <a id="runtimegetdumpbyid-read-only-system"></a>
645
645
  #### RuntimeGetDumpById (Read-Only / System)
646
- **Description:** [runtime] Read a specific ABAP runtime dump. Identify the dump by datetime + user (preferred, e.g. from a CALM event), or pass dump_id directly if already known. Use response_mode to control output detail level.
646
+ **Description:** [runtime] Read a specific ABAP runtime dump by its ID. First use RuntimeListFeeds to find dumps and get their IDs, then pass dump_id here to read the full dump content.
647
647
 
648
648
  **Source:** `src/handlers/system/readonly/handleRuntimeGetDumpById.ts`
649
649
 
650
650
  **Parameters:**
651
- - `datetime` (string, optional) - Dump datetime (ISO or
652
- - `dump_id` (string, optional) - Full runtime dump ID. Use only when already known; prefer datetime + user otherwise.
651
+ - `dump_id` (string, required) - Full runtime dump ID (e.g. from RuntimeListFeeds).
653
652
  - `response_mode` (string, optional (default: both)) - Controls what is returned:
654
- - `user` (string, optional) - SAP username whose dump to read. Required when using datetime lookup.
655
653
  - `view` (string, optional (default: default)) - Dump view mode: default payload, summary section, or formatted long text.
656
654
 
657
655
  ---
@@ -793,7 +791,7 @@ Generated from code in `src/handlers/**` (not from docs).
793
791
 
794
792
  <a id="readtable-read-only-table"></a>
795
793
  #### ReadTable (Read-Only / Table)
796
- **Description:** [read-only] Read ABAP table definition and metadata. Answers:
794
+ **Description:** Operation: Read, Create, Update. Subject: Table. Will be useful for reading, creating, or updating table. [read-only] Read ABAP table definition and metadata. Answers:
797
795
 
798
796
  **Source:** `src/handlers/table/readonly/handleReadTable.ts`
799
797
 
@@ -836,7 +834,7 @@ Generated from code in `src/handlers/**` (not from docs).
836
834
 
837
835
  <a id="readview-read-only-view"></a>
838
836
  #### ReadView (Read-Only / View)
839
- **Description:** [read-only] Read ABAP CDS view source code and metadata. Answers:
837
+ **Description:** Operation: Read, Create, Update. Subject: View. Will be useful for reading, creating, or updating view. [read-only] Read ABAP CDS view source code and metadata. Answers:
840
838
 
841
839
  **Source:** `src/handlers/view/readonly/handleReadView.ts`
842
840
 
@@ -846,4 +844,4 @@ Generated from code in `src/handlers/**` (not from docs).
846
844
 
847
845
  ---
848
846
 
849
- *Last updated: 2026-04-13*
847
+ *Last updated: 2026-04-24*
@@ -92,10 +92,25 @@ node bin/mcp-abap-adt-v2.js --transport=stdio --env-path=.env --exposition=reado
92
92
  # Compact facade only
93
93
  node bin/mcp-abap-adt-v2.js --transport=stdio --env-path=.env --exposition=compact
94
94
 
95
- # All operations (dangerous, for development only)
96
- node bin/mcp-abap-adt-v2.js --transport=stdio --env-path=.env --exposition=readonly,high,low,compact
95
+ # Low-level writes (use instead of `high`, not together)
96
+ node bin/mcp-abap-adt-v2.js --transport=stdio --env-path=.env --exposition=readonly,low
97
97
  ```
98
98
 
99
+ #### Validation rules
100
+
101
+ The launcher rejects invalid `--exposition` combinations at startup:
102
+
103
+ - `compact` must be exposed alone — it replaces both `high` and `low`. Combining it with anything else errors out.
104
+ - `high` and `low` are mutually exclusive.
105
+
106
+ Valid combinations: `[readonly]`, `[readonly, high]`, `[readonly, low]`, `[high]`, `[low]`, `[compact]`.
107
+
108
+ #### Readonly / high-level dedup
109
+
110
+ When both `readonly` and `high` are exposed, `Read<X>` readonly handlers duplicate the corresponding `Get<X>` from the high-level group (e.g. `ReadFunctionModule` vs `GetFunctionModule`). The launcher hides the readonly `Read<X>` variants in this case so that only one tool per operation is visible to the client.
111
+
112
+ Embedder consumers of `EmbeddableMcpServer` keep the previous behavior (both variants exposed) unless they opt in by passing a `readOnlyDedupStrategy`. See [EmbeddableMcpServer dedup strategies](#embeddablemcpserver-dedup-strategies) below.
113
+
99
114
  ### Config File
100
115
 
101
116
  If using `--config` parameter, specify in YAML:
@@ -106,7 +121,6 @@ envFile: .env
106
121
  exposition:
107
122
  - readonly
108
123
  - high
109
- - compact
110
124
  ```
111
125
 
112
126
  ### Environment Variable
@@ -252,3 +266,49 @@ To add handlers to a specific set:
252
266
  ```bash
253
267
  npm run docs:tools
254
268
  ```
269
+
270
+ ## EmbeddableMcpServer dedup strategies
271
+
272
+ `EmbeddableMcpServer` exposes an optional `readOnlyDedupStrategy` option to let consumers decide how readonly handlers are deduped against other groups (e.g. HighLevel, LowLevel, Compact) when multiple are exposed at the same time.
273
+
274
+ ```ts
275
+ import {
276
+ EmbeddableMcpServer,
277
+ ReadVsGetDedupStrategy,
278
+ } from '@mcp-abap-adt/core/server';
279
+
280
+ const server = new EmbeddableMcpServer({
281
+ connection,
282
+ exposition: ['readonly', 'high'],
283
+ // Opt in to dedup — hide ReadFunctionModule when GetFunctionModule is exposed, etc.
284
+ readOnlyDedupStrategy: new ReadVsGetDedupStrategy(),
285
+ });
286
+ ```
287
+
288
+ **Shipped implementations** (importable from `@mcp-abap-adt/core/handlers` or `@mcp-abap-adt/core/server`):
289
+
290
+ | Strategy | Behavior |
291
+ |---|---|
292
+ | `NoDedupStrategy` (default) | Never excludes anything — readonly group is exposed as-is. |
293
+ | `ReadVsGetDedupStrategy` | Hides a `Read<X>` entry when a corresponding `Get<X>` is contributed by another group. |
294
+
295
+ **Custom strategies**: implement `IReadOnlyDedupStrategy` for role-based or domain-specific rules:
296
+
297
+ ```ts
298
+ import type {
299
+ HandlerEntry,
300
+ IReadOnlyDedupStrategy,
301
+ } from '@mcp-abap-adt/core/handlers';
302
+
303
+ class RoleAwareDedup implements IReadOnlyDedupStrategy {
304
+ constructor(private readonly role: 'viewer' | 'editor') {}
305
+ shouldExclude(entry: HandlerEntry, overriding: ReadonlySet<string>): boolean {
306
+ if (this.role === 'viewer') return false; // expose readonly as-is
307
+ // editor: dedup against whatever other groups contribute
308
+ const n = entry.toolDefinition.name;
309
+ return n.startsWith('Read') && overriding.has('Get' + n.slice(4));
310
+ }
311
+ }
312
+ ```
313
+
314
+ The default (no dedup) preserves behavior for existing consumers — upgrading the package does not change exposed tool sets unless the consumer explicitly passes a strategy.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/core",
3
3
  "mcpName": "io.github.fr0ster/mcp-abap-adt",
4
- "version": "6.4.1",
4
+ "version": "6.5.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {