@mcp-abap-adt/connection 19.0.0 → 20.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 (33) hide show
  1. package/CHANGELOG.md +138 -1
  2. package/README.md +91 -25
  3. package/dist/config/sapConfig.d.ts +6 -1
  4. package/dist/config/sapConfig.d.ts.map +1 -1
  5. package/dist/config/sapConfig.js +11 -0
  6. package/dist/connection/AbstractAbapConnection.d.ts +8 -2
  7. package/dist/connection/AbstractAbapConnection.d.ts.map +1 -1
  8. package/dist/connection/AbstractAbapConnection.js +17 -8
  9. package/dist/connection/CloudHttpTransport.js +2 -2
  10. package/dist/connection/CredentialAbapConnection.d.ts.map +1 -1
  11. package/dist/connection/CredentialAbapConnection.js +0 -1
  12. package/dist/connection/HttpTransport.d.ts +91 -20
  13. package/dist/connection/HttpTransport.d.ts.map +1 -1
  14. package/dist/connection/HttpTransport.js +235 -46
  15. package/dist/connection/IAdtTransport.d.ts +3 -2
  16. package/dist/connection/IAdtTransport.d.ts.map +1 -1
  17. package/dist/connection/createConnection.d.ts +20 -4
  18. package/dist/connection/createConnection.d.ts.map +1 -1
  19. package/dist/connection/createConnection.js +45 -28
  20. package/dist/connection/rfcConversation.d.ts +25 -25
  21. package/dist/connection/rfcConversation.d.ts.map +1 -1
  22. package/dist/connection/rfcConversation.js +24 -45
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +2 -1
  26. package/docs/INDEX.md +2 -0
  27. package/docs/INSTALLATION.md +7 -1
  28. package/docs/MIGRATION-18.0.md +2 -0
  29. package/docs/MIGRATION-20.0.md +121 -0
  30. package/docs/MIGRATION-6.0.md +2 -0
  31. package/docs/STATEFUL_SESSION_GUIDE.md +8 -0
  32. package/docs/USAGE.md +53 -14
  33. package/package.json +14 -19
@@ -6,8 +6,9 @@
6
6
  * code path on one end cannot be named in a type — a default type parameter has
7
7
  * nothing to point at — so this is what makes the two ends symmetrical.
8
8
  *
9
- * Nothing to open or give back at this level. A request opens its own socket
10
- * and there is no conversation to establish; `open()` only offers the
9
+ * Nothing to open or give back at this level. A request takes a socket from
10
+ * the wire's pool (see `sendPooled()`), no socket is the session, and there is
11
+ * no conversation to establish; `open()` only offers the
11
12
  * credential its logon, and the subclasses add the session mechanism.
12
13
  *
13
14
  * **Where the two axes touch.** TLS client-certificate material comes from the
@@ -18,20 +19,46 @@
18
19
  * not the credential). Material that changes between logons drops the client;
19
20
  * the cookie jar and the CSRF token are the session's and stay.
20
21
  */
21
- import { type ClientRequest, type IncomingMessage, type RequestOptions } from 'node:http';
22
- import { type AgentOptions } from 'node:https';
22
+ import { type ClientRequest, Agent as HttpAgent, type IncomingMessage, type RequestOptions } from 'node:http';
23
+ import { Agent, type AgentOptions } from 'node:https';
23
24
  import type { ILogonTarget } from '@mcp-abap-adt/interfaces-auth';
25
+ import { type AxiosInstance } from 'axios';
24
26
  import type { ILogger } from '../logger.js';
25
27
  import { type IAdtEstablishContext, type IAdtSessionContext, type IAdtTransport, type IAdtTransportRequest, type IAdtTransportResponse } from './IAdtTransport.js';
26
28
  export { isStatefulRequest } from './statefulRequest.js';
