@mcp-abap-adt/sse 0.0.0-stage → 19.1.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/LICENSE +661 -0
- package/README.md +124 -2
- package/bin/mcp-abap-adt-sse.js +23 -0
- package/dist/SseServer.d.ts +180 -0
- package/dist/SseServer.d.ts.map +1 -0
- package/dist/SseServer.js +384 -0
- package/dist/SseServer.js.map +1 -0
- package/dist/config/sseParameters.d.ts +46 -0
- package/dist/config/sseParameters.d.ts.map +1 -0
- package/dist/config/sseParameters.js +140 -0
- package/dist/config/sseParameters.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/launcher.d.ts +43 -0
- package/dist/launcher.d.ts.map +1 -0
- package/dist/launcher.js +134 -0
- package/dist/launcher.js.map +1 -0
- package/dist/sseVersion.d.ts +11 -0
- package/dist/sseVersion.d.ts.map +1 -0
- package/dist/sseVersion.js +16 -0
- package/dist/sseVersion.js.map +1 -0
- package/package.json +78 -4
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mcp-abap-adt-sse` — the HTTP+SSE binary. Credentials come only
|
|
3
|
+
* from the `x-sap-*` headers of the `GET` that opens each SSE connection; no
|
|
4
|
+
* destination, no broker, no store, no login. The tools are the `ToolSet`
|
|
5
|
+
* the command passes.
|
|
6
|
+
*/
|
|
7
|
+
import type { EventEmitter } from 'node:events';
|
|
8
|
+
import { type LauncherEdges } from '@mcp-abap-adt/lib/config';
|
|
9
|
+
import { type ToolSet } from '@mcp-abap-adt/lib/tool-set';
|
|
10
|
+
import { type SseConfig } from './config/sseParameters.js';
|
|
11
|
+
import { SseServer } from './SseServer.js';
|
|
12
|
+
/**
|
|
13
|
+
* What a command passes sse's launcher: the tools it
|
|
14
|
+
* serves, and its own name and version — nothing else. Everything the
|
|
15
|
+
* launcher does is sse's, the same for any tool set:
|
|
16
|
+
* `mcp-abap-adt-sse` passes `fullToolSet`, `mcp-abap-adt-sse-ro`
|
|
17
|
+
* `fullReadOnlyToolSet`, `mcp-abap-adt-compact-sse` and
|
|
18
|
+
* `mcp-abap-adt-compact-sse-ro` the compact sets.
|
|
19
|
+
*/
|
|
20
|
+
export interface SseLauncherOptions {
|
|
21
|
+
/** The tools served: fixed by the command, never by a flag. */
|
|
22
|
+
toolSet: ToolSet;
|
|
23
|
+
/** The command's own name: USAGE in `--help`, the `--conf` template's header. */
|
|
24
|
+
program: string;
|
|
25
|
+
/** The version `--version` and `initialize` report: the command's own package's. */
|
|
26
|
+
version: string;
|
|
27
|
+
}
|
|
28
|
+
/** What the launcher takes from the program: the process's edges. */
|
|
29
|
+
export interface SseLauncherDeps {
|
|
30
|
+
stderr: (line: string) => void;
|
|
31
|
+
exit: (code: number) => void;
|
|
32
|
+
/** Where the shutdown listens: `process` in the program. */
|
|
33
|
+
processLike: EventEmitter;
|
|
34
|
+
}
|
|
35
|
+
/** sse's help: its own table, the set's TOOLS section, the headers. */
|
|
36
|
+
export declare function sseHelp(options?: {
|
|
37
|
+
toolSet?: ToolSet;
|
|
38
|
+
program?: string;
|
|
39
|
+
}): string;
|
|
40
|
+
export declare function main(options: SseLauncherOptions, edges?: LauncherEdges): Promise<SseServer | undefined>;
|
|
41
|
+
/** Everything after the parameters are read: the tool list, the server, the shutdown. */
|
|
42
|
+
export declare function launch(config: SseConfig, options: SseLauncherOptions, deps: SseLauncherDeps): Promise<SseServer | undefined>;
|
|
43
|
+
//# sourceMappingURL=launcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,4DAA4D;IAC5D,WAAW,EAAE,YAAY,CAAC;CAC3B;AA+BD,uEAAuE;AACvE,wBAAgB,OAAO,CACrB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GACpD,MAAM,CAYR;AAED,wBAAsB,IAAI,CACxB,OAAO,EAAE,kBAAkB,EAC3B,KAAK,GAAE,aAA8B,GACpC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAyBhC;AAED,yFAAyF;AACzF,wBAAsB,MAAM,CAC1B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAoDhC"}
|
package/dist/launcher.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `mcp-abap-adt-sse` — the HTTP+SSE binary. Credentials come only
|
|
4
|
+
* from the `x-sap-*` headers of the `GET` that opens each SSE connection; no
|
|
5
|
+
* destination, no broker, no store, no login. The tools are the `ToolSet`
|
|
6
|
+
* the command passes.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.sseHelp = sseHelp;
|
|
10
|
+
exports.main = main;
|
|
11
|
+
exports.launch = launch;
|
|
12
|
+
const background_runs_memory_1 = require("@mcp-abap-adt/background-runs-memory");
|
|
13
|
+
const config_1 = require("@mcp-abap-adt/lib/config");
|
|
14
|
+
const http_transport_1 = require("@mcp-abap-adt/lib/http-transport");
|
|
15
|
+
const logger_1 = require("@mcp-abap-adt/lib/logger");
|
|
16
|
+
const state_1 = require("@mcp-abap-adt/lib/state");
|
|
17
|
+
const tool_set_1 = require("@mcp-abap-adt/lib/tool-set");
|
|
18
|
+
const responsible_rules_1 = require("@mcp-abap-adt/responsible-rules");
|
|
19
|
+
const sseParameters_js_1 = require("./config/sseParameters.js");
|
|
20
|
+
const SseServer_js_1 = require("./SseServer.js");
|
|
21
|
+
const HELP_SECTIONS = `
|
|
22
|
+
CREDENTIALS (the headers of the GET that opens each SSE connection; a POST is
|
|
23
|
+
routed by its sessionId alone, and its own x-sap-* headers are not read):
|
|
24
|
+
x-sap-url The system's URL (required)
|
|
25
|
+
x-sap-client The client (optional)
|
|
26
|
+
x-sap-jwt-token A token you hold, sent as a Bearer token
|
|
27
|
+
x-sap-login, x-sap-password A user and password (basic)
|
|
28
|
+
A GET without them is answered 400. x-mcp-destination, on a GET or a POST, is
|
|
29
|
+
refused with 400: destinations are served only by mcp-abap-adt (stdio).
|
|
30
|
+
Nothing is shared with another connection, and nothing outlives it.
|
|
31
|
+
|
|
32
|
+
System Context (the opening GET's headers, first found wins):
|
|
33
|
+
x-sap-responsible Responsible of created objects
|
|
34
|
+
x-sap-master-system Master system of created objects
|
|
35
|
+
x-sap-language Master/original language for created objects
|
|
36
|
+
x-sap-debug-terminal-id The debugger's terminal id (where the debugger is served)
|
|
37
|
+
x-sap-debug-ide-id The debugger's IDE id
|
|
38
|
+
x-sap-debug-breakpoint-conflict replace (default) or refuse-if-held: whether a take-over
|
|
39
|
+
of the debugger, and every later change of its breakpoints,
|
|
40
|
+
first asks if another debugger listens for the same SAP user
|
|
41
|
+
Then SAP_RESPONSIBLE, SAP_MASTER_SYSTEM, SAP_DEBUG_TERMINAL_ID, SAP_DEBUG_IDE_ID,
|
|
42
|
+
SAP_DEBUG_BREAKPOINT_CONFLICT of the environment; with x-sap-login, the login is the responsible when none is stated.
|
|
43
|
+
|
|
44
|
+
Held state (a debug session) lives in the connection's instance until the
|
|
45
|
+
connection closes; MCP_STATE_IDLE_MINUTES / --state-idle-minutes bound it.
|
|
46
|
+
|
|
47
|
+
A health check answers GET /mcp/health.
|
|
48
|
+
`;
|
|
49
|
+
/** sse's help: its own table, the set's TOOLS section, the headers. */
|
|
50
|
+
function sseHelp(options = {}) {
|
|
51
|
+
const toolSet = options.toolSet ?? tool_set_1.fullToolSet;
|
|
52
|
+
const program = options.program ?? 'mcp-abap-adt-sse';
|
|
53
|
+
return (0, config_1.generateHelp)((0, sseParameters_js_1.sseParameters)(toolSet, program), {
|
|
54
|
+
description: ' MCP server for SAP ABAP systems via ADT, over HTTP+SSE: credentials only from the\n x-sap-* headers of the GET that opens each SSE connection. stdio (destinations,\n logins) is mcp-abap-adt, Streamable HTTP mcp-abap-adt-http; a binary is its transport.',
|
|
55
|
+
sections: [
|
|
56
|
+
toolSet.toolsHelp('sse'),
|
|
57
|
+
HELP_SECTIONS,
|
|
58
|
+
`\nEXAMPLES:\n # Listen on port 3000\n ${program} --sse-port=3000\n`,
|
|
59
|
+
],
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async function main(options, edges = (0, config_1.processEdges)()) {
|
|
63
|
+
const { argv, stderr, exit } = edges;
|
|
64
|
+
if ((0, config_1.answerVersionOrHelp)(edges, {
|
|
65
|
+
version: options.version,
|
|
66
|
+
help: () => sseHelp(options),
|
|
67
|
+
})) {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
// sse's own table: an option of another binary, --transport, or the
|
|
71
|
+
// removed --exposition stops here.
|
|
72
|
+
const config = (0, config_1.readStartupConfig)((0, sseParameters_js_1.sseParameters)(options.toolSet, options.program), argv, process.env, { stderr, exit }, (args, env, yaml) => (0, sseParameters_js_1.readSseConfig)(args, env, yaml, options.toolSet));
|
|
73
|
+
if (config === undefined)
|
|
74
|
+
return undefined;
|
|
75
|
+
return launch(config, options, {
|
|
76
|
+
stderr,
|
|
77
|
+
exit,
|
|
78
|
+
processLike: edges.processLike,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** Everything after the parameters are read: the tool list, the server, the shutdown. */
|
|
82
|
+
async function launch(config, options, deps) {
|
|
83
|
+
// The system kind is required, never guessed: stated by --system-type,
|
|
84
|
+
// SAP_SYSTEM_TYPE or YAML system-type (no request header states it).
|
|
85
|
+
// Without it the start ends here, before anything listens — so no tool
|
|
86
|
+
// list is filtered for a kind nobody stated.
|
|
87
|
+
if (config.systemType === undefined) {
|
|
88
|
+
deps.stderr(`[MCP] ${(0, responsible_rules_1.listenerSystemTypeRequiredWords)()}`);
|
|
89
|
+
deps.exit(1);
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
// The connector and the tool filter read the system kind from the
|
|
93
|
+
// environment (`resolveSystemKind`).
|
|
94
|
+
process.env.SAP_SYSTEM_TYPE = config.systemType;
|
|
95
|
+
const server = new SseServer_js_1.SseServer((0, tool_set_1.registryOf)(options.toolSet, 'sse'), {
|
|
96
|
+
version: options.version,
|
|
97
|
+
stateIdleMinutes: config.stateIdleMinutes,
|
|
98
|
+
// Batch mode: one InstanceBatch per SSE connection's instance.
|
|
99
|
+
batch: { keepRawParts: config.batchKeepRawParts === true },
|
|
100
|
+
// The state's lines go to stderr whatever the transport logger says.
|
|
101
|
+
stateLogger: state_1.stderrStateLogger,
|
|
102
|
+
host: config.host,
|
|
103
|
+
port: config.port,
|
|
104
|
+
ssePath: config.ssePath,
|
|
105
|
+
postPath: config.postPath,
|
|
106
|
+
logger: logger_1.noopLogger,
|
|
107
|
+
tls: config.tls,
|
|
108
|
+
allowedHosts: config.allowedHosts,
|
|
109
|
+
allowedOrigins: config.allowedOrigins,
|
|
110
|
+
enableDnsRebindingProtection: config.enableDnsRebindingProtection,
|
|
111
|
+
// No runtime session file and no leftover-session tool: one server holds
|
|
112
|
+
// the sessions of many users, so they are stdio's only.
|
|
113
|
+
// Background runs of the run tools, kept in this process's memory and
|
|
114
|
+
// handed to every SSE session's instance; they end with the process.
|
|
115
|
+
// Only where the set serves them: a -ro command has none, so a run's
|
|
116
|
+
// `background: true` is refused.
|
|
117
|
+
...(options.toolSet.backgroundRuns && {
|
|
118
|
+
backgroundRuns: new background_runs_memory_1.InMemoryBackgroundRuns(),
|
|
119
|
+
}),
|
|
120
|
+
});
|
|
121
|
+
(0, http_transport_1.installTransportShutdown)({
|
|
122
|
+
stopListening: () => server.stopListening(),
|
|
123
|
+
release: () => server.releaseConnections(),
|
|
124
|
+
shutdownTimeoutMs: config.shutdownTimeout === undefined
|
|
125
|
+
? undefined
|
|
126
|
+
: config.shutdownTimeout * 1000,
|
|
127
|
+
exit: deps.exit,
|
|
128
|
+
stderr: deps.stderr,
|
|
129
|
+
processLike: deps.processLike,
|
|
130
|
+
});
|
|
131
|
+
await server.start();
|
|
132
|
+
return server;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=launcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAkFH,0BAcC;AAED,oBA4BC;AAGD,wBAwDC;AAtLD,iFAA8E;AAC9E,qDAMkC;AAClC,qEAA4E;AAC5E,qDAAsD;AACtD,mDAA4D;AAC5D,yDAIoC;AACpC,uEAAkF;AAClF,gEAImC;AACnC,iDAA2C;AA2B3C,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BrB,CAAC;AAEF,uEAAuE;AACvE,SAAgB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C,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,IAAI;YACpC,cAAc,EAAE,IAAI,+CAAsB,EAAE;SAC7C,CAAC;KACH,CAAC,CAAC;IACH,IAAA,yCAAwB,EAAC;QACvB,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE;QAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;QAC1C,iBAAiB,EACf,MAAM,CAAC,eAAe,KAAK,SAAS;YAClC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI;QACnC,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,WAAW,EAAE,IAAI,CAAC,WAAW;KAC9B,CAAC,CAAC;IACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@mcp-abap-adt/sse`'s own version, read from its own manifest: the version
|
|
3
|
+
* the transport reports in `serverInfo` and on `/health` when its caller
|
|
4
|
+
* passes none.
|
|
5
|
+
*
|
|
6
|
+
* One step up from this file is `sse/` in a checkout (`src/` under test,
|
|
7
|
+
* `dist/` when built) and the package root when installed — in every layout it
|
|
8
|
+
* is this package's `package.json`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SSE_VERSION: string;
|
|
11
|
+
//# sourceMappingURL=sseVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sseVersion.d.ts","sourceRoot":"","sources":["../src/sseVersion.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,EAAE,MAEjB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SSE_VERSION = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
/**
|
|
7
|
+
* `@mcp-abap-adt/sse`'s own version, read from its own manifest: the version
|
|
8
|
+
* the transport reports in `serverInfo` and on `/health` when its caller
|
|
9
|
+
* passes none.
|
|
10
|
+
*
|
|
11
|
+
* One step up from this file is `sse/` in a checkout (`src/` under test,
|
|
12
|
+
* `dist/` when built) and the package root when installed — in every layout it
|
|
13
|
+
* is this package's `package.json`.
|
|
14
|
+
*/
|
|
15
|
+
exports.SSE_VERSION = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, '..', 'package.json'), 'utf8')).version;
|
|
16
|
+
//# sourceMappingURL=sseVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sseVersion.js","sourceRoot":"","sources":["../src/sseVersion.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,yCAAiC;AAEjC;;;;;;;;GAQG;AACU,QAAA,WAAW,GAAW,IAAI,CAAC,KAAK,CAC3C,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAC5D,CAAC,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/sse",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"mcpName": "io.github.fr0ster/mcp-abap-adt-sse",
|
|
4
|
+
"version": "19.1.0",
|
|
5
|
+
"description": "The HTTP+SSE transport of the MCP ABAP ADT server: an Express app serving the ADT tools of @mcp-abap-adt/lib over the MCP HTTP+SSE transport, with DNS rebinding protection and TLS.",
|
|
6
|
+
"license": "AGPL-3.0-only",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"author": "Oleksii Kyslytsia <oleksij.kyslytsja@gmail.com>",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/fr0ster/mcp-abap-adt.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"abap",
|
|
17
|
+
"sap",
|
|
18
|
+
"adt",
|
|
19
|
+
"mcp",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"mcp-server",
|
|
22
|
+
"sse"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22.0.0",
|
|
26
|
+
"npm": ">=9.0.0"
|
|
27
|
+
},
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"require": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./launcher": {
|
|
37
|
+
"types": "./dist/launcher.d.ts",
|
|
38
|
+
"import": "./dist/launcher.js",
|
|
39
|
+
"require": "./dist/launcher.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"typesVersions": {
|
|
43
|
+
"*": {
|
|
44
|
+
"launcher": [
|
|
45
|
+
"dist/launcher.d.ts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"bin": {
|
|
50
|
+
"mcp-abap-adt-sse": "./bin/mcp-abap-adt-sse.js"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist/",
|
|
54
|
+
"bin/",
|
|
55
|
+
"README.md",
|
|
56
|
+
"LICENSE"
|
|
57
|
+
],
|
|
58
|
+
"scripts": {
|
|
59
|
+
"prebuild": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
60
|
+
"build": "npx tsc -p tsconfig.json",
|
|
61
|
+
"test": "npm --prefix .. test -- --roots sse/src",
|
|
62
|
+
"test:check": "npx tsc --noEmit -p tsconfig.test.json",
|
|
63
|
+
"lint:check": "npx biome check src",
|
|
64
|
+
"prepublishOnly": "npm run build"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@mcp-abap-adt/background-runs-memory": "^19.1.0",
|
|
68
|
+
"@mcp-abap-adt/lib": "^19.1.0",
|
|
69
|
+
"@mcp-abap-adt/logger": "^0.4.1",
|
|
70
|
+
"@mcp-abap-adt/responsible-rules": "^19.1.0",
|
|
71
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
72
|
+
"express": "^5.2.1"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@types/express": "*",
|
|
76
|
+
"@types/jest": "*",
|
|
77
|
+
"@types/node": "*",
|
|
78
|
+
"typescript": "*"
|
|
79
|
+
}
|
|
80
|
+
}
|