@mcp-abap-adt/connection 14.1.0 → 15.0.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.
- package/CHANGELOG.md +34 -1
- package/README.md +8 -4
- package/dist/connection/AbstractAbapConnection.d.ts +1 -1
- package/dist/connection/AbstractAbapConnection.d.ts.map +1 -1
- package/dist/connection/AbstractAbapConnection.js +3 -4
- package/docs/INDEX.md +2 -0
- package/docs/INSTALLATION.md +1 -1
- package/docs/MIGRATION-15.0.md +46 -0
- package/docs/USAGE.md +9 -5
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [15.0.1] - 2026-10-12
|
|
11
|
+
|
|
12
|
+
The code is the same as 15.0.0.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- The contract ranges are their current releases, as the auth stack (auth-providers 6.0.2,
|
|
16
|
+
auth-stores 5.0.1, auth-broker 5.0.6) declares them: `@mcp-abap-adt/interfaces-utils`
|
|
17
|
+
`^1.1.1` (was `^1.1.0`), `@mcp-abap-adt/interfaces-network` `^2.0.1` (was `^2.0.0`),
|
|
18
|
+
`@mcp-abap-adt/auth-errors` `^2.2.1` (was `^2.2.0`); the optional
|
|
19
|
+
`@mcp-abap-adt/sap-rfc-lite` `^0.2.2` (was `^0.2.1`). Their APIs are unchanged.
|
|
20
|
+
- Development: the dev dependency `@mcp-abap-adt/auth-providers` is `^6.0.2` (was `^6.0.0`);
|
|
21
|
+
the lockfile is refreshed from the registry.
|
|
22
|
+
- README, INSTALLATION and USAGE: connection 13.x to 15.x work with auth-providers 6.
|
|
23
|
+
|
|
24
|
+
## [15.0.0] - 2026-10-12
|
|
25
|
+
|
|
26
|
+
### Breaking
|
|
27
|
+
- **On `@mcp-abap-adt/interfaces-adt-connection` 2.0.0** (was `^1.0.0`).
|
|
28
|
+
`makeAdtRequest` mirrors the contract's `IAbapConnection.makeAdtRequest`,
|
|
29
|
+
whose defaults 2.0.0 made `unknown`: `makeAdtRequest<T = unknown, D =
|
|
30
|
+
unknown>`. An answer whose type is not named is `unknown`, so reading a field
|
|
31
|
+
off it no longer compiles until the type is named or checked. Nothing changes
|
|
32
|
+
at run time. 14.x declared the contract's 1.x while it was at 2.0.0, so a
|
|
33
|
+
consumer on 2.x installed two copies; 15.0 holds one. See
|
|
34
|
+
[MIGRATION-15.0.md](./docs/MIGRATION-15.0.md).
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
- README and USAGE: the contract's `makeAdtRequest` is shown as it is
|
|
38
|
+
(`IAdtWireResponse<T, D>` with `unknown` defaults), not as an
|
|
39
|
+
`AxiosResponse`; the GET example names its XML body's type.
|
|
40
|
+
|
|
10
41
|
## [14.1.0] - 2026-10-12
|
|
11
42
|
|
|
12
43
|
### Fixed
|
|
@@ -2373,7 +2404,9 @@ const connection = createAbapConnection(config, logger);
|
|
|
2373
2404
|
- JWT token refresh now properly handles connection errors (401/403 during initial connect)
|
|
2374
2405
|
- Permission errors (403 with "ExceptionResourceNoAccess") no longer trigger JWT refresh loops
|
|
2375
2406
|
- Proper separation: base class handles HTTP/session, concrete classes handle auth-specific errors
|
|
2376
|
-
[Unreleased]: https://github.com/fr0ster/mcp-abap-connection/compare/
|
|
2407
|
+
[Unreleased]: https://github.com/fr0ster/mcp-abap-connection/compare/v15.0.1...HEAD
|
|
2408
|
+
[15.0.1]: https://github.com/fr0ster/mcp-abap-connection/compare/v15.0.0...v15.0.1
|
|
2409
|
+
[15.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v14.1.0...v15.0.0
|
|
2377
2410
|
[14.1.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v14.0.1...v14.1.0
|
|
2378
2411
|
[14.0.1]: https://github.com/fr0ster/mcp-abap-connection/compare/v14.0.0...v14.0.1
|
|
2379
2412
|
[14.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v13.0.0...v14.0.0
|
package/README.md
CHANGED
|
@@ -160,6 +160,7 @@ the packages above. See [Migration to 9.0.0](./docs/MIGRATION-9.0.md).
|
|
|
160
160
|
|
|
161
161
|
- 📦 **[Installation Guide](./docs/INSTALLATION.md)** - Setup and installation instructions
|
|
162
162
|
- 📚 **[Usage Guide](./docs/USAGE.md)** - Detailed usage examples and API documentation
|
|
163
|
+
- 🚚 **[Migration to 15.0.0](./docs/MIGRATION-15.0.md)** - on `@mcp-abap-adt/interfaces-adt-connection` 2: `makeAdtRequest`'s answer is `unknown` unless its type is named; nothing changes at run time
|
|
163
164
|
- 🚚 **[Migration to 14.0.0](./docs/MIGRATION-14.0.md)** - the `sap-abap-auth` CLI is removed, with its `open` and `commander` dependencies; use `@mcp-abap-adt/auth-broker-cli`; the library's API is unchanged
|
|
164
165
|
- 🚚 **[Migration to 13.0.0](./docs/MIGRATION-13.0.md)** - interfaces-auth 7 and auth-errors 2, and the providers from auth-providers 6.0.0; no behaviour change, one interfaces-auth major per process
|
|
165
166
|
- 🚚 **[Migration to 12.0.0](./docs/MIGRATION-12.0.md)** - refusals follow the auth error contract (interfaces-auth 6, auth-errors): `AuthRefusedError.refusal` is an `IAuthProviderError` — read its `kind`; a custom `ILogonTarget` mints its refusal; no auth-providers release fits 12.x — take 13.0.0 with auth-providers 6.0.0
|
|
@@ -209,7 +210,7 @@ since 10.0.0. Install them from where they live:
|
|
|
209
210
|
npm install @mcp-abap-adt/auth-providers@^6
|
|
210
211
|
```
|
|
211
212
|
|
|
212
|
-
connection 13.x
|
|
213
|
+
connection 13.x to 15.x work with **auth-providers 6.0.0** (`^6.0.0`), the release
|
|
213
214
|
built on interfaces-auth 7 and auth-errors 2, and are tested with it: the 5.x
|
|
214
215
|
providers answer unbranded refusals and do not fit. See
|
|
215
216
|
[Migration to 13.0.0](./docs/MIGRATION-13.0.md) and
|
|
@@ -639,12 +640,15 @@ type SapConfig = {
|
|
|
639
640
|
Main interface for ABAP connections.
|
|
640
641
|
|
|
641
642
|
```typescript
|
|
642
|
-
import { AbapRequestOptions } from '@mcp-abap-adt/connection';
|
|
643
|
-
import type {
|
|
643
|
+
import type { AbapRequestOptions } from '@mcp-abap-adt/connection';
|
|
644
|
+
import type { IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
644
645
|
// The shared contract (IAbapConnection), what every connection provides:
|
|
645
646
|
interface AbapConnection {
|
|
646
647
|
connect(): Promise<void>; // REQUIRED before any request; rejects on failure
|
|
647
|
-
|
|
648
|
+
// An answer whose type is not named is `unknown` (interfaces-adt-connection 2).
|
|
649
|
+
makeAdtRequest<T = unknown, D = unknown>(
|
|
650
|
+
options: AbapRequestOptions,
|
|
651
|
+
): Promise<IAdtWireResponse<T, D>>;
|
|
648
652
|
getBaseUrl(): Promise<string>;
|
|
649
653
|
setSessionType(type: "stateless" | "stateful"): void; // Switch session type
|
|
650
654
|
getSessionId(): string | null; // Client-side conversation id
|
|
@@ -453,7 +453,7 @@ declare abstract class AbstractAbapConnection implements AbapConnection, ISessio
|
|
|
453
453
|
* nothing to renew.
|
|
454
454
|
*/
|
|
455
455
|
protected credentialRejected(_rejection: IAuthRejection): Promise<GuardedAnswer>;
|
|
456
|
-
makeAdtRequest<T =
|
|
456
|
+
makeAdtRequest<T = unknown, D = unknown>(options: AbapRequestOptions): Promise<IAdtWireResponse<T, D>>;
|
|
457
457
|
private performRequest;
|
|
458
458
|
/**
|
|
459
459
|
* One attempt: sent, and its response folded into the session.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/AbstractAbapConnection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACb,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;;;;OAMG;IACH,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMlD;;;;;;;;OAQG;YACW,eAAe;IAU7B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,aAAa;IAiCrB;;;;OAIG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIlD;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,eAAe;CA6BxB;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -837,10 +837,9 @@ class AbstractAbapConnection {
|
|
|
837
837
|
async credentialRejected(_rejection) {
|
|
838
838
|
return { outcome: { ok: false, refusal: authErrors_js_1.NO_CREDENTIAL_TO_RENEW } };
|
|
839
839
|
}
|
|
840
|
-
// The defaults are IAbapConnection's (interfaces-adt-connection),
|
|
841
|
-
// implements: changing them here alone would type every caller's
|
|
842
|
-
// differently from the contract it codes against.
|
|
843
|
-
// biome-ignore lint/suspicious/noExplicitAny: mirrors IAbapConnection.makeAdtRequest
|
|
840
|
+
// The defaults are IAbapConnection's (interfaces-adt-connection 2: `unknown`),
|
|
841
|
+
// which this implements: changing them here alone would type every caller's
|
|
842
|
+
// response differently from the contract it codes against.
|
|
844
843
|
async makeAdtRequest(options) {
|
|
845
844
|
// Admission first, synchronously, before any await: the check and the
|
|
846
845
|
// 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-15.0.md # interfaces-adt-connection 2: makeAdtRequest answers unknown
|
|
18
19
|
│ ├── MIGRATION-14.0.md # the sap-abap-auth CLI, open and commander are removed
|
|
19
20
|
│ ├── MIGRATION-13.0.md # interfaces-auth 7, auth-errors 2, auth-providers 6.0.0; no behaviour change
|
|
20
21
|
│ ├── MIGRATION-12.0.md # refusals follow the auth error contract (interfaces-auth 6, auth-errors)
|
|
@@ -45,6 +46,7 @@ mcp-abap-connection/
|
|
|
45
46
|
- 🧭 [Scope and Boundaries](./SCOPE.md) - What this package does (and does not), sibling packages, and why there is no RFC to cloud
|
|
46
47
|
|
|
47
48
|
### Upgrading
|
|
49
|
+
- 🚚 [Migrating to 15.0.0](./MIGRATION-15.0.md) - on `@mcp-abap-adt/interfaces-adt-connection` 2: `makeAdtRequest`'s answer is `unknown` unless its type is named
|
|
48
50
|
- 🚚 [Migrating to 14.0.0](./MIGRATION-14.0.md) - the `sap-abap-auth` CLI is removed; use `@mcp-abap-adt/auth-broker-cli`
|
|
49
51
|
- 🚚 [Migrating to 13.0.0](./MIGRATION-13.0.md) - interfaces-auth 7 and auth-errors 2; the connection's behaviour is unchanged, a consumer holds one interfaces-auth major and takes the providers from auth-providers 6.0.0
|
|
50
52
|
- 🚚 [Migrating to 12.0.0](./MIGRATION-12.0.md) - refusals follow the auth error contract: `AuthRefusedError.refusal` is an `IAuthProviderError` (read its `kind`), a custom `ILogonTarget` mints its refusal through `@mcp-abap-adt/auth-errors`, and no auth-providers release fits 12.x — auth-providers 6.0.0 goes with 13.0.0
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -189,7 +189,7 @@ puts two copies of the same contract in your tree.
|
|
|
189
189
|
The credential providers (`BasicAuthProvider`, `TokenAuthProvider`,
|
|
190
190
|
`SamlAuthProvider`, `CertificateAuthProvider`) are no longer part of this
|
|
191
191
|
package as of 10.0.0; install `@mcp-abap-adt/auth-providers` for them —
|
|
192
|
-
connection 13.x
|
|
192
|
+
connection 13.x to 15.x work with auth-providers **6.0.0** (`^6.0.0`), built on
|
|
193
193
|
interfaces-auth 7 and auth-errors 2; the 5.x providers do not fit.
|
|
194
194
|
See [Migration to 10.0.0](./MIGRATION-10.0.md),
|
|
195
195
|
[Migration to 12.0.0](./MIGRATION-12.0.md) and
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Migration to 15.0
|
|
2
|
+
|
|
3
|
+
15.0.0 moves the connection onto `@mcp-abap-adt/interfaces-adt-connection`
|
|
4
|
+
**2.0.0**, the contract it implements. Nothing changes at run time: the
|
|
5
|
+
lifecycle, the requests, the logoff and every answer are as in 14.1.0. What
|
|
6
|
+
changes is a type.
|
|
7
|
+
|
|
8
|
+
## What changed
|
|
9
|
+
|
|
10
|
+
`makeAdtRequest` mirrors `IAbapConnection.makeAdtRequest`, and the contract's
|
|
11
|
+
2.0.0 made its defaults `unknown` instead of `any`:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
// 14.x
|
|
15
|
+
makeAdtRequest<T = any, D = any>(options): Promise<IAdtWireResponse<T, D>>;
|
|
16
|
+
// 15.0
|
|
17
|
+
makeAdtRequest<T = unknown, D = unknown>(options): Promise<IAdtWireResponse<T, D>>;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
So an answer whose type the caller does not name is `unknown`. Reading a field
|
|
21
|
+
off it — `response.data.items`, a typo included — compiled against `any` and
|
|
22
|
+
no longer compiles.
|
|
23
|
+
|
|
24
|
+
14.x declared `interfaces-adt-connection` `^1.0.0` while the contract was at
|
|
25
|
+
2.0.0, so a consumer on the 2.x contract installed two copies of it. 15.0 holds
|
|
26
|
+
one.
|
|
27
|
+
|
|
28
|
+
## What a consumer must do
|
|
29
|
+
|
|
30
|
+
Where the compiler now reports an error:
|
|
31
|
+
|
|
32
|
+
- **Name the type** the request answers, when it is known:
|
|
33
|
+
`connection.makeAdtRequest<string>(options)` for an XML or text body.
|
|
34
|
+
- **Narrow `unknown`** where the shape is checked at run time anyway:
|
|
35
|
+
`typeof response.data === 'string'`, or a type guard for an object, before
|
|
36
|
+
reading a field.
|
|
37
|
+
- **A stub or mock of `makeAdtRequest`** that returns a fixed shape is no
|
|
38
|
+
longer assignable to the generic signature: declare it generic,
|
|
39
|
+
`async <T = unknown, D = unknown>(options) => ({ … data: body as T … })`,
|
|
40
|
+
or annotate its return as `Promise<IAdtWireResponse<any, any>>` in the test.
|
|
41
|
+
- **Be on `@mcp-abap-adt/interfaces-adt-connection` 2** wherever you depend on
|
|
42
|
+
it yourself, so that one copy of the contract is installed
|
|
43
|
+
(`npm ls @mcp-abap-adt/interfaces-adt-connection`).
|
|
44
|
+
|
|
45
|
+
Code that never reads `response.data` as a typed object, or names its type
|
|
46
|
+
already, changes nothing.
|
package/docs/USAGE.md
CHANGED
|
@@ -166,7 +166,8 @@ them is refused with `ADT_NOT_CONNECTED`.
|
|
|
166
166
|
|
|
167
167
|
```typescript
|
|
168
168
|
import { getTimeout } from '@mcp-abap-adt/connection';
|
|
169
|
-
|
|
169
|
+
// The body is XML: name its type, or the answer's `data` is `unknown`.
|
|
170
|
+
const packages = await connection.makeAdtRequest<string>({
|
|
170
171
|
method: 'GET',
|
|
171
172
|
url: '/sap/bc/adt/repository/nodestructure',
|
|
172
173
|
params: {
|
|
@@ -716,11 +717,14 @@ try {
|
|
|
716
717
|
connection satisfies, including RFC:
|
|
717
718
|
|
|
718
719
|
```typescript
|
|
719
|
-
import { AbapRequestOptions } from '@mcp-abap-adt/connection';
|
|
720
|
-
import type {
|
|
720
|
+
import type { AbapRequestOptions } from '@mcp-abap-adt/connection';
|
|
721
|
+
import type { IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
721
722
|
interface AbapConnection {
|
|
722
723
|
connect(): Promise<void>; // REQUIRED before any request
|
|
723
|
-
|
|
724
|
+
// An answer whose type is not named is `unknown` (interfaces-adt-connection 2).
|
|
725
|
+
makeAdtRequest<T = unknown, D = unknown>(
|
|
726
|
+
options: AbapRequestOptions,
|
|
727
|
+
): Promise<IAdtWireResponse<T, D>>;
|
|
724
728
|
getBaseUrl(): Promise<string>;
|
|
725
729
|
setSessionType(type: "stateless" | "stateful"): void;
|
|
726
730
|
getSessionId(): string | null; // client-side conversation id
|
|
@@ -929,7 +933,7 @@ export class CloudSdkAbapConnection {
|
|
|
929
933
|
### The credential, and how a refusal is classified
|
|
930
934
|
|
|
931
935
|
For SAP BTP cloud systems, hand `AdtCloudConnector` a token provider from
|
|
932
|
-
`@mcp-abap-adt/auth-providers` 6.0.0 (connection 13.x
|
|
936
|
+
`@mcp-abap-adt/auth-providers` 6.0.0 (connection 13.x to 15.x work with `^6.0.0`): `TokenAuthProvider.fixed(token)` is a token with
|
|
933
937
|
nothing behind it, `TokenAuthProvider.from(refresher)` takes an `ITokenRefresher`
|
|
934
938
|
and renews a token the system refused. Obtaining tokens in the first place is
|
|
935
939
|
`@mcp-abap-adt/auth-broker`'s job, not this package's.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/connection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"description": "ABAP connection layer for MCP ABAP ADT server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
"node": "^22 || ^24 || ^26"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@mcp-abap-adt/auth-errors": "^2.2.
|
|
54
|
-
"@mcp-abap-adt/interfaces-adt-connection": "^
|
|
53
|
+
"@mcp-abap-adt/auth-errors": "^2.2.1",
|
|
54
|
+
"@mcp-abap-adt/interfaces-adt-connection": "^2.0.0",
|
|
55
55
|
"@mcp-abap-adt/interfaces-auth": "^7.5.0",
|
|
56
56
|
"@mcp-abap-adt/interfaces-auth-sap": "^3.3.0",
|
|
57
|
-
"@mcp-abap-adt/interfaces-network": "^2.0.
|
|
58
|
-
"@mcp-abap-adt/interfaces-utils": "^1.1.
|
|
57
|
+
"@mcp-abap-adt/interfaces-network": "^2.0.1",
|
|
58
|
+
"@mcp-abap-adt/interfaces-utils": "^1.1.1",
|
|
59
59
|
"axios": "^1.16.0"
|
|
60
60
|
},
|
|
61
61
|
"optionalDependencies": {
|
|
62
|
-
"@mcp-abap-adt/sap-rfc-lite": "^0.2.
|
|
62
|
+
"@mcp-abap-adt/sap-rfc-lite": "^0.2.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@biomejs/biome": "^2.3.14",
|
|
66
|
-
"@mcp-abap-adt/auth-providers": "^6.0.
|
|
66
|
+
"@mcp-abap-adt/auth-providers": "^6.0.2",
|
|
67
67
|
"@types/jest": "^30.0.0",
|
|
68
68
|
"@types/node": "^25.2.3",
|
|
69
69
|
"dotenv": "^17.3.1",
|