29
+ /** What an HTTP wire builds its client from: its two pooled agents. */
30
+ export interface HttpClientAgents {
31
+ httpAgent: HttpAgent;
32
+ httpsAgent: Agent;
33
+ }
34
+ /**
35
+ * How an HTTP wire reaches the network: the axios instance every request goes
36
+ * through, built from the wire's agents (built anew when a logon offers other
37
+ * TLS material), and the node request a logoff goes out on — the seam where
38
+ * its write is seen. `nodeHttpClient` is the shipped one; a consumer or a test
39
+ * hands its own to the constructor (`httpClient`).
40
+ */
41
+ export interface HttpClientFactory {
42
+ create(agents: HttpClientAgents): AxiosInstance;
43
+ logoffRequest(options: RequestOptions, onResponse: (response: IncomingMessage) => void): ClientRequest;
44
+ }
45
+ /** axios over the wire's agents, and node's own `http` / `https` for a logoff. */
46
+ export declare const nodeHttpClient: HttpClientFactory;
27
47
  export declare class HttpTransport implements IAdtTransport {
28
48
  private readonly agentOptions;
29
49
  protected readonly logger: ILogger | null;
30
50
  /**
31
- * The SAP client (mandant) every request on this wire addresses, from the
32
- * first one on: the establishing call is where the session and its CSRF
33
- * token are issued, so a client applied any later is applied to a session
34
- * that already lives in another one. See `clientHeaders()`.
51
+ * `client`: the SAP client (mandant) every request on this wire
52
+ * addresses, from the first one on: the establishing call is where the
53
+ * session and its CSRF token are issued, so a client applied any later is
54
+ * applied to a session that already lives in another one. See
55
+ * `clientHeaders()`.
56
+ *
57
+ * `baseUrl`: the system this wire addresses, required. A path a caller
58
+ * sends is put on it; every request the wire originates itself — the
59
+ * CSRF fetch, the cloud preflight, the logoff — goes to its origin.
60
+ *
61
+ * `httpClient`: how the wire reaches the network. Absent: `nodeHttpClient`.
35
62
  */
36
63
  private readonly options;
37
64
  /**
@@ -46,6 +73,12 @@ export declare class HttpTransport implements IAdtTransport {
46
73
  */
47
74
  readonly kind: string;
48
75
  private instance;
76
+ /**
77
+ * The agents that open a socket for one request and keep none — the
78
+ * logoff's, and the resend's after a pooled socket died. Built with the
79
+ * client, from the same options.
80
+ */
81
+ private fresh;
49
82
  /**
50
83
  * The TLS material the last logon offered. The client is built from it, and
51
84
  * a logon offering different material drops the client — never the jar.
@@ -65,17 +98,34 @@ export declare class HttpTransport implements IAdtTransport {
65
98
  private combined;
66
99
  private appServer;
67
100
  private token;
68
- constructor(agentOptions?: () => AgentOptions, logger?: ILogger | null,
101
+ constructor(agentOptions: (() => AgentOptions) | undefined, logger: (ILogger | null) | undefined,
69
102
  /**
70
- * The SAP client (mandant) every request on this wire addresses, from the
71
- * first one on: the establishing call is where the session and its CSRF
72
- * token are issued, so a client applied any later is applied to a session
73
- * that already lives in another one. See `clientHeaders()`.
103
+ * `client`: the SAP client (mandant) every request on this wire
104
+ * addresses, from the first one on: the establishing call is where the
105
+ * session and its CSRF token are issued, so a client applied any later is
106
+ * applied to a session that already lives in another one. See
107
+ * `clientHeaders()`.
108
+ *
109
+ * `baseUrl`: the system this wire addresses, required. A path a caller
110
+ * sends is put on it; every request the wire originates itself — the
111
+ * CSRF fetch, the cloud preflight, the logoff — goes to its origin.
112
+ *
113
+ * `httpClient`: how the wire reaches the network. Absent: `nodeHttpClient`.
74
114
  */
75
- options?: {
115
+ options: {
76
116
  client?: string;
77
- baseUrl?: string;
117
+ baseUrl: string;
118
+ httpClient?: HttpClientFactory;
78
119
  });
120
+ /**
121
+ * The system's origin: where the wire's own requests go — the CSRF fetch,
122
+ * the session check, the cloud preflight, the logoff — whatever path the
123
+ * configured URL carries. The same base the connection's `getBaseUrl()`
124
+ * answers.
125
+ */
126
+ protected origin(): string;
127
+ /** The base URL without a trailing slash, for a caller's path to be put on. */
128
+ protected base(): string;
79
129
  /**
80
130
  * Fold a response into the wire state.
81
131
  *
@@ -341,13 +391,34 @@ export declare class HttpTransport implements IAdtTransport {
341
391
  /** Called once the request's bytes are on the socket. */
342
392
  written?: () => void): Promise<IAdtTransportResponse>;
