@mcp-abap-adt/connection 17.1.0 → 18.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 CHANGED
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [18.0.0] - 2026-10-16
11
+
12
+ Migrating from 17.x: [docs/MIGRATION-18.0.md](./docs/MIGRATION-18.0.md).
13
+
14
+ ### Added
15
+
16
+ - **RFC through a message server and a logon group.** With `mshost` in the config,
17
+ `rfcParamsFrom` / `rfcConversationFrom` dial the message server: `mshost`, `msserv` or
18
+ `sysid` (one is required; a config with neither is refused naming both), and `group`
19
+ (default `PUBLIC`), passed to the SAP NW RFC SDK as its own keys. The url then gives no host
20
+ and no system number, and `SAP_SYSNR` is not read. `saprouter` is carried with either
21
+ addressing. Needs `@mcp-abap-adt/interfaces-auth-sap` ^3.4.0, which adds those `ISapConfig` fields; the dependency is raised to it.
22
+ - `RfcMessageServerParams` and `RfcAddress` (`RfcConnectionParams | RfcMessageServerParams`)
23
+ are exported; `RfcConnectionParams` gains an optional `saprouter`.
24
+ - **Not yet run against a live message server.** The address follows the SDK's own parameters
25
+ and is unit-tested; `mshost` + `msserv` without `sysid` is accepted but unconfirmed. If the SDK
26
+ refuses it, add `sysid`. The gated integration test covers it on a system that has one.
27
+
28
+ ### Changed (breaking)
29
+
30
+ - **`rfcParamsFrom` returns `RfcAddress`** instead of `RfcConnectionParams`. Nothing changes at
31
+ run time for a config without `mshost`, but a caller that read `.ashost` / `.sysnr` straight
32
+ from the result no longer compiles: narrow first (`'ashost' in params`). See the migration note.
33
+
10
34
  ## [17.1.0] - 2026-10-13
11
35
 
12
36
  What this package answers for is listed in [docs/SCOPE.md](./docs/SCOPE.md).
@@ -2648,7 +2672,8 @@ const connection = createAbapConnection(config, logger);
2648
2672
  - JWT token refresh now properly handles connection errors (401/403 during initial connect)
2649
2673
  - Permission errors (403 with "ExceptionResourceNoAccess") no longer trigger JWT refresh loops
2650
2674
  - Proper separation: base class handles HTTP/session, concrete classes handle auth-specific errors
