@mcp-abap-adt/connection 23.0.0 → 24.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/CHANGELOG.md +20 -1
- package/README.md +4 -4
- package/dist/connection/AbstractAbapConnection.js +3 -3
- package/docs/INDEX.md +2 -0
- package/docs/MIGRATION-24.0.md +42 -0
- package/docs/USAGE.md +8 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [24.0.0] - 2026-11-12
|
|
11
|
+
|
|
12
|
+
The shared contract moves to `@mcp-abap-adt/interfaces-adt-connection` 5.
|
|
13
|
+
Breaking for code typed against `IAbapConnection` or `AbapConnection` that
|
|
14
|
+
names a type argument on `makeAdtRequest`. Nothing changes at run time. See
|
|
15
|
+
[docs/MIGRATION-24.0.md](docs/MIGRATION-24.0.md).
|
|
16
|
+
|
|
17
|
+
### Changed — breaking
|
|
18
|
+
|
|
19
|
+
- **The shared contract is `@mcp-abap-adt/interfaces-adt-connection` `^5.0.0`.**
|
|
20
|
+
Its `IAbapConnection.makeAdtRequest(options)` takes no type parameter and
|
|
21
|
+
answers `Promise<IAdtWireResponse>`, the answer's `data` `unknown`. The
|
|
22
|
+
connectors' own `makeAdtRequest` keeps its generic signature, and a
|
|
23
|
+
connector is assignable to version 5's `IAbapConnection`. Code holding a
|
|
24
|
+
value typed `IAbapConnection` (or the `AbapConnection` alias) that names a
|
|
25
|
+
type argument — `makeAdtRequest<string>(…)` — no longer compiles: drop the
|
|
26
|
+
type argument and narrow `data` from `unknown`. README and docs/USAGE.md describe the version 5 contract.
|
|
27
|
+
|
|
10
28
|
## [23.0.0] - 2026-11-12
|
|
11
29
|
|
|
12
30
|
A stateless request keeps its answer when the SAP session was replaced
|
|
@@ -3010,7 +3028,8 @@ const connection = createAbapConnection(config, logger);
|
|
|
3010
3028
|
- JWT token refresh now properly handles connection errors (401/403 during initial connect)
|
|
3011
3029
|
- Permission errors (403 with "ExceptionResourceNoAccess") no longer trigger JWT refresh loops
|
|
3012
3030
|
- Proper separation: base class handles HTTP/session, concrete classes handle auth-specific errors
|
|
3013
|
-
[Unreleased]: https://github.com/fr0ster/mcp-abap-connection/compare/
|
|
3031
|
+
[Unreleased]: https://github.com/fr0ster/mcp-abap-connection/compare/v24.0.0...HEAD
|
|
3032
|
+
[24.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v23.0.0...v24.0.0
|
|
3014
3033
|
[23.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v22.0.1...v23.0.0
|
|
3015
3034
|
[22.0.1]: https://github.com/fr0ster/mcp-abap-connection/compare/v22.0.0...v22.0.1
|
|
3016
3035
|
[22.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v21.0.0...v22.0.0
|
package/README.md
CHANGED
|
@@ -162,6 +162,7 @@ the packages above. See [Migration to 9.0.0](./docs/MIGRATION-9.0.md).
|
|
|
162
162
|
|
|
163
163
|
- 📦 **[Installation Guide](./docs/INSTALLATION.md)** - Setup and installation instructions
|
|
164
164
|
- 📚 **[Usage Guide](./docs/USAGE.md)** - Detailed usage examples and API documentation
|
|
165
|
+
- 🚚 **[Migration to 24.0.0](./docs/MIGRATION-24.0.md)** - on `@mcp-abap-adt/interfaces-adt-connection` ^5.0.0: `IAbapConnection` / `AbapConnection`'s `makeAdtRequest` takes no type argument; drop it and narrow `data` from `unknown`; the connectors are unchanged
|
|
165
166
|
- 🚚 **[Migration to 23.0.0](./docs/MIGRATION-23.0.md)** - a stateless request whose answer shows the SAP session replaced keeps that answer, marked `sessionLost`, and the instance is spent; a stateful request still rejects `ADT_SESSION_REPLACED`; nothing is resent; `@mcp-abap-adt/interfaces-adt-connection` ^4.2.0
|
|
166
167
|
- 🚚 **[Migration to 22.0.0](./docs/MIGRATION-22.0.md)** - over RFC: a connection-ending RFC error on the stateful conversation is `ADT_SESSION_REPLACED` and spends the instance (no silent reconnect); a failed RFC call carries `rfc: { key, group, code, codeString }`; the `SAP-PASSPORT` header becomes the RFC call's passport; `@mcp-abap-adt/sap-rfc-lite` ^0.4.0
|
|
167
168
|
- 🚚 **[Migration to 21.0.0](./docs/MIGRATION-21.0.md)** - the CSRF token fetch asks once: no retry, no delay; `CSRF_CONFIG.RETRY_COUNT` / `RETRY_DELAY`, the establish context's `retries` / `retryDelayMs` / `isFatal`, `fetchCsrfToken`'s retry parameters and `endsTheExchange` are removed
|
|
@@ -924,10 +925,9 @@ import type { IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
|
924
925
|
// The shared contract (IAbapConnection), what every connection provides:
|
|
925
926
|
interface AbapConnection {
|
|
926
927
|
connect(): Promise<void>; // REQUIRED before any request; rejects on failure
|
|
927
|
-
//
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
): Promise<IAdtWireResponse<T, D>>;
|
|
928
|
+
// The answer's `data` is `unknown`; the caller names no type for it
|
|
929
|
+
// (interfaces-adt-connection 5).
|
|
930
|
+
makeAdtRequest(options: AbapRequestOptions): Promise<IAdtWireResponse>;
|
|
931
931
|
getBaseUrl(): Promise<string | undefined>; // undefined over RFC: no HTTP origin
|
|
932
932
|
setSessionType(type: "stateless" | "stateful"): void; // Switch session type
|
|
933
933
|
getSessionId(): string | null; // Client-side conversation id
|
|
@@ -1185,9 +1185,9 @@ class AbstractAbapConnection {
|
|
|
1185
1185
|
async credentialRejected(_rejection) {
|
|
1186
1186
|
return { outcome: { ok: false, refusal: authErrors_js_1.NO_CREDENTIAL_TO_RENEW } };
|
|
1187
1187
|
}
|
|
1188
|
-
// The defaults are
|
|
1189
|
-
//
|
|
1190
|
-
//
|
|
1188
|
+
// The defaults are IAdtWireResponse's (`unknown`). IAbapConnection
|
|
1189
|
+
// (interfaces-adt-connection 5) takes no type parameter; this generic
|
|
1190
|
+
// implementation is assignable to it, and its callers keep their signature.
|
|
1191
1191
|
async makeAdtRequest(options) {
|
|
1192
1192
|
// Admission first, synchronously, before any await: the check and the
|
|
1193
1193
|
// count must happen in one step, or a request could be admitted and still
|
package/docs/INDEX.md
CHANGED
|
@@ -15,6 +15,7 @@ mcp-abap-connection/
|
|
|
15
15
|
│ ├── INSTALLATION.md # Setup and installation guide
|
|
16
16
|
│ ├── USAGE.md # API documentation and examples
|
|
17
17
|
│ ├── MIGRATION-2.0.md # Moving to the explicit session lifecycle
|
|
18
|
+
│ ├── MIGRATION-24.0.md # interfaces-adt-connection 5: IAbapConnection.makeAdtRequest takes no type argument
|
|
18
19
|
│ ├── MIGRATION-23.0.md # a stateless request keeps its answer when the session was replaced: sessionLost
|
|
19
20
|
│ ├── MIGRATION-22.0.md # RFC: the session lost after a connection-ending error; rfc fields; the passport
|
|
20
21
|
│ ├── MIGRATION-21.0.md # the CSRF token fetch asks once: no retry, no delay
|
|
@@ -53,6 +54,7 @@ mcp-abap-connection/
|
|
|
53
54
|
- 🧭 [Scope](./SCOPE.md) - What this package answers for, and only that
|
|
54
55
|
|
|
55
56
|
### Upgrading
|
|
57
|
+
- 🚚 [Migrating to 24.0.0](./MIGRATION-24.0.md) - on `@mcp-abap-adt/interfaces-adt-connection` 5: `IAbapConnection` / `AbapConnection`'s `makeAdtRequest` takes no type argument; narrow `data` from `unknown`
|
|
56
58
|
- 🚚 [Migrating to 21.0.0](./MIGRATION-21.0.md) - the CSRF token fetch asks once: no retry, no delay; the retry constants, context fields and parameters are removed
|
|
57
59
|
- 🚚 [Migrating to 20.0.0](./MIGRATION-20.0.md) - an RFC config is an `ISapRfcConfig` stating its address, `client` and `language`: no URL, no defaults, no `SAP_SYSNR`; `getBaseUrl()` may answer `undefined`; HTTP transports take `baseUrl`
|
|
58
60
|
- 🚚 [Migrating to 18.0.0](./MIGRATION-18.0.md) - `rfcParamsFrom` returns `RfcAddress`; RFC through a message server and a logon group
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Migration to 24.0
|
|
2
|
+
|
|
3
|
+
24.0.0 moves the shared contract to `@mcp-abap-adt/interfaces-adt-connection`
|
|
4
|
+
^5.0.0. Nothing changes at run time.
|
|
5
|
+
|
|
6
|
+
## What changed
|
|
7
|
+
|
|
8
|
+
- **`IAbapConnection.makeAdtRequest` takes no type argument.** Version 5
|
|
9
|
+
declares `makeAdtRequest(options): Promise<IAdtWireResponse>`; the answer's
|
|
10
|
+
`data` is `unknown`. This package's `AbapConnection` is an alias for
|
|
11
|
+
`IAbapConnection`, so it changed with it.
|
|
12
|
+
- **The connectors are unchanged.** `AdtOnPremConnector` and
|
|
13
|
+
`AdtCloudConnector` keep their own `makeAdtRequest` signature, and each is
|
|
14
|
+
assignable to version 5's `IAbapConnection`.
|
|
15
|
+
|
|
16
|
+
## Who is affected
|
|
17
|
+
|
|
18
|
+
Code that holds a value typed `IAbapConnection` or `AbapConnection` and calls
|
|
19
|
+
`makeAdtRequest<T>(…)` with a type argument. It no longer compiles. Code that
|
|
20
|
+
calls it without a type argument, or holds a connector type, is not affected.
|
|
21
|
+
|
|
22
|
+
## What to do
|
|
23
|
+
|
|
24
|
+
Drop the type argument and narrow `data` from `unknown` before using it:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import type {
|
|
28
|
+
IAbapConnection,
|
|
29
|
+
IAbapRequestOptions,
|
|
30
|
+
} from "@mcp-abap-adt/interfaces-adt-connection";
|
|
31
|
+
|
|
32
|
+
async function readXml(
|
|
33
|
+
connection: IAbapConnection,
|
|
34
|
+
options: IAbapRequestOptions,
|
|
35
|
+
): Promise<string> {
|
|
36
|
+
const response = await connection.makeAdtRequest(options);
|
|
37
|
+
if (typeof response.data !== "string") {
|
|
38
|
+
throw new Error("expected a text body");
|
|
39
|
+
}
|
|
40
|
+
return response.data;
|
|
41
|
+
}
|
|
42
|
+
```
|
package/docs/USAGE.md
CHANGED
|
@@ -275,8 +275,8 @@ them is refused with `ADT_NOT_CONNECTED`.
|
|
|
275
275
|
### GET Request
|
|
276
276
|
|
|
277
277
|
```typescript
|
|
278
|
-
// The
|
|
279
|
-
const packages = await connection.makeAdtRequest
|
|
278
|
+
// The answer's `data` is `unknown`: read the XML body after checking it is text.
|
|
279
|
+
const packages = await connection.makeAdtRequest({
|
|
280
280
|
method: 'GET',
|
|
281
281
|
url: '/sap/bc/adt/repository/nodestructure',
|
|
282
282
|
params: {
|
|
@@ -286,6 +286,8 @@ const packages = await connection.makeAdtRequest<string>({
|
|
|
286
286
|
},
|
|
287
287
|
timeout: 0,
|
|
288
288
|
});
|
|
289
|
+
if (typeof packages.data !== 'string') throw new Error('expected an XML body');
|
|
290
|
+
const xml = packages.data;
|
|
289
291
|
```
|
|
290
292
|
|
|
291
293
|
### POST Request (Create Object)
|
|
@@ -707,7 +709,7 @@ on whether it is stateful (since 23.0.0):
|
|
|
707
709
|
gave it is valid and is returned as it came — a success resolves, a refusal
|
|
708
710
|
rejects as itself — with `sessionLost: 'ADT_SESSION_REPLACED'` on that
|
|
709
711
|
response or on that error (`IAdtWireResponse`, `IAbapConnectionError`,
|
|
710
|
-
`@mcp-abap-adt/interfaces-adt-connection
|
|
712
|
+
`@mcp-abap-adt/interfaces-adt-connection`, since 4.2.0). Only the request whose own
|
|
711
713
|
answer showed the replacement carries it. Nothing is sent again for it: no
|
|
712
714
|
CSRF retry, no credential renewal. The session is lost before the answer
|
|
713
715
|
reaches you.
|
|
@@ -994,10 +996,9 @@ import type { AbapRequestOptions } from '@mcp-abap-adt/connection';
|
|
|
994
996
|
import type { IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
995
997
|
interface AbapConnection {
|
|
996
998
|
connect(): Promise<void>; // REQUIRED before any request
|
|
997
|
-
//
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
): Promise<IAdtWireResponse<T, D>>;
|
|
999
|
+
// The answer's `data` is `unknown`; the caller names no type for it
|
|
1000
|
+
// (interfaces-adt-connection 5).
|
|
1001
|
+
makeAdtRequest(options: AbapRequestOptions): Promise<IAdtWireResponse>;
|
|
1001
1002
|
getBaseUrl(): Promise<string | undefined>; // undefined over RFC: no HTTP origin
|
|
1002
1003
|
setSessionType(type: "stateless" | "stateful"): void;
|
|
1003
1004
|
getSessionId(): string | null; // client-side conversation id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/connection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "ABAP connection layer for MCP ABAP ADT server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@mcp-abap-adt/auth-errors": "^2.2.1",
|
|
55
|
-
"@mcp-abap-adt/interfaces-adt-connection": "^
|
|
55
|
+
"@mcp-abap-adt/interfaces-adt-connection": "^5.0.0",
|
|
56
56
|
"@mcp-abap-adt/interfaces-auth": "^7.5.0",
|
|
57
57
|
"@mcp-abap-adt/interfaces-auth-sap": "^4.0.0",
|
|
58
58
|
"@mcp-abap-adt/interfaces-network": "^2.0.1",
|