343
393
  /**
344
- * The node request a logoff goes out on — the seam where its write is seen.
345
- *
346
- * A test replaces it to hold a request's socket shut; the wire uses node's
347
- * own `http` / `https`, as axios would with redirects off. The logoff's
348
- * answer is not read, so not following a redirect changes nothing.
394
+ * The node request a logoff goes out on — the seam where its write is seen:
395
+ * the `httpClient`'s, node's own `http` / `https` by default, as axios would
396
+ * use with redirects off. The logoff's answer is not read, so not following a
397
+ * redirect changes nothing.
349
398
  */
350
399
  protected logoffRequest(options: RequestOptions, onResponse: (response: IncomingMessage) => void): ClientRequest;
400
+ /** The agent a logoff goes out on: never a pooled one. */
401
+ private goodbyeAgent;
402
+ /**
403
+ * One request, sent once more — on a new connection — in exactly one case,
404
+ * a named exception to "no retries": it went out on a socket taken from the
405
+ * pool, and that socket ended with no byte of an answer (`ECONNRESET` —
406
+ * "socket hang up" — or `EPIPE`). A server closes an idle kept-alive
407
+ * connection when it likes, and a request written onto it as it closes is
408
+ * lost unread; left alone, a cleanup `UNLOCK` dies so and the enqueue lock
409
+ * stays with the session until SM12 (mcp-abap-adt#314). The session is the
410
+ * cookies', not the socket's (measured on an on-premise system, 2026-10-23:
411
+ * an `UNLOCK` on a new connection with the same cookies and handle released
412
+ * the lock), so the resend carries the same config — the same cookies,
413
+ * session headers, CSRF token and body.
414
+ *
415
+ * Never resent: a request on a socket opened for it, one that read any byte
416
+ * of an answer, one after a redirect, one with a stream body, and the resend
417
+ * itself — it goes on a fresh agent, so its failure is the caller's error.
418
+ * The risk, stated: a server that read the request and died before a byte of
419
+ * its answer would run it twice.
420
+ */
421
+ private sendPooled;
351
422
  private dispatch;
352
423
  }
353
424
  //# sourceMappingURL=HttpTransport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/HttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAS,KAAK,YAAY,EAA2B,MAAM,YAAY,CAAC;AAE/E,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE3B,MAAM,oBAAoB,CAAC;AAiE5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAwFzD,qBAAa,aAAc,YAAW,aAAa;IAsC/C,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IACzC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO;IA7C1B;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,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AAM,EAAE,MAAM,CAAC,CAAC;KACjC;IACD,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,IAAI,GACnB,OAAO,CAAC,IAAI,CAAC;IAyChB;;;;;OAKG;IACG,IAAI,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKzE;;;;;;OAMG;IACH,OAAO,CAAC,GAAG;IAmBX;;;;;;;;;;;;;;OAcG;cACa,YAAY,CAC1B,OAAO,EAAE,oBAAoB;IAC7B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,GACnB,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;OAKG;IACH,SAAS,CAAC,aAAa,CACrB,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,GAC9C,aAAa;IAOhB,0DAA0D;IAC1D,OAAO,CAAC,YAAY;IAOpB;;;;;;;;;;;;;;;;;;OAkBG;YACW,UAAU;YA+BV,QAAQ;CAgEvB"}
@@ -7,8 +7,9 @@
7
7
  * code path on one end cannot be named in a type — a default type parameter has
