@mcp-abap-adt/compact-http 19.1.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.
package/README.md CHANGED
@@ -4,14 +4,16 @@ The compact MCP server for SAP ABAP ADT over **Streamable HTTP**: one tool per o
4
4
  `object_type` — 29 tools instead of hundreds, for a host that cannot build a retrieval pipeline
5
5
  of its own.
6
6
 
7
- It is [`@mcp-abap-adt/http`](https://www.npmjs.com/package/@mcp-abap-adt/http)'s launcher with the
7
+ It is [`@mcp-abap-adt/http`](https://www.npmjs.com/package/@mcp-abap-adt/http)'s launcher — the one in
8
+ [`@mcp-abap-adt/server-runtime`](https://www.npmjs.com/package/@mcp-abap-adt/server-runtime) — with the
8
9
  compact tool set and nothing else: the same options, the same credentials, the same failures and
9
10
  shutdown as `mcp-abap-adt-http`; only the tools differ. The 17 that change nothing alone are
10
11
  [`@mcp-abap-adt/compact-http-ro`](https://www.npmjs.com/package/@mcp-abap-adt/compact-http-ro)
11
12
  (`mcp-abap-adt-compact-http-ro`): the binary fixes the tool set (19.0.0). stdio is
12
13
  [`@mcp-abap-adt/compact`](https://www.npmjs.com/package/@mcp-abap-adt/compact), the other HTTP
13
- transport `@mcp-abap-adt/compact-sse`. It does not depend on
14
- `@mcp-abap-adt/core`: no auth broker, no stores, no destination, no login.
14
+ transport `@mcp-abap-adt/compact-sse`. It depends on no other server package
15
+ (not on `@mcp-abap-adt/http`, not on `@mcp-abap-adt/core`) and serves no destination and no login;
16
+ `@mcp-abap-adt/auth-broker` and `auth-stores` come with `server-runtime` but are never loaded.
15
17
 
16
18
  ## Running it
17
19
 
@@ -25,11 +27,30 @@ There is no `--transport`: a binary is its transport.
25
27
 
26
28
  **The low set's analogue.** The low set left the full binaries in 19.0.0; its single-step operations are compact's: `HandlerLock`, `HandlerUpdate` with the `lock_handle` it answered (one request: the write alone, under your lock; `lock_handle` is required; for PACKAGE, DOMAIN, DATA_ELEMENT and FUNCTION_GROUP `source_code` is the whole metadata document, sent as given), `HandlerUnlock`, `HandlerDeletionCheck` (the one deletion check, SAP's verdict as it came), `HandlerDelete` (one request: the deletion request alone, with no lock held on the object; a class include and `UNIT_TEST` are written empty by one `PUT` under your class lock's `lock_handle`), `HandlerCheckRun`, `HandlerValidate`, `HandlerActivate` (one request: one object of a type the per-object activation maps answers its verdict; every other call starts an activation run and answers `{ run_id }`), and `HandlerGet` — one request per part: `source` the source alone, `metadata` the metadata document alone (PACKAGE, DOMAIN, DATA_ELEMENT and FUNCTION_GROUP have only `metadata`; a function module is named `GROUP|MODULE` or with `function_group_name`), and `object_structure` / `node_structure` / `virtual_folders` (a package's blank node structure is the empty listing with `blank`: an empty package, or no package of that name), and `activation_status` / `activation_results` (an activation run by its `run_id`: its status, then its messages — asking again until the status settles is yours), and `object_type` `UNIT_TEST` / `CDS_UNIT_TEST` (a unit-test run's result by its `run_id`, one request, as `HandlerUnitTestResult` / `HandlerCdsUnitTestResult` read it; the status is `HandlerUnitTestStatus` / `HandlerCdsUnitTestStatus`, asked until it says `FINISHED`). **Keeping a lock from `HandlerLock` short is your job:** the server releases nothing on its own clock — unlock as soon as the write is done. The tool-by-tool table: [MIGRATION-19.0](https://github.com/fr0ster/mcp-abap-adt/blob/main/docs/MIGRATION-19.0.md#the-low-set-leaves-the-full-binaries).
27
29
 
28
- **Credentials** come only from each request's `x-sap-*` headers — `x-sap-url`, `x-sap-client`, and `x-sap-jwt-token` or `x-sap-login` with `x-sap-password`; nothing is stored, shared or cached across requests. Held state (a debug session, a lock taken with `HandlerLock`) is reached again with its `state_handle` on the pooled instance that holds it: `HandlerLock` answers it, and `HandlerUpdate`, `HandlerDelete` of a class include and `HandlerUnlock` under that lock send it in the `x-mcp-state-handle` header — without it they are refused, sending nothing. A request with the same credential headers works on the instance's held SAP session; another credential retires it. A request without them is answered `400`; so is one
30
+ **Credentials** come only from each request's `x-sap-*` headers — `x-sap-url`, `x-sap-client`, and `x-sap-jwt-token` or `x-sap-login` with `x-sap-password`; nothing is stored, shared or cached across requests. Held state (a long session, a debug session, a batch, a lock taken with `HandlerLock`) is reached again with its `state_handle` on the pooled instance that holds it: send it as the `state_handle` argument, which every tool of this binary declares (or in the `x-mcp-state-handle` header; when both are sent, the header wins). `HandlerLock` answers it, and `HandlerUpdate`, `HandlerDelete` of a class include and `HandlerUnlock` under that lock send it — without it they reach another instance and are refused, sending nothing. A request with another credential (a renewed token, a new user and password) works on the held instance too: its SAP session and its locks are kept, and the new credential is put in force for its next sends; what SAP answers to it reaches the caller as it came. A request without credential headers is answered `400`; so is one
29
31
  carrying `x-mcp-destination` (destinations are served only by `mcp-abap-adt`, stdio).
30
32
 
33
+ **The long session: `HandlerSession`.** Every request is served by a new instance unless it
34
+ carries the `state_handle` of one that holds state. `HandlerSession` `action: 'open'` keeps an
35
+ instance and its SAP connection and answers `{ "state_handle": "…" }`: every call carrying it runs
36
+ on that instance, on its held SAP session — no new connection, no `systeminformation` lookup, no
37
+ logoff between the calls; a call without it runs on a new instance. Opened with the handle of an
38
+ instance that already holds state (a lock, a batch, a debug session), it answers that same handle
39
+ and keeps what is held; opened without one, it is a new instance with a handle of its own.
40
+ `action: 'close'` with the handle answers `{ "closed": true, "held": { "locks": …, "batch": …,
41
+ "debug_session": … } }`, and once that answer is written the instance leaves the pool and is
42
+ closed: every SAP session it owns is logged off, which releases the locks taken in it; an open
43
+ batch and its recorded calls are dropped unsent; the MCP server closes. The handle then answers
44
+ `state is not available` at once; the close awaits each logoff's write and its answer, with no
45
+ timer of the server's. Close without a handle, or with an unknown one, answers `state is not
46
+ available`. A session never closed ends at the idle bound (`--state-idle-minutes`, default 30)
47
+ between two calls: its state ends and every SAP session of the instance is logged off. There is no list tool: the model keeps its handles.
48
+ The handle is a bearer secret — the server does not identify the caller. `HandlerSession` changes
49
+ nothing in the system, so `mcp-abap-adt-compact-http-ro` serves it too; in batch mode it runs at
50
+ once and is never recorded — open leaves the batch open, close drops it.
51
+
31
52
  **The tools are fixed by the binary**: all 29, the four debugger tools (`HandlerDebugBreakpoints`,
32
- `HandlerDebugSession`, `HandlerDebugStep`, `HandlerDebugMaintain`), the debugger batch (`HandlerDebugBatch`), the background-run tools and `HandlerBatch` — 38. `--exposition` (`ro`, `rw`, `debug`, any word) and a config file's
53
+ `HandlerDebugSession`, `HandlerDebugStep`, `HandlerDebugMaintain`), the debugger batch (`HandlerDebugBatch`), the background-run tools, `HandlerBatch` and the long session (`HandlerSession`) — 39. `--exposition` (`ro`, `rw`, `debug`, any word) and a config file's
33
54
  `exposition` stop the start, naming the binary to install instead
34
55
  (`mcp-abap-adt-compact-http-ro` for `ro`). No leftover-session tool and no runtime session file: one server holds the sessions of many
35
56
  users, so those are the stdio binaries' (`mcp-abap-adt-compact`, `mcp-abap-adt-compact-ro`); resuming
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * mcp-abap-adt-compact-http — the compact MCP ABAP ADT server over Streamable HTTP.
5
5
  *
6
- * `@mcp-abap-adt/http`'s launcher with the compact tool set, started in this
6
+ * `@mcp-abap-adt/server-runtime/http`'s launcher with the compact tool set, started in this
7
7
  * process.
8
8
  */
9
9
  const { main } = require('../dist/launcher.js');
package/dist/index.d.ts CHANGED
@@ -5,7 +5,8 @@
5
5
  * 29 tools instead of 370: one per operation, with the object in `object_type`,
6
6
  * composed of `@mcp-abap-adt/compact-readonly-entries` and `@mcp-abap-adt/compact-modify`
7
7
  * by `compactToolSetOf` of `@mcp-abap-adt/lib/tool-set`, served by
8
- * `@mcp-abap-adt/http`'s launcher. stdio is `@mcp-abap-adt/compact`.
8
+ * the Streamable HTTP launcher of `@mcp-abap-adt/server-runtime` (the one
9
+ * `mcp-abap-adt-http` runs). stdio is `@mcp-abap-adt/compact`.
9
10
  */
10
11
  export { COMPACT_HTTP_VERSION, compactToolSet, main } from './launcher';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -8,7 +8,8 @@ exports.main = exports.compactToolSet = exports.COMPACT_HTTP_VERSION = void 0;
8
8
  * 29 tools instead of 370: one per operation, with the object in `object_type`,
9
9
  * composed of `@mcp-abap-adt/compact-readonly-entries` and `@mcp-abap-adt/compact-modify`
10
10
  * by `compactToolSetOf` of `@mcp-abap-adt/lib/tool-set`, served by
11
- * `@mcp-abap-adt/http`'s launcher. stdio is `@mcp-abap-adt/compact`.
11
+ * the Streamable HTTP launcher of `@mcp-abap-adt/server-runtime` (the one
12
+ * `mcp-abap-adt-http` runs). stdio is `@mcp-abap-adt/compact`.
12
13
  */
13
14
  var launcher_1 = require("./launcher");
14
15
  Object.defineProperty(exports, "COMPACT_HTTP_VERSION", { enumerable: true, get: function () { return launcher_1.COMPACT_HTTP_VERSION; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,uCAAwE;AAA/D,gHAAA,oBAAoB,OAAA;AAAE,0GAAA,cAAc,OAAA;AAAE,gGAAA,IAAI,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,uCAAwE;AAA/D,gHAAA,oBAAoB,OAAA;AAAE,0GAAA,cAAc,OAAA;AAAE,gGAAA,IAAI,OAAA"}
@@ -1,6 +1,6 @@
1
- import { main as httpMain } from '@mcp-abap-adt/http/launcher';
2
1
  import { type LauncherEdges } from '@mcp-abap-adt/lib/config';
3
2
  import { type ToolSet } from '@mcp-abap-adt/lib/tool-set';
3
+ import { main as httpMain } from '@mcp-abap-adt/server-runtime/http';
4
4
  /** The compact tool set: both halves, the debugger and background runs. */
5
5
  export declare const compactToolSet: ToolSet;
6
6
  /**
@@ -8,5 +8,7 @@ export declare const compactToolSet: ToolSet;
8
8
  * file read: a bundler (the portable build) inlines it.
9
9
  */
10
10
  export declare const COMPACT_HTTP_VERSION: string;
11
+ /** THIS package's name, from the same manifest: what a second copy of lib asks to reinstall. */
12
+ export declare const COMPACT_HTTP_PACKAGE: string;
11
13
  export declare function main(edges?: LauncherEdges): ReturnType<typeof httpMain>;
12
14
  //# sourceMappingURL=launcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE5E,2EAA2E;AAC3E,eAAO,MAAM,cAAc,EAAE,OAG3B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAE1B,CAAC;AAEV,wBAAgB,IAAI,CAClB,KAAK,GAAE,aAA8B,GACpC,UAAU,CAAC,OAAO,QAAQ,CAAC,CAS7B"}
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAErE,2EAA2E;AAC3E,eAAO,MAAM,cAAc,EAAE,OAG3B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAE1B,CAAC;AAEV,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,EAAE,MAE7B,CAAC;AAEP,wBAAgB,IAAI,CAClB,KAAK,GAAE,aAA8B,GACpC,UAAU,CAAC,OAAO,QAAQ,CAAC,CAU7B"}
package/dist/launcher.js CHANGED
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPACT_HTTP_VERSION = exports.compactToolSet = void 0;
3
+ exports.COMPACT_HTTP_PACKAGE = exports.COMPACT_HTTP_VERSION = exports.compactToolSet = void 0;
4
4
  exports.main = main;
5
5
  /**
6
6
  * `mcp-abap-adt-compact-http` — the compact tool set over Streamable HTTP.
7
7
  *
8
- * `@mcp-abap-adt/http`'s `main` with `compactToolSet` — the two halves' entry
8
+ * The runtime's Streamable HTTP `main` with `compactToolSet` — the two halves' entry
9
9
  * builders composed by lib's `compactToolSetOf` — and this command's name and
10
10
  * version. Nothing else: http's table, and
11
- * http's credentials, cancellation, failures and shutdown. It depends on lib,
12
- * http and the two halves only: never on core, so neither the auth broker nor
13
- * the stores are installed with it.
11
+ * http's credentials, cancellation, failures and shutdown. The launcher is
12
+ * `@mcp-abap-adt/server-runtime/http`'s; the package depends on lib, the runtime,
13
+ * background-runs-memory, responsible-rules and the two halves, never on another binary package.
14
14
  */
15
15
  const compact_modify_1 = require("@mcp-abap-adt/compact-modify");
16
16
  const compact_readonly_entries_1 = require("@mcp-abap-adt/compact-readonly-entries");
17
- const launcher_1 = require("@mcp-abap-adt/http/launcher");
18
17
  const config_1 = require("@mcp-abap-adt/lib/config");
19
18
  const tool_set_1 = require("@mcp-abap-adt/lib/tool-set");
19
+ const http_1 = require("@mcp-abap-adt/server-runtime/http");
20
20
  /** The compact tool set: both halves, the debugger and background runs. */
21
21
  exports.compactToolSet = (0, tool_set_1.compactToolSetOf)({
22
22
  readOnly: compact_readonly_entries_1.compactReadOnlyEntries,
@@ -27,11 +27,14 @@ exports.compactToolSet = (0, tool_set_1.compactToolSetOf)({
27
27
  * file read: a bundler (the portable build) inlines it.
28
28
  */
29
29
  exports.COMPACT_HTTP_VERSION = require('../package.json').version;
30
+ /** THIS package's name, from the same manifest: what a second copy of lib asks to reinstall. */
31
+ exports.COMPACT_HTTP_PACKAGE = require('../package.json').name;
30
32
  function main(edges = (0, config_1.processEdges)()) {
31
- return (0, launcher_1.main)({
33
+ return (0, http_1.main)({
32
34
  toolSet: exports.compactToolSet,
33
35
  program: 'mcp-abap-adt-compact-http',
34
36
  version: exports.COMPACT_HTTP_VERSION,
37
+ packageName: exports.COMPACT_HTTP_PACKAGE,
35
38
  }, edges);
36
39
  }
37
40
  //# sourceMappingURL=launcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":";;;AA8BA,oBAWC;AAzCD;;;;;;;;;GASG;AACH,iEAAoE;AACpE,qFAAgF;AAChF,0DAA+D;AAC/D,qDAA4E;AAC5E,yDAA4E;AAE5E,2EAA2E;AAC9D,QAAA,cAAc,GAAY,IAAA,2BAAgB,EAAC;IACtD,QAAQ,EAAE,iDAAsB;IAChC,MAAM,EAAE,qCAAoB;CAC7B,CAAC,CAAC;AAEH;;;GAGG;AACU,QAAA,oBAAoB,GAC/B,OAAO,CAAC,iBAAiB,CAC1B,CAAC,OAAO,CAAC;AAEV,SAAgB,IAAI,CAClB,QAAuB,IAAA,qBAAY,GAAE;IAErC,OAAO,IAAA,eAAQ,EACb;QACE,OAAO,EAAE,sBAAc;QACvB,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE,4BAAoB;KAC9B,EACD,KAAK,CACN,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":";;;AAmCA,oBAYC;AA/CD;;;;;;;;;GASG;AACH,iEAAoE;AACpE,qFAAgF;AAChF,qDAA4E;AAC5E,yDAA4E;AAC5E,4DAAqE;AAErE,2EAA2E;AAC9D,QAAA,cAAc,GAAY,IAAA,2BAAgB,EAAC;IACtD,QAAQ,EAAE,iDAAsB;IAChC,MAAM,EAAE,qCAAoB;CAC7B,CAAC,CAAC;AAEH;;;GAGG;AACU,QAAA,oBAAoB,GAC/B,OAAO,CAAC,iBAAiB,CAC1B,CAAC,OAAO,CAAC;AAEV,gGAAgG;AACnF,QAAA,oBAAoB,GAC/B,OAAO,CAAC,iBAAiB,CAC1B,CAAC,IAAI,CAAC;AAEP,SAAgB,IAAI,CAClB,QAAuB,IAAA,qBAAY,GAAE;IAErC,OAAO,IAAA,WAAQ,EACb;QACE,OAAO,EAAE,sBAAc;QACvB,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE,4BAAoB;QAC7B,WAAW,EAAE,4BAAoB;KAClC,EACD,KAAK,CACN,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/compact-http",
3
3
  "mcpName": "io.github.fr0ster/mcp-abap-adt-compact-http",
4
- "version": "19.1.0",
4
+ "version": "20.0.0",
5
5
  "description": "The compact MCP server for SAP ABAP ADT over Streamable HTTP: one tool per operation with the object in the arguments — 28 tools instead of 370 — with credentials only from the x-sap-* headers of each request. No auth broker, no stores.",
6
6
  "license": "AGPL-3.0-only",
7
7
  "publishConfig": {
@@ -51,17 +51,19 @@
51
51
  },
52
52
  "scripts": {
53
53
  "prebuild": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
54
- "build": "npx tsc -p tsconfig.json",
54
+ "build": "tsc -p tsconfig.json",
55
55
  "test": "npm --prefix .. test -- --roots compact-http/src",
56
- "lint:check": "npx biome check src",
56
+ "lint:check": "biome check src",
57
57
  "prepublishOnly": "npm run build",
58
58
  "start": "node ./bin/mcp-abap-adt-compact-http.js"
59
59
  },
60
60
  "dependencies": {
61
- "@mcp-abap-adt/compact-modify": "^19.1.0",
62
- "@mcp-abap-adt/compact-readonly-entries": "^19.1.0",
63
- "@mcp-abap-adt/http": "^19.1.0",
64
- "@mcp-abap-adt/lib": "^19.1.0"
61
+ "@mcp-abap-adt/background-runs-memory": "^20.0.0",
62
+ "@mcp-abap-adt/compact-modify": "^20.0.0",
63
+ "@mcp-abap-adt/compact-readonly-entries": "^20.0.0",
64
+ "@mcp-abap-adt/lib": "^20.0.0",
65
+ "@mcp-abap-adt/responsible-rules": "^20.0.0",
66
+ "@mcp-abap-adt/server-runtime": "^20.0.0"
65
67
  },
66
68
  "devDependencies": {
67
69
  "typescript": "^6.0.2",