2651
- [Unreleased]: https://github.com/fr0ster/mcp-abap-connection/compare/v17.1.0...HEAD
2675
+ [Unreleased]: https://github.com/fr0ster/mcp-abap-connection/compare/v18.0.0...HEAD
2676
+ [18.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v17.1.0...v18.0.0
2652
2677
  [17.1.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v17.0.0...v17.1.0
2653
2678
  [17.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v16.0.0...v17.0.0
2654
2679
  [16.0.0]: https://github.com/fr0ster/mcp-abap-connection/compare/v15.1.0...v16.0.0
package/README.md CHANGED
@@ -161,6 +161,7 @@ the packages above. See [Migration to 9.0.0](./docs/MIGRATION-9.0.md).
161
161
 
162
162
  - 📦 **[Installation Guide](./docs/INSTALLATION.md)** - Setup and installation instructions
163
163
  - 📚 **[Usage Guide](./docs/USAGE.md)** - Detailed usage examples and API documentation
164
+ - 🚚 **[Migration to 18.0.0](./docs/MIGRATION-18.0.md)** - `rfcParamsFrom` returns `RfcAddress` (application server or message server): narrow before reading `.ashost` / `.sysnr`; RFC through a message server and a logon group (`mshost`, `msserv` | `sysid`, `group`, `saprouter`)
164
165
  - 🚚 **[Migration to 17.0.0](./docs/MIGRATION-17.0.md)** - no deadline of the package's own: `getTimeout`, `getTimeoutConfig` and `SAP_TIMEOUT_*` are gone, and a request inside a critical section carries none at all; an instance can be built on an existing session (`session`, `sessionCookies()`)
165
166
  - 🚚 **[Migration to 16.0.0](./docs/MIGRATION-16.0.md)** - the per-request `signal` (15.1.0) and `ADT_REQUEST_ABORTED` are removed; `disconnect()` resolves once the logoff is written, not answered — a process about to exit awaits it; `flushGoodbye()` when the answer matters
166
167
  - 🚚 **[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
@@ -817,9 +818,17 @@ which `connect()` then takes over instead of logging on.
817
818
 
818
819
  #### `rfcConversationFrom(config)`
819
820
 
820
- What `RfcTransport` is constructed with. Derives `ashost` from the url and
821
- `sysnr` from the HTTP port by the SAP convention that `80XX` is the ICM port for
822
- system `XX`, which `SAP_SYSNR` overrides for a port that follows no convention.
821
+ What `RfcTransport` is constructed with. The address is one of two:
822
+
823
+ - **One application server** (default): `ashost` from the url and `sysnr` from
824
+ the HTTP port by the SAP convention that `80XX` is the ICM port for system
825
+ `XX`, which `SAP_SYSNR` overrides for a port that follows no convention.
826
+ - **A message server and a logon group**, when the config states `mshost`: the
827
+ config's `mshost`, `msserv` or `sysid` (one of the two is required) and
828
+ `group` (default `PUBLIC`) go to the SDK as they are, and the url gives no
829
+ host or system number — the message server picks the application server.
830
+
831
+ `saprouter` goes with either.
823
832
 
824
833
  The SAP NW RFC SDK is loaded when a conversation opens, not when this is called,
825
834
  so a machine without it fails at `connect()` with a message saying what to
@@ -829,7 +838,8 @@ install rather than at construction.
829
838
  function rfcConversationFrom(
830
839
  config: SapConfig,
831
840
  ): (logon: Readonly<Record<string, string>>) => IRfcConversation;
832
- function rfcParamsFrom(config: SapConfig): RfcConnectionParams; // the address only
841
+ function rfcParamsFrom(config: SapConfig): RfcAddress; // the address only
842
+ // RfcAddress = RfcConnectionParams (ashost, sysnr) | RfcMessageServerParams (mshost, msserv | sysid, group)
833
843
  ```
834
844
 
835
845
  ```typescript
@@ -15,27 +15,51 @@
15
15
  import type { SapConfig } from '../config/sapConfig.js';
16
16
  import type { IRfcConversation } from './RfcTransport.js';
17
17
  /**
18
- * Where the native client dials. What it logs on with is not here: the
19
- * provider writes that at each logon (`user`/`passwd`, or the SNC keys), and
20
- * the factory spreads it over these.
18
+ * Where the native client dials: one application server. What it logs on with
19
+ * is not here: the provider writes that at each logon (`user`/`passwd`, or the
20
+ * SNC keys), and the factory spreads it over these.
21
21
  */
22
22
  export interface RfcConnectionParams {
23
23
  ashost: string;
24
24
  sysnr: string;
25
25
  client: string;
26
26
  lang: string;
27
+ saprouter?: string;
27
28
  }
29
+ /**
30
+ * Where the native client dials: a message server, which picks an application
31
+ * server of the logon group (load-balanced logon). The keys are the SAP NW RFC
32
+ * SDK's own; one of `msserv` and `sysid` names the message server's service.
33
+ */
34
+ export interface RfcMessageServerParams {
35
+ mshost: string;
36
+ msserv?: string;
37
+ sysid?: string;
38
+ group: string;
39
+ client: string;
40
+ lang: string;
41
+ saprouter?: string;
42
+ }
43
+ /** One application server, or a message server and a logon group. */
44
+ export type RfcAddress = RfcConnectionParams | RfcMessageServerParams;
28
45
  /**
29
46
  * Read out of the config, never asked of the server.
30
47
  *
31
- * The system number comes off the HTTP port by the SAP convention that 80XX is
32
- * the ICM port for system XX — the convention the port itself follows, not a
33
- * guess about the deployment. `SAP_SYSNR` overrides it for a port that follows
34
- * no convention, which is the case on a system reached through 50400.
48
+ * **A message server**, when the config states `mshost`: the SDK needs the
49
+ * message server's service, so `msserv` or `sysid` must be there too, and the
50
+ * logon group is `group` or SAP's default `PUBLIC`. `url` then gives no host
51
+ * and no system number — the message server chooses the application server.
52
+ *
53
+ * **One application server** otherwise: the host comes off `url`, and the
54
+ * system number off the HTTP port by the SAP convention that 80XX is the ICM
55
+ * port for system XX — the convention the port itself follows, not a guess
56
+ * about the deployment. `SAP_SYSNR` overrides it for a port that follows no
57
+ * convention, which is the case on a system reached through 50400.
35
58
  *
36
- * The address only: no username or password is read from the config.
59
+ * `saprouter` goes with either. The address only: no username or password is
60
+ * read from the config.
37
61
  */
38
- export declare function rfcParamsFrom(config: SapConfig): RfcConnectionParams;
62
+ export declare function rfcParamsFrom(config: SapConfig): RfcAddress;
39
63
  /**
40
64
  * The factory `RfcTransport` asks for: the logon parameters the provider wrote
41
65
  * for this open go in, spread over the address from the config.
@@ -1 +1 @@
1
- {"version":3,"file":"rfcConversation.d.ts","sourceRoot":"","sources":["../../src/connection/rfcConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,mBAAmB,CAepE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,GAChB,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,gBAAgB,CAoB/D"}
1
+ {"version":3,"file":"rfcConversation.d.ts","sourceRoot":"","sources":["../../src/connection/rfcConversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAEtE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAsC3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,GAChB,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,gBAAgB,CAoB/D"}
@@ -19,16 +19,39 @@ exports.rfcConversationFrom = rfcConversationFrom;
19
19
  /**
20
20
  * Read out of the config, never asked of the server.
21
21
  *
22
- * The system number comes off the HTTP port by the SAP convention that 80XX is
23
- * the ICM port for system XX — the convention the port itself follows, not a
24
- * guess about the deployment. `SAP_SYSNR` overrides it for a port that follows
25
- * no convention, which is the case on a system reached through 50400.
22
+ * **A message server**, when the config states `mshost`: the SDK needs the
23
+ * message server's service, so `msserv` or `sysid` must be there too, and the
24
+ * logon group is `group` or SAP's default `PUBLIC`. `url` then gives no host
25
+ * and no system number — the message server chooses the application server.
26
26
  *
27
- * The address only: no username or password is read from the config.
27
+ * **One application server** otherwise: the host comes off `url`, and the
28
+ * system number off the HTTP port by the SAP convention that 80XX is the ICM
29
+ * port for system XX — the convention the port itself follows, not a guess
30
+ * about the deployment. `SAP_SYSNR` overrides it for a port that follows no
31
+ * convention, which is the case on a system reached through 50400.
32
+ *
33
+ * `saprouter` goes with either. The address only: no username or password is
34
+ * read from the config.
28
35
  */
29
36
  function rfcParamsFrom(config) {
37
+ const client = config.client || '000';
38
+ const router = config.saprouter ? { saprouter: config.saprouter } : {};
39
+ if (config.mshost) {
40
+ if (!config.msserv && !config.sysid) {
41
+ throw new Error('An RFC conversation through a message server needs msserv or sysid beside mshost');
42
+ }
43
+ return {
44
+ mshost: config.mshost,
45
+ ...(config.msserv ? { msserv: config.msserv } : {}),
46
+ ...(config.sysid ? { sysid: config.sysid } : {}),
47
+ group: config.group || 'PUBLIC',
48
+ client,
49
+ lang: 'EN',
50
+ ...router,
51
+ };
52
+ }
30
53
  if (!config.url) {
31
- throw new Error('An RFC conversation needs a url to take its host from');
54
+ throw new Error('An RFC conversation needs a url to take its host from, or mshost for a message server');
32
55
  }
33
56
  const parsed = new URL(config.url);
34
57
  const port = Number.parseInt(parsed.port || '8000', 10);
@@ -36,8 +59,9 @@ function rfcParamsFrom(config) {
36
59
  return {
37
60
  ashost: parsed.hostname,
38
61
  sysnr: process.env.SAP_SYSNR?.trim() || derived,
39
- client: config.client || '000',
62
+ client,
40
63
  lang: 'EN',
64
+ ...router,
41
65
  };
42
66
  }
43
67
  /**
package/dist/index.d.ts CHANGED
@@ -14,6 +14,6 @@ export type { IAdtEstablishContext, IAdtSessionContext, IAdtTransport, IAdtTrans
14
14
  export { LegacyOnPremHttpTransport } from './connection/LegacyOnPremHttpTransport.js';
15
15
  export { OnPremHttpTransport } from './connection/OnPremHttpTransport.js';
16
16
  export { type IRfcConversation, type IRfcTransportOptions, RfcTransport, } from './connection/RfcTransport.js';
17
- export { type RfcConnectionParams, rfcConversationFrom, rfcParamsFrom, } from './connection/rfcConversation.js';
17
+ export { type RfcAddress, type RfcConnectionParams, type RfcMessageServerParams, rfcConversationFrom, rfcParamsFrom, } from './connection/rfcConversation.js';
18
18
  export type { ILogger } from './logger.js';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAK1C,YAAY,EACV,WAAW,EACX,SAAS,EACT,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE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UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,mBAAmB,EACnB,aAAa,GACd,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
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-18.0.md # rfcParamsFrom returns RfcAddress; RFC through a message server
18
19
  │ ├── MIGRATION-17.0.md # no deadline of the package's own; an instance on an existing session
19
20
  │ ├── MIGRATION-16.0.md # the request signal removed; disconnect() resolves once the logoff is written
20
21
  │ ├── MIGRATION-15.0.md # interfaces-adt-connection 2: makeAdtRequest answers unknown
@@ -48,6 +49,7 @@ mcp-abap-connection/
48
49
  - 🧭 [Scope](./SCOPE.md) - What this package answers for, and only that
49
50
 
50
51
  ### Upgrading
52
+ - 🚚 [Migrating to 18.0.0](./MIGRATION-18.0.md) - `rfcParamsFrom` returns `RfcAddress`; RFC through a message server and a logon group
51
53
  - 🚚 [Migrating to 17.0.0](./MIGRATION-17.0.md) - `getTimeout`, `getTimeoutConfig` and `SAP_TIMEOUT_*` are gone; a request carries only the caller's `timeout`, and none inside a critical section; `createConnection({ …, session })` and `sessionCookies()`
52
54
  - 🚚 [Migrating to 16.0.0](./MIGRATION-16.0.md) - the per-request `signal` and `ADT_REQUEST_ABORTED` are removed; `disconnect()` resolves once the logoff is written; `flushGoodbye()` waits for the answer
53
55
  - 🚚 [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
@@ -0,0 +1,53 @@
1
+ # Migration to 18.0
2
+
3
+ 18.0.0 adds RFC logon through a message server and a logon group
4
+ (load-balanced logon). For a consumer on 17.x, the change is confined to the
5
+ types of one function.
6
+
7
+ ## What changed
8
+
9
+ - **`rfcParamsFrom(config)` returns `RfcAddress`.** That is
10
+ `RfcConnectionParams | RfcMessageServerParams`; before, it returned
11
+ `RfcConnectionParams`.
12
+ - A config with `mshost` yields a message-server address:
13
+ `{ mshost, msserv?, sysid?, group, client, lang, saprouter? }`.
14
+ - Any other config yields the application-server address as before:
15
+ `{ ashost, sysnr, client, lang, saprouter? }`.
16
+ - At run time nothing changes for a config without `mshost`. The break is in
17
+ the type: code that read `.ashost` or `.sysnr` straight off the result no
18
+ longer compiles.
19
+ - **New exported types:** `RfcAddress`, `RfcMessageServerParams`.
20
+ - **`RfcConnectionParams`** gains an optional `saprouter`.
21
+ - **`@mcp-abap-adt/interfaces-auth-sap` ^3.4.0** is required. It adds the
22
+ `ISapConfig` fields `mshost`, `msserv`, `sysid`, `group` and `saprouter`.
23
+
24
+ ## What to do
25
+
26
+ If you call `rfcParamsFrom` and read its fields, narrow first:
27
+
28
+ ```typescript
29
+ const params = rfcParamsFrom(config);
30
+ if ('ashost' in params) {
31
+ // one application server: params.ashost, params.sysnr
32
+ } else {
33
+ // a message server: params.mshost, params.msserv / params.sysid, params.group
34
+ }
35
+ ```
36
+
37
+ If you only pass the config to `rfcConversationFrom` or `createConnection`,
38
+ there is nothing to do.
39
+
40
+ ## Using a message server
41
+
42
+ Add `mshost`, plus `msserv` or `sysid` (one of the two is required), and
43
+ `group` (default `PUBLIC`) to the config. `saprouter` works with either
44
+ addressing. The url is still the system's ADT URL, but the RFC wire takes no
45
+ host and no system number from it, and `SAP_SYSNR` is not read.
46
+
47
+ **Verification status.** The message-server address follows the SAP NW RFC SDK's
48
+ own connection parameters, and it is unit-tested. It has **not yet been run
49
+ against a live message server**. In particular, `mshost` + `msserv` without
50
+ `sysid` is accepted here, but no SDK documentation found so far confirms that
51
+ combination. If the SDK refuses it, add `sysid`. The gated integration test in
52
+ `src/__tests__/rfc-connection.test.ts` (`SAP_MSHOST`, plus `SAP_MSSERV` or
53
+ `SAP_SYSID`) runs it on a system that has one.
package/docs/SCOPE.md CHANGED
@@ -12,7 +12,7 @@
12
12
  session is alive. The cookies of the instance's session are readable (`sessionCookies()`),
13
13
  for the caller to keep.
14
14
  3. **Requests.** Each carries the credential the `IAuthProvider` hands over, the CSRF token
15
- and the session's cookies. A request is sent stateful (`LOCK`, `UNLOCK`, activation) or
15
+ and the session's cookies. A request is sent stateful (`LOCK`, `UNLOCK`) or
16
16
  stateless; nothing else of the session is kept between requests. A request carries no
17
17
  deadline but the caller's own timeout.
18
18
  4. **SAP's answer** reaches the caller as SAP gave it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/connection",
3
- "version": "17.1.0",
3
+ "version": "18.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",
@@ -53,7 +53,7 @@
53
53
  "@mcp-abap-adt/auth-errors": "^2.2.1",
54
54
  "@mcp-abap-adt/interfaces-adt-connection": "^3.0.0",
55
55
  "@mcp-abap-adt/interfaces-auth": "^7.5.0",
56
- "@mcp-abap-adt/interfaces-auth-sap": "^3.3.0",
56
+ "@mcp-abap-adt/interfaces-auth-sap": "^3.4.0",
57
57
  "@mcp-abap-adt/interfaces-network": "^2.0.1",
58
58
  "@mcp-abap-adt/interfaces-utils": "^1.1.1",
59
59
  "axios": "^1.16.0"