8
8
  * nothing to point at — so this is what makes the two ends symmetrical.
9
9
  *
10
- * Nothing to open or give back at this level. A request opens its own socket
11
- * and there is no conversation to establish; `open()` only offers the
10
+ * Nothing to open or give back at this level. A request takes a socket from
11
+ * the wire's pool (see `sendPooled()`), no socket is the session, and there is
12
+ * no conversation to establish; `open()` only offers the
12
13
  * credential its logon, and the subclasses add the session mechanism.
13
14
  *
14
15
  * **Where the two axes touch.** TLS client-certificate material comes from the
@@ -23,7 +24,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
24
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
25
  };
25
26
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.HttpTransport = exports.isStatefulRequest = void 0;
27
+ exports.HttpTransport = exports.nodeHttpClient = exports.isStatefulRequest = void 0;
28
+ const node_async_hooks_1 = require("node:async_hooks");
27
29
  const node_crypto_1 = require("node:crypto");
28
30
  const node_http_1 = require("node:http");
29
31
  const node_https_1 = require("node:https");
@@ -34,6 +36,108 @@ const authErrors_js_1 = require("./authErrors.js");
34
36
  const csrfConfig_js_1 = require("./csrfConfig.js");
35
37
  const IAdtTransport_js_1 = require("./IAdtTransport.js");
36
38
  const statefulRequest_js_1 = require("./statefulRequest.js");
