@mcp-abap-adt/proxy 4.1.1 → 4.2.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,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.2.0] - 2026-09-24
11
+
12
+ ### Added
13
+
14
+ - **`host` on `proxy_start`**, and the config's `httpHost` is honoured. The
15
+ default when neither says anything is still `127.0.0.1`.
16
+
17
+ It was ignored, on the reasoning that a proxy a model started should not be
18
+ network-reachable. That reasoning does not hold: loopback is a default, not a
19
+ boundary — anything with a shell can forward a port, so refusing to bind
20
+ elsewhere stopped only the honest case. What the default still does is keep a
21
+ proxy nobody asked to publish from becoming reachable without someone saying
22
+ so, which is worth a default and not worth a restriction.
23
+
24
+ Precedence, most specific first: the `host` argument, the config's `httpHost`,
25
+ then `127.0.0.1`.
26
+
10
27
  ## [4.1.1] - 2026-09-24
11
28
 
12
29
  ### Changed
@@ -41,7 +41,8 @@ Tools offered to the client:
41
41
  List the environments — one SAP system's credentials each,
42
42
  from sessions/. Variable NAMES only, never values.
43
43
  proxy_start Start a proxy from a config plus, when the config needs one,
44
- an environment. The config supplies
44
+ an environment. Binds 127.0.0.1 unless the config's httpHost or
45
+ a host argument says otherwise. The config supplies
45
46
  the destination, target URL, default headers and timeouts;
46
47
  the PORT does not come from it — a free one is bound, so
47
48
  several proxies can run at once, and the URL returned is the
@@ -35,6 +35,15 @@ export interface StartOptions {
35
35
  idleTimeoutMs?: number;
36
36
  /** How long a stop waits for requests in flight. See DEFAULT_STOP_GRACE_MS. */
37
37
  stopGraceMs?: number;
38
+ /**
39
+ * What to bind, ahead of the config's `httpHost` and the loopback default.
40
+ *
41
+ * Loopback is a default, not a boundary: anything with a shell can forward a
42
+ * port, so refusing to bind elsewhere stopped only the honest case. What the
43
+ * default still does is keep a proxy nobody asked to publish from becoming
44
+ * reachable without someone saying so.
45
+ */
46
+ host?: string;
38
47
  }
39
48
  export interface StartedInstance {
40
49
  instanceId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../src/mcp/supervisor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAY,KAAK,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEhF,gDAAgD;AAChD,eAAO,MAAM,uBAAuB,QAAiB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,MAAM,EAAE,WAAW,CAAC;IACpB,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAoBD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,eAAe;IAKd,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJpC,O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B"}
@@ -98,9 +98,11 @@ class ProxySupervisor {
98
98
  // filesystem used to reject `start()` while leaving the listener bound, the
99
99
  // credential held, the instance in `owned` and no idle timer to ever reach
100
100
  // it — a proxy running that nobody had been told about.
101
+ // Most specific first: this call, then the config, then the default.
102
+ const host = options.host ?? options.config.httpHost ?? this.host;
101
103
  let port;
102
104
  try {
103
- port = await (0, ports_js_1.listenOnFreePort)(server, this.host);
105
+ port = await (0, ports_js_1.listenOnFreePort)(server, host);
104
106
  }
105
107
  catch (error) {
106
108
  this.release(facade, server, 'listen failed');
@@ -110,7 +112,7 @@ class ProxySupervisor {
110
112
  instanceId,
111
113
  name: options.name,
112
114
  port,
113
- url: `http://${this.host}:${port}`,
115
+ url: `http://${host}:${port}`,
114
116
  destination: options.config.btpDestination ?? '(none)',
115
117
  startedAt: new Date().toISOString(),
116
118
  server,
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAGc,CAAC;AAE7C,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CACjE;AAMD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,eAAe,EAC3B,SAAS,GAAE,MAAyB,EACpC,MAAM,GAAE,MAAyB,GAChC,SAAS,EAAE,CAmMb"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAGc,CAAC;AAE7C,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CACjE;AAMD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,eAAe,EAC3B,SAAS,GAAE,MAAyB,EACpC,MAAM,GAAE,MAAyB,GAChC,SAAS,EAAE,CA0Mb"}
package/dist/mcp/tools.js CHANGED
@@ -93,6 +93,10 @@ function createProxyTools(supervisor, configDir = (0, configs_js_1.proxyConfigDi
93
93
  .string()
94
94
  .optional()
95
95
  .describe('Name of an environment, as proxy_environments lists it (for example "e19"). Supplies the ${VAR} values the config references. Needed when the config names no envFile of its own — proxy_configs marks those.'),
96
+ host: zod_1.z
97
+ .string()
98
+ .optional()
99
+ .describe('What to bind. Defaults to 127.0.0.1, or the config\u2019s httpHost when it names one. Use "0.0.0.0" to make the proxy reachable from other machines — say so deliberately, since a started proxy is otherwise local only.'),
96
100
  idleTimeoutMs: zod_1.z
97
101
  .number()
98
102
  .optional()
@@ -108,6 +112,7 @@ function createProxyTools(supervisor, configDir = (0, configs_js_1.proxyConfigDi
108
112
  const started = await supervisor.start({
109
113
  name,
110
114
  config: (0, config_js_1.loadConfig)(file, envFile),
115
+ host: args.host,
111
116
  idleTimeoutMs: args.idleTimeoutMs,
112
117
  });
113
118
  return text([
@@ -226,7 +226,13 @@ from `mcp-abap-adt-proxy` in exactly two ways, both deliberate:
226
226
  - **The port in the config is ignored.** A free one is bound instead and
227
227
  `proxy_start` reports the URL it got. Four of eight configs in practice declare
228
228
  `httpPort: 3001`, so honouring it is what made running two of them impossible.
229
- - **`httpHost` is ignored too**; the listener always binds `127.0.0.1`.
229
+ - **`httpHost` is honoured**, and `proxy_start` takes a `host` of its own that
230
+ wins over it. The default when neither says anything is `127.0.0.1`.
231
+
232
+ That default is a default, not a boundary: anything with a shell can forward a
233
+ port, so refusing to bind elsewhere only stopped the honest case. What it still
234
+ does is keep a proxy nobody asked to publish from becoming reachable without
235
+ someone saying so.
230
236
 
231
237
  Everything else — destination, `targetUrl`, `defaultHeaders`, `browser`,
232
238
  `browserAuthPort`, timeouts, `envFile` interpolation — comes from the config as
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/proxy",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "MCP proxy server for SAP ABAP ADT - proxies local requests to cloud-llm-hub with JWT authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",