@mcp-abap-adt/core 19.0.0 → 19.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/README.md +13 -1
- package/bin/mcp-abap-adt.js +7 -2
- package/dist/auth/index.d.ts +5 -12
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +20 -34
- package/dist/auth/index.js.map +1 -1
- package/dist/coreVersion.d.ts +2 -12
- package/dist/coreVersion.d.ts.map +1 -1
- package/dist/coreVersion.js +5 -2
- package/dist/coreVersion.js.map +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -17
- package/dist/index.js.map +1 -1
- package/dist/launcher.d.ts +18 -134
- package/dist/launcher.d.ts.map +1 -1
- package/dist/launcher.js +32 -689
- package/dist/launcher.js.map +1 -1
- package/package.json +5 -15
- package/dist/StdioServer.d.ts +0 -87
- package/dist/StdioServer.d.ts.map +0 -1
- package/dist/StdioServer.js +0 -132
- package/dist/StdioServer.js.map +0 -1
- package/dist/auth/IAuthBrokerFactory.d.ts +0 -62
- package/dist/auth/IAuthBrokerFactory.d.ts.map +0 -1
- package/dist/auth/IAuthBrokerFactory.js +0 -8
- package/dist/auth/IAuthBrokerFactory.js.map +0 -1
- package/dist/auth/IAuthBrokerFactoryConfig.d.ts +0 -90
- package/dist/auth/IAuthBrokerFactoryConfig.d.ts.map +0 -1
- package/dist/auth/IAuthBrokerFactoryConfig.js +0 -8
- package/dist/auth/IAuthBrokerFactoryConfig.js.map +0 -1
- package/dist/auth/brokerFactory.d.ts +0 -93
- package/dist/auth/brokerFactory.d.ts.map +0 -1
- package/dist/auth/brokerFactory.js +0 -341
- package/dist/auth/brokerFactory.js.map +0 -1
- package/dist/auth/browser.d.ts +0 -60
- package/dist/auth/browser.d.ts.map +0 -1
- package/dist/auth/browser.js +0 -116
- package/dist/auth/browser.js.map +0 -1
- package/dist/auth/countedProvider.d.ts +0 -43
- package/dist/auth/countedProvider.d.ts.map +0 -1
- package/dist/auth/countedProvider.js +0 -105
- package/dist/auth/countedProvider.js.map +0 -1
- package/dist/auth/destinationFailure.d.ts +0 -69
- package/dist/auth/destinationFailure.d.ts.map +0 -1
- package/dist/auth/destinationFailure.js +0 -183
- package/dist/auth/destinationFailure.js.map +0 -1
- package/dist/auth/destinationStores.d.ts +0 -55
- package/dist/auth/destinationStores.d.ts.map +0 -1
- package/dist/auth/destinationStores.js +0 -158
- package/dist/auth/destinationStores.js.map +0 -1
- package/dist/auth/handlers/basic.d.ts +0 -3
- package/dist/auth/handlers/basic.d.ts.map +0 -1
- package/dist/auth/handlers/basic.js +0 -8
- package/dist/auth/handlers/basic.js.map +0 -1
- package/dist/auth/handlers/index.d.ts +0 -15
- package/dist/auth/handlers/index.d.ts.map +0 -1
- package/dist/auth/handlers/index.js +0 -32
- package/dist/auth/handlers/index.js.map +0 -1
- package/dist/auth/handlers/jwtAuthorizationCode.d.ts +0 -8
- package/dist/auth/handlers/jwtAuthorizationCode.d.ts.map +0 -1
- package/dist/auth/handlers/jwtAuthorizationCode.js +0 -32
- package/dist/auth/handlers/jwtAuthorizationCode.js.map +0 -1
- package/dist/auth/handlers/snc.d.ts +0 -3
- package/dist/auth/handlers/snc.d.ts.map +0 -1
- package/dist/auth/handlers/snc.js +0 -14
- package/dist/auth/handlers/snc.js.map +0 -1
- package/dist/auth/handlers/types.d.ts +0 -30
- package/dist/auth/handlers/types.d.ts.map +0 -1
- package/dist/auth/handlers/types.js +0 -3
- package/dist/auth/handlers/types.js.map +0 -1
- package/dist/auth/serverLogin.d.ts +0 -75
- package/dist/auth/serverLogin.d.ts.map +0 -1
- package/dist/auth/serverLogin.js +0 -138
- package/dist/auth/serverLogin.js.map +0 -1
- package/dist/auth/serverSentences.d.ts +0 -39
- package/dist/auth/serverSentences.d.ts.map +0 -1
- package/dist/auth/serverSentences.js +0 -49
- package/dist/auth/serverSentences.js.map +0 -1
- package/dist/auth/vocabulary.d.ts +0 -28
- package/dist/auth/vocabulary.d.ts.map +0 -1
- package/dist/auth/vocabulary.js +0 -67
- package/dist/auth/vocabulary.js.map +0 -1
- package/dist/config/coreParameters.d.ts +0 -125
- package/dist/config/coreParameters.d.ts.map +0 -1
- package/dist/config/coreParameters.js +0 -331
- package/dist/config/coreParameters.js.map +0 -1
- package/dist/config/envFileContext.d.ts +0 -26
- package/dist/config/envFileContext.d.ts.map +0 -1
- package/dist/config/envFileContext.js +0 -90
- package/dist/config/envFileContext.js.map +0 -1
- package/dist/config/envResolver.d.ts +0 -6
- package/dist/config/envResolver.d.ts.map +0 -1
- package/dist/config/envResolver.js +0 -81
- package/dist/config/envResolver.js.map +0 -1
- package/dist/config/platformPaths.d.ts +0 -28
- package/dist/config/platformPaths.d.ts.map +0 -1
- package/dist/config/platformPaths.js +0 -152
- package/dist/config/platformPaths.js.map +0 -1
- package/dist/destinationSource.d.ts +0 -26
- package/dist/destinationSource.d.ts.map +0 -1
- package/dist/destinationSource.js +0 -43
- package/dist/destinationSource.js.map +0 -1
- package/dist/shutdown.d.ts +0 -97
- package/dist/shutdown.d.ts.map +0 -1
- package/dist/shutdown.js +0 -136
- package/dist/shutdown.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ Streamable HTTP and HTTP+SSE are packages of their own, serving credentials from
|
|
|
21
21
|
`x-sap-*` headers: [`@mcp-abap-adt/http`](https://www.npmjs.com/package/@mcp-abap-adt/http)
|
|
22
22
|
(`mcp-abap-adt-http`) and [`@mcp-abap-adt/sse`](https://www.npmjs.com/package/@mcp-abap-adt/sse)
|
|
23
23
|
(`mcp-abap-adt-sse`). There is no `--transport` option: it, and any option of those binaries, stops
|
|
24
|
-
this one naming the binary to run. Only
|
|
24
|
+
this one naming the binary to run. Only the stdio servers (this one, `compact`, `core-ro`,
|
|
25
|
+
`compact-ro`) load `@mcp-abap-adt/auth-broker` and `@mcp-abap-adt/auth-stores`.
|
|
25
26
|
|
|
26
27
|
It connects to the ABAP system over **HTTP** (basic or JWT), **RFC** (basic) or **SNC**
|
|
27
28
|
(passwordless, over RFC). HTTP needs nothing more. **RFC and SNC need the SAP NW RFC SDK, a C++
|
|
@@ -46,6 +47,17 @@ The tools themselves are not here. They live in
|
|
|
46
47
|
[`@mcp-abap-adt/lib`](https://www.npmjs.com/package/@mcp-abap-adt/lib), which
|
|
47
48
|
this package depends on.
|
|
48
49
|
|
|
50
|
+
**Where the code lives (19.2.0).** The launcher, `StdioServer` and the destination layer live in
|
|
51
|
+
[`@mcp-abap-adt/server-runtime`](https://www.npmjs.com/package/@mcp-abap-adt/server-runtime),
|
|
52
|
+
which is installed with this package; this package holds the `mcp-abap-adt` binary and its
|
|
53
|
+
version. Its exports are unchanged, as re-exports: `@mcp-abap-adt/core` of
|
|
54
|
+
`server-runtime/stdio/server` (its `StdioServer` answers core's version when constructed without
|
|
55
|
+
one), `@mcp-abap-adt/core/launcher` of `server-runtime/stdio` (its `main` and `launch` take
|
|
56
|
+
19.1.0's options, `{ toolSet, program, version }`: `packageName` — required on
|
|
57
|
+
`server-runtime/stdio` — is optional here and defaults to `@mcp-abap-adt/core`),
|
|
58
|
+
`@mcp-abap-adt/core/auth` of `server-runtime/auth`. No other server package depends on this one: `compact`, `core-ro` and
|
|
59
|
+
`compact-ro` run the same launcher from `server-runtime`, so each server is installed on its own.
|
|
60
|
+
|
|
49
61
|
## Licence
|
|
50
62
|
|
|
51
63
|
**AGPL-3.0-only.** See [`LICENSE`](LICENSE).
|
package/bin/mcp-abap-adt.js
CHANGED
|
@@ -11,15 +11,20 @@
|
|
|
11
11
|
* wired to the MCP protocol with no intermediate layer. It starts nothing on
|
|
12
12
|
* import: `main` is called here with the tool set this command serves, and a
|
|
13
13
|
* sibling command (@mcp-abap-adt/compact) calls the same `main` with its own.
|
|
14
|
+
* The launcher is @mcp-abap-adt/server-runtime's; the version is core's own.
|
|
14
15
|
*/
|
|
15
|
-
const {
|
|
16
|
-
|
|
16
|
+
const {
|
|
17
|
+
main,
|
|
18
|
+
launcherFailedLine,
|
|
19
|
+
} = require('@mcp-abap-adt/server-runtime/stdio');
|
|
20
|
+
const { CORE_VERSION, CORE_PACKAGE } = require('../dist/coreVersion.js');
|
|
17
21
|
const { fullToolSet } = require('@mcp-abap-adt/lib/tool-set');
|
|
18
22
|
|
|
19
23
|
void main({
|
|
20
24
|
toolSet: fullToolSet,
|
|
21
25
|
program: 'mcp-abap-adt',
|
|
22
26
|
version: CORE_VERSION,
|
|
27
|
+
packageName: CORE_PACKAGE,
|
|
23
28
|
}).catch((err) => {
|
|
24
29
|
console.error(launcherFailedLine(err));
|
|
25
30
|
process.exit(1);
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@mcp-abap-adt/core/auth` — the destination layer
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* `@mcp-abap-adt/core/auth` — the destination layer. Its code lives in
|
|
3
|
+
* `@mcp-abap-adt/server-runtime` (19.2.0); this path re-exports
|
|
4
|
+
* `@mcp-abap-adt/server-runtime/auth`, so an importer sees the names it saw
|
|
5
|
+
* before.
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
-
export { AuthBrokerFactory } from './brokerFactory';
|
|
8
|
-
export { BROWSER_NAMES, type BrowserChoice, BrowserChoiceError, type BrowserMapping, type BrowserName, browserFor, browserOf, } from './browser';
|
|
9
|
-
export { type DestinationFailureOptions, DestinationRefusal, destinationFailureOf, destinationFailureWords, HINTS, JWT_NONE_HINT, RECORD_FORMAT_HINT, UnsupportedAuthenticationError, } from './destinationFailure';
|
|
10
|
-
export type { IAuthBrokerFactory, IDestinations, SettleReport, } from './IAuthBrokerFactory.js';
|
|
11
|
-
export type { IAuthBrokerFactoryConfig, LoginStrategyOptions, } from './IAuthBrokerFactoryConfig.js';
|
|
12
|
-
export { promptLogger, type ServerLoginContext, serverLogin, } from './serverLogin';
|
|
13
|
-
export { REFRESH_ONLY_SENTENCE, RENEWAL_MODES, type RenewalMode, type ServerState, SHUTDOWN_SENTENCE, serverSentence, } from './serverSentences';
|
|
14
|
-
export { AUTH_TYPES, type AuthType, GRANTS, type VettedAuthentication, vetMeans, } from './vocabulary';
|
|
7
|
+
export * from '@mcp-abap-adt/server-runtime/auth';
|
|
15
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,mCAAmC,CAAC"}
|
package/dist/auth/index.js
CHANGED
|
@@ -1,38 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
17
|
/**
|
|
3
|
-
* `@mcp-abap-adt/core/auth` — the destination layer
|
|
4
|
-
*
|
|
5
|
-
*
|
|
18
|
+
* `@mcp-abap-adt/core/auth` — the destination layer. Its code lives in
|
|
19
|
+
* `@mcp-abap-adt/server-runtime` (19.2.0); this path re-exports
|
|
20
|
+
* `@mcp-abap-adt/server-runtime/auth`, so an importer sees the names it saw
|
|
21
|
+
* before.
|
|
6
22
|
*/
|
|
7
|
-
|
|
8
|
-
exports.vetMeans = exports.GRANTS = exports.AUTH_TYPES = exports.serverSentence = exports.SHUTDOWN_SENTENCE = exports.RENEWAL_MODES = exports.REFRESH_ONLY_SENTENCE = exports.serverLogin = exports.promptLogger = exports.UnsupportedAuthenticationError = exports.RECORD_FORMAT_HINT = exports.JWT_NONE_HINT = exports.HINTS = exports.destinationFailureWords = exports.destinationFailureOf = exports.DestinationRefusal = exports.browserOf = exports.browserFor = exports.BrowserChoiceError = exports.BROWSER_NAMES = exports.AuthBrokerFactory = exports.destinationSource = void 0;
|
|
9
|
-
var destinationSource_1 = require("../destinationSource");
|
|
10
|
-
Object.defineProperty(exports, "destinationSource", { enumerable: true, get: function () { return destinationSource_1.destinationSource; } });
|
|
11
|
-
var brokerFactory_1 = require("./brokerFactory");
|
|
12
|
-
Object.defineProperty(exports, "AuthBrokerFactory", { enumerable: true, get: function () { return brokerFactory_1.AuthBrokerFactory; } });
|
|
13
|
-
var browser_1 = require("./browser");
|
|
14
|
-
Object.defineProperty(exports, "BROWSER_NAMES", { enumerable: true, get: function () { return browser_1.BROWSER_NAMES; } });
|
|
15
|
-
Object.defineProperty(exports, "BrowserChoiceError", { enumerable: true, get: function () { return browser_1.BrowserChoiceError; } });
|
|
16
|
-
Object.defineProperty(exports, "browserFor", { enumerable: true, get: function () { return browser_1.browserFor; } });
|
|
17
|
-
Object.defineProperty(exports, "browserOf", { enumerable: true, get: function () { return browser_1.browserOf; } });
|
|
18
|
-
var destinationFailure_1 = require("./destinationFailure");
|
|
19
|
-
Object.defineProperty(exports, "DestinationRefusal", { enumerable: true, get: function () { return destinationFailure_1.DestinationRefusal; } });
|
|
20
|
-
Object.defineProperty(exports, "destinationFailureOf", { enumerable: true, get: function () { return destinationFailure_1.destinationFailureOf; } });
|
|
21
|
-
Object.defineProperty(exports, "destinationFailureWords", { enumerable: true, get: function () { return destinationFailure_1.destinationFailureWords; } });
|
|
22
|
-
Object.defineProperty(exports, "HINTS", { enumerable: true, get: function () { return destinationFailure_1.HINTS; } });
|
|
23
|
-
Object.defineProperty(exports, "JWT_NONE_HINT", { enumerable: true, get: function () { return destinationFailure_1.JWT_NONE_HINT; } });
|
|
24
|
-
Object.defineProperty(exports, "RECORD_FORMAT_HINT", { enumerable: true, get: function () { return destinationFailure_1.RECORD_FORMAT_HINT; } });
|
|
25
|
-
Object.defineProperty(exports, "UnsupportedAuthenticationError", { enumerable: true, get: function () { return destinationFailure_1.UnsupportedAuthenticationError; } });
|
|
26
|
-
var serverLogin_1 = require("./serverLogin");
|
|
27
|
-
Object.defineProperty(exports, "promptLogger", { enumerable: true, get: function () { return serverLogin_1.promptLogger; } });
|
|
28
|
-
Object.defineProperty(exports, "serverLogin", { enumerable: true, get: function () { return serverLogin_1.serverLogin; } });
|
|
29
|
-
var serverSentences_1 = require("./serverSentences");
|
|
30
|
-
Object.defineProperty(exports, "REFRESH_ONLY_SENTENCE", { enumerable: true, get: function () { return serverSentences_1.REFRESH_ONLY_SENTENCE; } });
|
|
31
|
-
Object.defineProperty(exports, "RENEWAL_MODES", { enumerable: true, get: function () { return serverSentences_1.RENEWAL_MODES; } });
|
|
32
|
-
Object.defineProperty(exports, "SHUTDOWN_SENTENCE", { enumerable: true, get: function () { return serverSentences_1.SHUTDOWN_SENTENCE; } });
|
|
33
|
-
Object.defineProperty(exports, "serverSentence", { enumerable: true, get: function () { return serverSentences_1.serverSentence; } });
|
|
34
|
-
var vocabulary_1 = require("./vocabulary");
|
|
35
|
-
Object.defineProperty(exports, "AUTH_TYPES", { enumerable: true, get: function () { return vocabulary_1.AUTH_TYPES; } });
|
|
36
|
-
Object.defineProperty(exports, "GRANTS", { enumerable: true, get: function () { return vocabulary_1.GRANTS; } });
|
|
37
|
-
Object.defineProperty(exports, "vetMeans", { enumerable: true, get: function () { return vocabulary_1.vetMeans; } });
|
|
23
|
+
__exportStar(require("@mcp-abap-adt/server-runtime/auth"), exports);
|
|
38
24
|
//# sourceMappingURL=index.js.map
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,oEAAkD"}
|
package/dist/coreVersion.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `@mcp-abap-adt/core`'s own version, read from its own manifest.
|
|
3
|
-
*
|
|
4
|
-
* One step up from this file is `server/` in a checkout (`src/` under test,
|
|
5
|
-
* `dist/` when built) and the package root when installed — in every layout it is
|
|
6
|
-
* core's `package.json`. See `showVersion` in `launcher.ts` for what two steps cost.
|
|
7
|
-
*
|
|
8
|
-
* It replaces `process.env.npm_package_version`, which npm sets only for a process
|
|
9
|
-
* it started itself (`npm run`, `npx`). Started any other way — a client's config,
|
|
10
|
-
* `node bin/…`, `mcp-proxy` — the variable was unset and every transport answered
|
|
11
|
-
* `serverInfo.version: "1.0.0"`, whatever was installed.
|
|
12
|
-
*/
|
|
13
1
|
export declare const CORE_VERSION: string;
|
|
2
|
+
/** `@mcp-abap-adt/core`'s own package name, from the same manifest: what a second copy of lib asks to reinstall. */
|
|
3
|
+
export declare const CORE_PACKAGE: string;
|
|
14
4
|
//# sourceMappingURL=coreVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreVersion.d.ts","sourceRoot":"","sources":["../src/coreVersion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coreVersion.d.ts","sourceRoot":"","sources":["../src/coreVersion.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,YAAY,EAAE,MAAyB,CAAC;AAErD,oHAAoH;AACpH,eAAO,MAAM,YAAY,EAAE,MAAsB,CAAC"}
|
package/dist/coreVersion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CORE_VERSION = void 0;
|
|
3
|
+
exports.CORE_PACKAGE = exports.CORE_VERSION = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
6
|
/**
|
|
@@ -15,5 +15,8 @@ const node_path_1 = require("node:path");
|
|
|
15
15
|
* `node bin/…`, `mcp-proxy` — the variable was unset and every transport answered
|
|
16
16
|
* `serverInfo.version: "1.0.0"`, whatever was installed.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
const manifest = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, '..', 'package.json'), 'utf8'));
|
|
19
|
+
exports.CORE_VERSION = manifest.version;
|
|
20
|
+
/** `@mcp-abap-adt/core`'s own package name, from the same manifest: what a second copy of lib asks to reinstall. */
|
|
21
|
+
exports.CORE_PACKAGE = manifest.name;
|
|
19
22
|
//# sourceMappingURL=coreVersion.js.map
|
package/dist/coreVersion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreVersion.js","sourceRoot":"","sources":["../src/coreVersion.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,yCAAiC;AAEjC;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"coreVersion.js","sourceRoot":"","sources":["../src/coreVersion.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,yCAAiC;AAEjC;;;;;;;;;;;GAWG;AACH,MAAM,QAAQ,GAAsC,IAAI,CAAC,KAAK,CAC5D,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAC5D,CAAC;AAEW,QAAA,YAAY,GAAW,QAAQ,CAAC,OAAO,CAAC;AAErD,oHAAoH;AACvG,QAAA,YAAY,GAAW,QAAQ,CAAC,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,19 @@
|
|
|
7
7
|
* Importing from here links AGPL code. If you are embedding ADT tools in your
|
|
8
8
|
* own application, you want `@mcp-abap-adt/lib` instead: it carries the
|
|
9
9
|
* handlers and the embeddable server under Apache-2.0, and no transport.
|
|
10
|
+
*
|
|
11
|
+
* The code lives in `@mcp-abap-adt/server-runtime` (19.2.0): this module
|
|
12
|
+
* re-exports its `stdio/server` path, so an importer of `@mcp-abap-adt/core`
|
|
13
|
+
* sees the names it saw before.
|
|
14
|
+
*/
|
|
15
|
+
import { StdioServer as RuntimeStdioServer } from '@mcp-abap-adt/server-runtime/stdio/server';
|
|
16
|
+
export * from '@mcp-abap-adt/server-runtime/stdio/server';
|
|
17
|
+
/**
|
|
18
|
+
* The runtime's stdio server, answering core's version when none is given —
|
|
19
|
+
* as a direct constructor call did before the code moved, even when the
|
|
20
|
+
* runtime is at another patch than core.
|
|
10
21
|
*/
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export * from './config/platformPaths.js';
|
|
15
|
-
export * from './destinationSource.js';
|
|
16
|
-
export * from './StdioServer.js';
|
|
22
|
+
export declare class StdioServer extends RuntimeStdioServer {
|
|
23
|
+
constructor(...[handlersRegistry, destinations, opts]: ConstructorParameters<typeof RuntimeStdioServer>);
|
|
24
|
+
}
|
|
17
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAI9F,cAAc,2CAA2C,CAAC;AAE1D;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,kBAAkB;gBAE/C,GAAG,CAAC,gBAAgB,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,qBAAqB,CAC9D,OAAO,kBAAkB,CAC1B;CAOJ"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* `@mcp-abap-adt/core` — the standalone MCP server over stdio, AGPL-3.0-only.
|
|
4
|
-
*
|
|
5
|
-
* Streamable HTTP is `@mcp-abap-adt/http` and HTTP+SSE `@mcp-abap-adt/sse`:
|
|
6
|
-
* packages of their own, serving credentials from each request's headers.
|
|
7
|
-
*
|
|
8
|
-
* Importing from here links AGPL code. If you are embedding ADT tools in your
|
|
9
|
-
* own application, you want `@mcp-abap-adt/lib` instead: it carries the
|
|
10
|
-
* handlers and the embeddable server under Apache-2.0, and no transport.
|
|
11
|
-
*/
|
|
12
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
3
|
if (k2 === undefined) k2 = k;
|
|
14
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -24,11 +14,37 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
24
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25
15
|
};
|
|
26
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
exports.StdioServer = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* `@mcp-abap-adt/core` — the standalone MCP server over stdio, AGPL-3.0-only.
|
|
20
|
+
*
|
|
21
|
+
* Streamable HTTP is `@mcp-abap-adt/http` and HTTP+SSE `@mcp-abap-adt/sse`:
|
|
22
|
+
* packages of their own, serving credentials from each request's headers.
|
|
23
|
+
*
|
|
24
|
+
* Importing from here links AGPL code. If you are embedding ADT tools in your
|
|
25
|
+
* own application, you want `@mcp-abap-adt/lib` instead: it carries the
|
|
26
|
+
* handlers and the embeddable server under Apache-2.0, and no transport.
|
|
27
|
+
*
|
|
28
|
+
* The code lives in `@mcp-abap-adt/server-runtime` (19.2.0): this module
|
|
29
|
+
* re-exports its `stdio/server` path, so an importer of `@mcp-abap-adt/core`
|
|
30
|
+
* sees the names it saw before.
|
|
31
|
+
*/
|
|
32
|
+
const server_1 = require("@mcp-abap-adt/server-runtime/stdio/server");
|
|
33
|
+
const coreVersion_js_1 = require("./coreVersion.js");
|
|
34
|
+
// core's parameter table, the destination's env file, the destination source
|
|
35
|
+
__exportStar(require("@mcp-abap-adt/server-runtime/stdio/server"), exports);
|
|
36
|
+
/**
|
|
37
|
+
* The runtime's stdio server, answering core's version when none is given —
|
|
38
|
+
* as a direct constructor call did before the code moved, even when the
|
|
39
|
+
* runtime is at another patch than core.
|
|
40
|
+
*/
|
|
41
|
+
class StdioServer extends server_1.StdioServer {
|
|
42
|
+
constructor(...[handlersRegistry, destinations, opts]) {
|
|
43
|
+
super(handlersRegistry, destinations, {
|
|
44
|
+
...opts,
|
|
45
|
+
version: opts?.version ?? coreVersion_js_1.CORE_VERSION,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.StdioServer = StdioServer;
|
|
34
50
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;GAaG;AACH,sEAA8F;AAC9F,qDAAgD;AAEhD,6EAA6E;AAC7E,4EAA0D;AAE1D;;;;GAIG;AACH,MAAa,WAAY,SAAQ,oBAAkB;IACjD,YACE,GAAG,CAAC,gBAAgB,EAAE,YAAY,EAAE,IAAI,CAEvC;QAED,KAAK,CAAC,gBAAgB,EAAE,YAAY,EAAE;YACpC,GAAG,IAAI;YACP,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,6BAAY;SACvC,CAAC,CAAC;IACL,CAAC;CACF;AAXD,kCAWC"}
|
package/dist/launcher.d.ts
CHANGED
|
@@ -1,138 +1,22 @@
|
|
|
1
|
-
import type { IBrowser } from '@mcp-abap-adt/interfaces-auth';
|
|
2
|
-
import { type LauncherEdges, type MessageServerField } from '@mcp-abap-adt/lib/config';
|
|
3
|
-
import { type StateLogger } from '@mcp-abap-adt/lib/state';
|
|
4
|
-
import { type ToolSet } from '@mcp-abap-adt/lib/tool-set';
|
|
5
|
-
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
6
|
-
import { AuthBrokerFactory, type IAuthBrokerFactoryConfig } from './auth';
|
|
7
|
-
import { type CoreConfig } from './config/coreParameters';
|
|
8
|
-
import { type ShutdownProcess } from './shutdown.js';
|
|
9
|
-
/** The one line `--auth-debug` prints at the start. */
|
|
10
|
-
export declare const AUTH_DEBUG_WARNING = "[MCP] --auth-debug is on: a refused token request's debug line on stderr names the first and last four characters of each secret it sent";
|
|
11
1
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
* serves, and its own name and version — nothing else. Everything the
|
|
30
|
-
* launcher does — options, the destination, credentials, cancellation,
|
|
31
|
-
* failures, shutdown — is stdio's, the same for any tool set:
|
|
32
|
-
* `mcp-abap-adt` passes `fullToolSet`, `mcp-abap-adt-ro` `fullReadOnlyToolSet`,
|
|
33
|
-
* `mcp-abap-adt-compact` and `mcp-abap-adt-compact-ro` the compact sets.
|
|
34
|
-
*/
|
|
35
|
-
export interface LauncherOptions {
|
|
36
|
-
/** The tools served: fixed by the command, never by a flag. */
|
|
37
|
-
toolSet: ToolSet;
|
|
38
|
-
/** The command's own name: USAGE in `--help`, the `--conf` template's header. */
|
|
39
|
-
program: string;
|
|
40
|
-
/** The version `--version` and `initialize` report: the command's own package's. */
|
|
41
|
-
version: string;
|
|
42
|
-
}
|
|
43
|
-
/** The process as core's `main` meets it: lib's edges, and the MCP transport. */
|
|
44
|
-
export interface StdioLauncherEdges extends LauncherEdges {
|
|
45
|
-
/** The MCP transport; stdio unless a host passes its own (a test's). */
|
|
46
|
-
transport?: Transport;
|
|
2
|
+
* `@mcp-abap-adt/core/launcher` — the stdio launcher. Its code lives in
|
|
3
|
+
* `@mcp-abap-adt/server-runtime` (19.2.0); this path re-exports
|
|
4
|
+
* `@mcp-abap-adt/server-runtime/stdio`, so an importer sees the names it saw
|
|
5
|
+
* before.
|
|
6
|
+
*
|
|
7
|
+
* And it takes 19.1.0's options: `LauncherOptions`, `main` and `launch` here
|
|
8
|
+
* accept `{ toolSet, program, version }` as before. `packageName` — required
|
|
9
|
+
* on the runtime's own path — is optional here and defaults to
|
|
10
|
+
* `@mcp-abap-adt/core`, the package a second copy of lib then asks to
|
|
11
|
+
* reinstall; a value given passes through.
|
|
12
|
+
*/
|
|
13
|
+
import { type LauncherDeps, type LauncherOptions as RuntimeLauncherOptions, launch as runtimeLaunch, type StdioLauncherEdges } from '@mcp-abap-adt/server-runtime/stdio';
|
|
14
|
+
export * from '@mcp-abap-adt/server-runtime/stdio';
|
|
15
|
+
/** 19.1.0's options; `packageName` optional, `@mcp-abap-adt/core` when not given. */
|
|
16
|
+
export interface LauncherOptions extends Omit<RuntimeLauncherOptions, 'packageName'> {
|
|
17
|
+
/** The command's own npm package: the one a second copy of lib asks to reinstall. Default `@mcp-abap-adt/core`. */
|
|
18
|
+
packageName?: string | undefined;
|
|
47
19
|
}
|
|
48
20
|
export declare function main(options: LauncherOptions, edges?: StdioLauncherEdges): Promise<void>;
|
|
49
|
-
|
|
50
|
-
export interface LauncherDeps {
|
|
51
|
-
/** auth-providers' `browserCallbackStrategy` in the program (Ruling 1). */
|
|
52
|
-
browserStrategy: IAuthBrokerFactoryConfig['browserStrategy'];
|
|
53
|
-
/** One line to stderr; nothing the launcher says goes to stdout (H3). */
|
|
54
|
-
stderr: (line: string) => void;
|
|
55
|
-
exit: (code: number) => void;
|
|
56
|
-
/** Where the shutdown listens: `process` in the program. */
|
|
57
|
-
processLike: ShutdownProcess;
|
|
58
|
-
/** The platform `--browser` is mapped for; `process.platform` when absent. */
|
|
59
|
-
platform?: string;
|
|
60
|
-
/** The MCP transport; stdio when absent. */
|
|
61
|
-
transport?: Transport;
|
|
62
|
-
}
|
|
63
|
-
/** The connection type: see {@link effectiveFromEnvironment}. */
|
|
64
|
-
export declare function effectiveConnectionType(config: CoreConfig, env: NodeJS.ProcessEnv): CoreConfig['connectionType'];
|
|
65
|
-
/**
|
|
66
|
-
* The message server's fields (RFC, connection 18), each as
|
|
67
|
-
* {@link effectiveFromEnvironment} reads the connection type: the CLI, then
|
|
68
|
-
* the process environment — which by now holds what the env file states,
|
|
69
|
-
* never over a value set before — then YAML. Taken as given, trimmed; no
|
|
70
|
-
* default, no check: connection refuses what it cannot dial.
|
|
71
|
-
*/
|
|
72
|
-
export declare function effectiveMessageServer(config: CoreConfig, env: NodeJS.ProcessEnv): Pick<CoreConfig, MessageServerField>;
|
|
73
|
-
/**
|
|
74
|
-
* The system type: see {@link effectiveFromEnvironment}. The parser no longer
|
|
75
|
-
* writes it into the environment, where it used to sit before the env file
|
|
76
|
-
* was read and so beat the file's SAP_SYSTEM_TYPE even from YAML.
|
|
77
|
-
*/
|
|
78
|
-
export declare function effectiveSystemType(config: CoreConfig, env: NodeJS.ProcessEnv): CoreConfig['systemType'];
|
|
79
|
-
/**
|
|
80
|
-
* The factory's configuration, read from the parameters and the browser the
|
|
81
|
-
* launcher mapped (`browserFor`). The callback port is left to the strategy
|
|
82
|
-
* (61001) when none is given; the env file carries the parameter it came
|
|
83
|
-
* from, as the user gave it.
|
|
84
|
-
*/
|
|
85
|
-
export declare function factoryConfigFrom(config: CoreConfig, collaborators: Pick<IAuthBrokerFactoryConfig, 'browserStrategy' | 'logger' | 'promptLogger'> & {
|
|
86
|
-
browser?: IBrowser | undefined;
|
|
87
|
-
browserUnavailable?: string | undefined;
|
|
88
|
-
}): IAuthBrokerFactoryConfig;
|
|
89
|
-
/**
|
|
90
|
-
* The start's words for a system that gave no information where it must
|
|
91
|
-
* (ABAP Cloud): a problem of the ABAP system with a valid configuration.
|
|
92
|
-
*/
|
|
93
|
-
export declare function startLookupFailedWords(destination: string): string;
|
|
94
|
-
/**
|
|
95
|
-
* The start's words for a destination whose system kind no parameter states.
|
|
96
|
-
*/
|
|
97
|
-
export declare function startSystemTypeRequiredWords(destination: string): string;
|
|
98
|
-
/**
|
|
99
|
-
* The start's words for an ABAP Cloud destination whose system has no
|
|
100
|
-
* systeminformation endpoint (`404`): the configuration is inconsistent.
|
|
101
|
-
*/
|
|
102
|
-
export declare function startCloudWithoutSystemInformationWords(destination: string): string;
|
|
103
|
-
/**
|
|
104
|
-
* The start's words for an on-premise system that gave no information
|
|
105
|
-
* whose destination states no user.
|
|
106
|
-
*/
|
|
107
|
-
export declare function startSystemUserUnknownWords(destination: string): string;
|
|
108
|
-
/**
|
|
109
|
-
* The words the connection at start failed in: what the failure reader
|
|
110
|
-
* makes of it (a chain failure, the server's own refusal — a system lookup
|
|
111
|
-
* that failed — or the destination layer's), else the destination, the
|
|
112
|
-
* error's class and the status SAP answered — never its message.
|
|
113
|
-
*/
|
|
114
|
-
export declare function startConnectionWords(error: unknown, destination: string, factory: Pick<AuthBrokerFactory, 'sentenceFor'>, platform: string): string;
|
|
115
|
-
/**
|
|
116
|
-
* Everything after the parameters are read: the tool list, one factory, the
|
|
117
|
-
* destination the process serves checked and summarised, the shutdown, the
|
|
118
|
-
* connection born (`connectAtStart`: the destination's one leftover session
|
|
119
|
-
* taken up, or a logon — a browser login included — with the system
|
|
120
|
-
* information), and only then the transport. A destination that cannot be
|
|
121
|
-
* served, a logon or resume that fails, a system lookup that fails: each
|
|
122
|
-
* ends the process with exit `1` and the failure's words on stderr, before
|
|
123
|
-
* any transport opens.
|
|
124
|
-
*
|
|
125
|
-
* No exit and no rejection comes before the logoffs are answered: a start
|
|
126
|
-
* that fails after its logon exits `1` only once SAP answered the logoff
|
|
127
|
-
* (`logOffAtOnce`: every connection the process owns logged off, each
|
|
128
|
-
* logoff followed to its answer, no timer), and a launch that rejects — the
|
|
129
|
-
* bin's exit follows — rejects only then. SAP ends a security session only
|
|
130
|
-
* once it received the logoff whole.
|
|
131
|
-
*/
|
|
132
|
-
export declare function launch(config: CoreConfig, options: LauncherOptions, deps: LauncherDeps): Promise<void>;
|
|
133
|
-
/**
|
|
134
|
-
* The launcher's last line when `main()` rejects: fixed words and auth-errors'
|
|
135
|
-
* `logFields` of what the value classifies as — never its message.
|
|
136
|
-
*/
|
|
137
|
-
export declare function launcherFailedLine(thrown: unknown): string;
|
|
21
|
+
export declare function launch(config: Parameters<typeof runtimeLaunch>[0], options: LauncherOptions, deps: LauncherDeps): Promise<void>;
|
|
138
22
|
//# sourceMappingURL=launcher.d.ts.map
|
package/dist/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,eAAe,IAAI,sBAAsB,EAC9C,MAAM,IAAI,aAAa,EAEvB,KAAK,kBAAkB,EACxB,MAAM,oCAAoC,CAAC;AAG5C,cAAc,oCAAoC,CAAC;AAEnD,qFAAqF;AACrF,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,aAAa,CAAC;IACnD,mHAAmH;IACnH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAMD,wBAAsB,IAAI,CACxB,OAAO,EAAE,eAAe,EACxB,KAAK,CAAC,EAAE,kBAAkB,GACzB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAsB,MAAM,CAC1B,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,EAC3C,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAEf"}
|