39
+ /**
40
+ * The pool every request of the wire goes through: the options of Node's own
41
+ * global agents (`node -p "http.globalAgent.options"`), which plain `http:`
42
+ * used before the wire had an agent of its own for it — kept-alive sockets,
43
+ * the most recently freed taken first, an idle one closed after 5 s.
44
+ */
45
+ const POOLED = {
46
+ keepAlive: true,
47
+ scheduling: 'lifo',
48
+ timeout: 5000,
49
+ };
50
+ /**
51
+ * Which dispatch a request belongs to. Node hands a request to its agent
52
+ * (`addRequest()`) inside the `ClientRequest` constructor, so in the async
53
+ * context of the dispatch that made it.
54
+ */
55
+ const pooledAttempts = new node_async_hooks_1.AsyncLocalStorage();
56
+ /**
57
+ * The sockets that have carried a request. A socket is reused when it is in
58
+ * here as a request gets it — whether the agent took it from its free list
59
+ * (`reuseSocket()`) or handed it straight from a finished request to a queued
60
+ * one, which bypasses `reuseSocket()` (a caller's `maxSockets`).
61
+ */
62
+ const carried = new WeakSet();
63
+ function bytesReadOf(socket) {
64
+ const bytesRead = socket.bytesRead;
65
+ return typeof bytesRead === 'number' ? bytesRead : -1;
66
+ }
67
+ function noteRequest(request) {
68
+ const attempt = pooledAttempts.getStore();
69
+ request.once('socket', (socket) => {
70
+ const reused = carried.has(socket);
71
+ carried.add(socket);
72
+ if (attempt !== undefined) {
73
+ attempt.sent = { socket, reused, bytesRead: bytesReadOf(socket) };
74
+ }
75
+ });
76
+ }
77
+ /**
78
+ * Sees every request the agent is given. `addRequest()` is Node's own entry
79
+ * of an agent (every `ClientRequest` with an agent calls it); not in the
80
+ * typings, so reached through this one cast.
81
+ */
82
+ function seeRequests(agent) {
83
+ const target = agent;
84
+ const add = target.addRequest;
85
+ target.addRequest = function addRequest(request, options) {
86
+ noteRequest(request);
87
+ add.call(this, request, options);
88
+ };
89
+ }
90
+ class PooledHttpAgent extends node_http_1.Agent {
91
+ constructor(options) {
92
+ super(options);
93
+ seeRequests(this);
94
+ }
95
+ }
96
+ class PooledHttpsAgent extends node_https_1.Agent {
97
+ constructor(options) {
98
+ super(options);
99
+ seeRequests(this);
100
+ }
101
+ }
102
+ /** The codes of a socket that ended before an answer: "socket hang up" is `ECONNRESET`. */
103
+ const UNANSWERED_CODES = new Set(['ECONNRESET', 'EPIPE']);
104
+ function codeOf(error) {
105
+ if (typeof error !== 'object' || error === null)
106
+ return undefined;
107
+ try {
108
+ return error.code;
109
+ }
110
+ catch {
111
+ return undefined;
112
+ }
113
+ }
114
+ /**
115
+ * Whether a failed dispatch is the one case resent: it went out on a socket
116
+ * taken from the pool, no redirect was followed, and the socket ended with no
117
+ * byte of an answer read — the server had closed the idle connection while
118
+ * the request was being written onto it.
119
+ */
120
+ function diedOnPooledSocket(error, attempt) {
121
+ const sent = attempt.sent;
122
+ if (sent === undefined || !sent.reused || attempt.redirected === true) {
123
+ return false;
124
+ }
125
+ if (sent.bytesRead < 0 || bytesReadOf(sent.socket) !== sent.bytesRead) {
126
+ return false;
127
+ }
128
+ if (typeof error === 'object' && error !== null && 'response' in error) {
129
+ if (error.response !== undefined)
130
+ return false;
131
+ }
132
+ const code = codeOf(error);
133
+ return typeof code === 'string' && UNANSWERED_CODES.has(code);
134
+ }
135
+ /** A body that can be written a second time: not a stream. */
136
+ function resendable(data) {
137
+ if (typeof data !== 'object' || data === null)
138
+ return true;
139
+ return typeof data.pipe !== 'function';
140
+ }
37
141
  /**
38
142
  * Whether a `Set-Cookie`'s attributes delete it: `Max-Age` of zero or less, or
39
143
  * an `Expires` already in the past — SAP's own deletions are the latter
@@ -153,6 +257,13 @@ function sameMaterial(a, b) {
153
257
  return Buffer.from(left).equals(Buffer.from(right));
154
258
  });
155
259
  }
260
+ /** axios over the wire's agents, and node's own `http` / `https` for a logoff. */
261
+ exports.nodeHttpClient = {
262
+ create: (agents) => axios_1.default.create(agents),
263
+ logoffRequest: (options, onResponse) => options.protocol === 'https:'
264
+ ? (0, node_https_1.request)(options, onResponse)
265
+ : (0, node_http_1.request)(options, onResponse),
266
+ };
156
267
  /**
157
268
  * Whether the server certificate is verified: yes, as Node does, unless told
158
269
  * otherwise in so many words.
@@ -187,6 +298,12 @@ class HttpTransport {
187
298
  */
188
299
  kind = 'http';
189
300
  instance = null;
301
+ /**
302
+ * The agents that open a socket for one request and keep none — the
303
+ * logoff's, and the resend's after a pooled socket died. Built with the
304
+ * client, from the same options.
305
+ */
306
+ fresh = null;
190
307
  /**
191
308
  * The TLS material the last logon offered. The client is built from it, and
192
309
  * a logon offering different material drops the client — never the jar.
@@ -208,16 +325,38 @@ class HttpTransport {
208
325
  token = null;
209
326
  constructor(agentOptions = () => ({}), logger = null,
210
327
  /**
211
- * The SAP client (mandant) every request on this wire addresses, from the
212
- * first one on: the establishing call is where the session and its CSRF
213
- * token are issued, so a client applied any later is applied to a session
214
- * that already lives in another one. See `clientHeaders()`.
328
+ * `client`: the SAP client (mandant) every request on this wire
329
+ * addresses, from the first one on: the establishing call is where the
330
+ * session and its CSRF token are issued, so a client applied any later is
331
+ * applied to a session that already lives in another one. See
332
+ * `clientHeaders()`.
333
+ *
334
+ * `baseUrl`: the system this wire addresses, required. A path a caller
335
+ * sends is put on it; every request the wire originates itself — the
336
+ * CSRF fetch, the cloud preflight, the logoff — goes to its origin.
337
+ *
338
+ * `httpClient`: how the wire reaches the network. Absent: `nodeHttpClient`.
215
339
  */
216
- options = {}) {
340
+ options) {
217
341
  this.agentOptions = agentOptions;
218
342
  this.logger = logger;
219
343
  this.options = options;
220
344
  }
345
+ /**
346
+ * The system's origin: where the wire's own requests go — the CSRF fetch,
347
+ * the session check, the cloud preflight, the logoff — whatever path the
348
+ * configured URL carries. The same base the connection's `getBaseUrl()`
349
+ * answers.
350
+ */
351
+ origin() {
352
+ return new URL(this.options.baseUrl).origin;
353
+ }
354
+ /** The base URL without a trailing slash, for a caller's path to be put on. */
355
+ base() {
356
+ return this.options.baseUrl.endsWith('/')
357
+ ? this.options.baseUrl.slice(0, -1)
358
+ : this.options.baseUrl;
359
+ }
221
360
  /**
222
361
  * Fold a response into the wire state.
223
362
  *
@@ -313,9 +452,7 @@ class HttpTransport {
313
452
  this.forgetSession();
314
453
  throw new Error('The session handed over names no SAP_SESSIONID, so there is no session to take over; nothing was sent.');
315
454
  }
316
- const base = context.baseUrl.endsWith('/')
317
- ? context.baseUrl.slice(0, -1)
318
- : context.baseUrl;
455
+ const base = this.origin();
319
456
  const endpoints = [
320
457
  `${base}${csrfConfig_js_1.CSRF_CONFIG.ENDPOINT}`,
321
458
  `${base}${csrfConfig_js_1.CSRF_CONFIG.FALLBACK_ENDPOINT}`,
@@ -500,9 +637,7 @@ class HttpTransport {
500
637
  // move the session out from under a lock taken against the first.
501
638
  if (this.token)
502
639
  return;
503
- const base = context.baseUrl.endsWith('/')
504
- ? context.baseUrl.slice(0, -1)
505
- : context.baseUrl;
640
+ const base = this.origin();
506
641
  const endpoints = [
507
642
  `${base}${csrfConfig_js_1.CSRF_CONFIG.ENDPOINT}`,
508
643
  // BASIS < 7.52 has no /sap/bc/adt/core/discovery.
@@ -769,12 +904,9 @@ class HttpTransport {
769
904
  }
770
905
  /** A path becomes an address; anything already absolute is left alone. */
771
906
  address(url) {
772
- if (!url.startsWith('/') || !this.options.baseUrl)
907
+ if (!url.startsWith('/'))
773
908
  return url;
774
- const base = this.options.baseUrl.endsWith('/')
775
- ? this.options.baseUrl.slice(0, -1)
776
- : this.options.baseUrl;
777
- return `${base}${url}`;
909
+ return `${this.base()}${url}`;
778
910
  }
779
911
  /**
780
912
  * What this wire says to a provider at a logon.
@@ -811,13 +943,19 @@ class HttpTransport {
811
943
  this.saidUnverified = true;
812
944
  this.logger?.debug('TLS: the server certificate is not verified (explicit opt-out)');
813
945
  }
814
- this.instance = axios_1.default.create({
815
- httpsAgent: new node_https_1.Agent({
816
- ...options,
817
- rejectUnauthorized,
818
- ...this.material,
819
- }),
946
+ // Both schemes pool their sockets, `https:` as plain `http:` always
947
+ // has: a TLS handshake per request is what keep-alive saves. The
948
+ // caller's `agentOptions` and the TLS material win over the pool's
949
+ // options — `keepAlive: false` there turns the pool off for `https:`.
950
+ const tls = { ...options, rejectUnauthorized, ...this.material };
951
+ this.instance = (this.options.httpClient ?? exports.nodeHttpClient).create({
952
+ httpAgent: new PooledHttpAgent(POOLED),
953
+ httpsAgent: new PooledHttpsAgent({ ...POOLED, ...tls }),
820
954
  });
955
+ this.fresh = {
956
+ http: new node_http_1.Agent({ keepAlive: false }),
957
+ https: new node_https_1.Agent({ ...tls, keepAlive: false }),
958
+ };
821
959
  }
822
960
  return this.instance;
823
961
  }
@@ -850,7 +988,7 @@ class HttpTransport {
850
988
  * cookies were refused with 401 right after it, accepted before).
851
989
  */
852
990
  async sendIcfLogoff(context, snapshot, written) {
853
- await this.sendLogoff(context, `${context.baseUrl}${ICF_LOGOFF_PATH}`, { ...snapshot, session: {} }, written);
991
+ await this.sendLogoff(context, `${this.origin()}${ICF_LOGOFF_PATH}`, { ...snapshot, session: {} }, written);
854
992
  }
855
993
  /**
856
994
  * The logoff, sent as Eclipse ADT 3.60.3 sends it when a project is closed.
@@ -957,21 +1095,71 @@ class HttpTransport {
957
1095
  return this.dispatch(request, { ...request.headers }, written);
958
1096
  }
959
1097
  /**
960
- * The node request a logoff goes out on — the seam where its write is seen.
961
- *
962
- * A test replaces it to hold a request's socket shut; the wire uses node's
963
- * own `http` / `https`, as axios would with redirects off. The logoff's
964
- * answer is not read, so not following a redirect changes nothing.
1098
+ * The node request a logoff goes out on — the seam where its write is seen:
1099
+ * the `httpClient`'s, node's own `http` / `https` by default, as axios would
1100
+ * use with redirects off. The logoff's answer is not read, so not following a
1101
+ * redirect changes nothing.
965
1102
  */
966
1103
  logoffRequest(options, onResponse) {
967
- return options.protocol === 'https:'
968
- ? (0, node_https_1.request)(options, onResponse)
969
- : (0, node_http_1.request)(options, onResponse);
1104
+ return (this.options.httpClient ?? exports.nodeHttpClient).logoffRequest(options, onResponse);
1105
+ }
1106
+ /** The agent a logoff goes out on: never a pooled one. */
1107
+ goodbyeAgent(options) {
1108
+ const agent = options.agent;
1109
+ if (agent instanceof PooledHttpsAgent)
1110
+ return this.fresh?.https ?? false;
1111
+ if (agent instanceof PooledHttpAgent)
1112
+ return this.fresh?.http ?? false;
1113
+ return agent === undefined || agent === null ? false : agent;
1114
+ }
1115
+ /**
1116
+ * One request, sent once more — on a new connection — in exactly one case,
1117
+ * a named exception to "no retries": it went out on a socket taken from the
1118
+ * pool, and that socket ended with no byte of an answer (`ECONNRESET` —
1119
+ * "socket hang up" — or `EPIPE`). A server closes an idle kept-alive
1120
+ * connection when it likes, and a request written onto it as it closes is
1121
+ * lost unread; left alone, a cleanup `UNLOCK` dies so and the enqueue lock
1122
+ * stays with the session until SM12 (mcp-abap-adt#314). The session is the
1123
+ * cookies', not the socket's (measured on an on-premise system, 2026-10-23:
1124
+ * an `UNLOCK` on a new connection with the same cookies and handle released
1125
+ * the lock), so the resend carries the same config — the same cookies,
1126
+ * session headers, CSRF token and body.
1127
+ *
1128
+ * Never resent: a request on a socket opened for it, one that read any byte
1129
+ * of an answer, one after a redirect, one with a stream body, and the resend
1130
+ * itself — it goes on a fresh agent, so its failure is the caller's error.
1131
+ * The risk, stated: a server that read the request and died before a byte of
1132
+ * its answer would run it twice.
1133
+ */
1134
+ async sendPooled(config) {
1135
+ const attempt = {};
1136
+ try {
1137
+ return await pooledAttempts.run(attempt, () => this.client()({
1138
+ ...config,
1139
+ beforeRedirect: () => {
1140
+ attempt.redirected = true;
1141
+ },
1142
+ }));
1143
+ }
1144
+ catch (error) {
1145
+ const fresh = this.fresh;
1146
+ if (fresh === null ||
1147
+ !resendable(config.data) ||
1148
+ !diedOnPooledSocket(error, attempt)) {
1149
+ throw error;
1150
+ }
1151
+ this.logger?.debug('HTTP: a pooled connection closed before any answer; the request is sent once more on a new connection');
1152
+ return this.client()({
1153
+ ...config,
1154
+ httpAgent: fresh.http,
1155
+ httpsAgent: fresh.https,
1156
+ });
1157
+ }
970
1158
  }
971
1159
  async dispatch(request, headers, written,
972
1160
  /** `maxRedirects: 0` for the adoption probe alone; see `resume()`. */
973
1161
  redirects) {
974
- const response = await this.client()({
1162
+ const config = {
975
1163
  ...(redirects ?? {}),
976
1164
  // The write is the point `disconnect()` resolves at: the request's
977
1165
  // `finish`, emitted once its bytes are handed to the socket — not when
@@ -980,17 +1168,13 @@ class HttpTransport {
980
1168
  ? {
981
1169
  transport: {
982
1170
  request: (options, onResponse) => {
983
- // A socket of its own: with no agent of the wire's (plain
984
- // `http:` — the TLS material's agent and a proxy's are kept),
985
- // node would take a pooled keep-alive socket, whose write can
1171
+ // A socket of its own: a pooled keep-alive socket's write can
986
1172
  // succeed after the server closed it, losing the logoff after
987
- // `finish`. `agent: false` opens a fresh connection, and node
988
- // sends `Connection: close` on it. Over `https:` the wire's
989
- // own agent keeps no socket alive unless the caller's
990
- // `agentOptions` say `keepAlive: true`.
991
- const outgoing = this.logoffRequest(options.agent === undefined
992
- ? { ...options, agent: false }
993
- : options, onResponse);
1173
+ // `finish`. The wire's fresh agents open a new connection and
1174
+ // keep none (node sends `Connection: close` on it) — over
1175
+ // `https:` with the pool's TLS options. A proxy's agent is
1176
+ // kept; with no agent at all, `agent: false` does the same.
1177
+ const outgoing = this.logoffRequest({ ...options, agent: this.goodbyeAgent(options) }, onResponse);
994
1178
  outgoing.once('finish', written);
995
1179
  return outgoing;
996
1180
  },
@@ -1011,7 +1195,12 @@ class HttpTransport {
1011
1195
  ...(request.validateStatus !== undefined
1012
1196
  ? { validateStatus: request.validateStatus }
1013
1197
  : {}),
1014
- });
1198
+ };
1199
+ // A logoff opens a socket of its own and is never resent: its answer is
1200
+ // not read, and its write is what `disconnect()` resolves at.
1201
+ const response = written !== undefined
1202
+ ? await this.client()(config)
1203
+ : await this.sendPooled(config);
1015
1204
  return {
1016
1205
  status: response.status,
1017
1206
  statusText: response.statusText,
@@ -76,10 +76,11 @@ export interface IAdtTransportResponse {
76
76
  * session is one request, and one that is retried is one the caller cannot
77
77
  * reason about — a second session may already be open by the time the first
78
78
  * answer arrives.
79
+ *
80
+ * No address: a wire that addresses a server (HTTP) was handed its base URL
81
+ * at construction, and one that does not (RFC) has none to be handed.
79
82
  */
80
83
  export interface IAdtSessionContext {
81
- /** The server, for a wire that addresses one. */
82
- baseUrl: string;
83
84
  /**
84
85
  * Fill the credential into a request the wire itself originates — the CSRF
85
86
  * fetch, the cloud preflight. Not the logoff: it carries the session's cookie
@@ -1 +1 @@
1
- {"version":3,"file":"IAdtTransport.d.ts","sourceRoot":"","sources":["../../src/connection/IAdtTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gEAAgE;AAChE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;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