@futdevpro/nts-dynamo 1.15.297 → 1.15.299
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/build/_modules/mcp/_collections/mcp-http-endpoint.util.d.ts +36 -0
- package/build/_modules/mcp/_collections/mcp-http-endpoint.util.d.ts.map +1 -0
- package/build/_modules/mcp/_collections/mcp-http-endpoint.util.js +47 -0
- package/build/_modules/mcp/_collections/mcp-http-endpoint.util.js.map +1 -0
- package/build/_modules/mcp/_collections/mcp-tool-definition.util.d.ts +76 -0
- package/build/_modules/mcp/_collections/mcp-tool-definition.util.d.ts.map +1 -0
- package/build/_modules/mcp/_collections/mcp-tool-definition.util.js +197 -0
- package/build/_modules/mcp/_collections/mcp-tool-definition.util.js.map +1 -0
- package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.d.ts +13 -2
- package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.d.ts.map +1 -1
- package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.js +0 -11
- package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.js.map +1 -1
- package/build/_modules/mcp/_services/dynts-mcp.adapter.d.ts +17 -2
- package/build/_modules/mcp/_services/dynts-mcp.adapter.d.ts.map +1 -1
- package/build/_modules/mcp/_services/dynts-mcp.adapter.js +40 -7
- package/build/_modules/mcp/_services/dynts-mcp.adapter.js.map +1 -1
- package/build/_modules/mcp/_services/mcp-server.service-base.d.ts.map +1 -1
- package/build/_modules/mcp/_services/mcp-server.service-base.js +10 -0
- package/build/_modules/mcp/_services/mcp-server.service-base.js.map +1 -1
- package/build/_modules/mcp/index.d.ts +2 -0
- package/build/_modules/mcp/index.d.ts.map +1 -1
- package/build/_modules/mcp/index.js +2 -0
- package/build/_modules/mcp/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Request, Response } from 'express';
|
|
2
|
+
import { DyNTS_Endpoint_Params } from '../../../_models/control-models/endpoint-params.control-model';
|
|
3
|
+
import { DyNTS_Mcp_Adapter } from '../_services/dynts-mcp.adapter';
|
|
4
|
+
/**
|
|
5
|
+
* The REST endpoint that serves an MCP server over Streamable HTTP (HP-DOPL MP-3.4, D-3, DMCP-003) — a normal
|
|
6
|
+
* `DyNTS_Endpoint_Params`, so the admission control, the request hunter, the error handling and, above all, the
|
|
7
|
+
* consumer's preProcesses (authentication) run exactly as for any other route.
|
|
8
|
+
*
|
|
9
|
+
* Stateless JSON mode: `POST <path>` with a JSON-RPC body, `Accept: application/json, text/event-stream`.
|
|
10
|
+
* ⚠️ The bedrock does not choose the authentication: pass the app's guard (e.g. an API-key-or-token preProcess from
|
|
11
|
+
* `nts-fdp-templates`) — an MCP endpoint without a guard is public.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* this.endpoints = [
|
|
16
|
+
* DyNTS_McpHttpEndpoint_Util.getEndpoint({
|
|
17
|
+
* adapter: Organizer_McpServer.getInstance().build(),
|
|
18
|
+
* preProcesses: [ this.auth_CS.authenticate_apiKeyOrToken ],
|
|
19
|
+
* }),
|
|
20
|
+
* ];
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class DyNTS_McpHttpEndpoint_Util {
|
|
24
|
+
/**
|
|
25
|
+
* Builds the MCP endpoint.
|
|
26
|
+
* @param set.adapter - the built MCP adapter (tool registry)
|
|
27
|
+
* @param set.endpointPath - the route (default: `/mcp`)
|
|
28
|
+
* @param set.preProcesses - the auth / guard preProcesses
|
|
29
|
+
*/
|
|
30
|
+
static getEndpoint(set: {
|
|
31
|
+
adapter: DyNTS_Mcp_Adapter;
|
|
32
|
+
endpointPath?: string;
|
|
33
|
+
preProcesses?: ((req: Request, res: Response) => Promise<void>)[];
|
|
34
|
+
}): DyNTS_Endpoint_Params;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=mcp-http-endpoint.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-http-endpoint.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-http-endpoint.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,0BAA0B;IACrC;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE;QACtB,OAAO,EAAE,iBAAiB,CAAC;QAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;KACnE,GAAG,qBAAqB;CAa1B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_McpHttpEndpoint_Util = void 0;
|
|
4
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
|
+
const endpoint_params_control_model_1 = require("../../../_models/control-models/endpoint-params.control-model");
|
|
6
|
+
/**
|
|
7
|
+
* The REST endpoint that serves an MCP server over Streamable HTTP (HP-DOPL MP-3.4, D-3, DMCP-003) — a normal
|
|
8
|
+
* `DyNTS_Endpoint_Params`, so the admission control, the request hunter, the error handling and, above all, the
|
|
9
|
+
* consumer's preProcesses (authentication) run exactly as for any other route.
|
|
10
|
+
*
|
|
11
|
+
* Stateless JSON mode: `POST <path>` with a JSON-RPC body, `Accept: application/json, text/event-stream`.
|
|
12
|
+
* ⚠️ The bedrock does not choose the authentication: pass the app's guard (e.g. an API-key-or-token preProcess from
|
|
13
|
+
* `nts-fdp-templates`) — an MCP endpoint without a guard is public.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* this.endpoints = [
|
|
18
|
+
* DyNTS_McpHttpEndpoint_Util.getEndpoint({
|
|
19
|
+
* adapter: Organizer_McpServer.getInstance().build(),
|
|
20
|
+
* preProcesses: [ this.auth_CS.authenticate_apiKeyOrToken ],
|
|
21
|
+
* }),
|
|
22
|
+
* ];
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
class DyNTS_McpHttpEndpoint_Util {
|
|
26
|
+
/**
|
|
27
|
+
* Builds the MCP endpoint.
|
|
28
|
+
* @param set.adapter - the built MCP adapter (tool registry)
|
|
29
|
+
* @param set.endpointPath - the route (default: `/mcp`)
|
|
30
|
+
* @param set.preProcesses - the auth / guard preProcesses
|
|
31
|
+
*/
|
|
32
|
+
static getEndpoint(set) {
|
|
33
|
+
return new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
|
|
34
|
+
name: 'mcpStreamableHttp',
|
|
35
|
+
type: fsm_dynamo_1.DyFM_HttpCallType.post,
|
|
36
|
+
endpoint: set.endpointPath ?? '/mcp',
|
|
37
|
+
preProcesses: set.preProcesses ?? [],
|
|
38
|
+
tasks: [
|
|
39
|
+
async (req, res) => {
|
|
40
|
+
await set.adapter.handleHttpRequest(req, res, req.body);
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.DyNTS_McpHttpEndpoint_Util = DyNTS_McpHttpEndpoint_Util;
|
|
47
|
+
//# sourceMappingURL=mcp-http-endpoint.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-http-endpoint.util.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-http-endpoint.util.ts"],"names":[],"mappings":";;;AAEA,sDAA0D;AAE1D,iHAAsG;AAItG;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,0BAA0B;IACrC;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAIlB;QACC,OAAO,IAAI,qDAAqB,CAAC;YAC/B,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,8BAAiB,CAAC,IAAI;YAC5B,QAAQ,EAAE,GAAG,CAAC,YAAY,IAAI,MAAM;YACpC,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,EAAE;YACpC,KAAK,EAAE;gBACL,KAAK,EAAE,GAAY,EAAE,GAAa,EAAiB,EAAE;oBACnD,MAAM,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC1D,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,gEAwBC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { DyNTS_Operation_Identity } from '../../../_models/interfaces/operation-identity.interface';
|
|
2
|
+
import { DyNTS_McpTool_Params } from '../_models/control-models/mcp-tool-params.control-model';
|
|
3
|
+
import { DyNTS_Mcp_CallInfo, DyNTS_Mcp_ServerInfo, DyNTS_Mcp_ToolDefinition, DyNTS_Mcp_ToolOutcome } from '../_models/interfaces/dynts-mcp.interface';
|
|
4
|
+
import { DyNTS_Mcp_Settings } from '../_models/interfaces/mcp-settings.interface';
|
|
5
|
+
/**
|
|
6
|
+
* Turns operation-based tools into the MCP tool registry (HP-DOPL MP-3.5, DMCP-001/010) — the place where the MP-3
|
|
7
|
+
* pieces meet. For every ADVERTISED `DyNTS_McpTool_Params` one `DyNTS_Mcp_ToolDefinition` is built, whose handler runs:
|
|
8
|
+
*
|
|
9
|
+
* identity (REST-equal) → `DyFM_Operation_Context` (`transport: 'mcp'`) → args → positional inputs →
|
|
10
|
+
* `DyNTS_McpToolLoad_Util` (heavy tools) → `DyFM_OperationRun_Util.execute` (authz, guardrails, run) → `mapOutput`.
|
|
11
|
+
* Every error is thrown and turned into a caller-safe MCP error by the adapter (`DyNTS_McpError_Util`).
|
|
12
|
+
*
|
|
13
|
+
* Identity: over Streamable HTTP it is `DyNTS_AuthService.getOperationIdentityFromRequest(request)` — the SAME as the
|
|
14
|
+
* REST path, so a token gets the same issuer (accountId) on both; over stdio (no request) it is the given
|
|
15
|
+
* `stdioIdentity`, otherwise anonymous (an `issuerRequired` operation then answers 401 → forbidden).
|
|
16
|
+
*
|
|
17
|
+
* A generated `capabilities` tool (read-only) lists the advertised tools (DMCP-010).
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* protected getTools(): DyNTS_Mcp_ToolDefinition[] {
|
|
22
|
+
* return DyNTS_McpToolDefinition_Util.fromParams({ serverInfo: this.getServerInfo(), tools: [ getNoteTool ] });
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class DyNTS_McpToolDefinition_Util {
|
|
27
|
+
/**
|
|
28
|
+
* Builds the tool definitions of the advertised tools + the `capabilities` tool.
|
|
29
|
+
* @param set.tools - the operation tools
|
|
30
|
+
* @param set.serverInfo - the server identity (shown by `capabilities`)
|
|
31
|
+
* @param set.stdioIdentity - the caller identity of stdio calls (e.g. the local operator's account)
|
|
32
|
+
* @param set.settings - the MCP settings (default: `DyNTS_global_settings.mcp_settings`)
|
|
33
|
+
* @throws 500 `DyNTS-MTD-DUP` when two advertised tools have the same name
|
|
34
|
+
*/
|
|
35
|
+
static fromParams(set: {
|
|
36
|
+
tools: DyNTS_McpTool_Params[];
|
|
37
|
+
serverInfo: DyNTS_Mcp_ServerInfo;
|
|
38
|
+
stdioIdentity?: DyNTS_Operation_Identity;
|
|
39
|
+
settings?: DyNTS_Mcp_Settings | null;
|
|
40
|
+
}): DyNTS_Mcp_ToolDefinition[];
|
|
41
|
+
/**
|
|
42
|
+
* Runs one tool call through the single execution path.
|
|
43
|
+
* @param set.tool - the tool
|
|
44
|
+
* @param set.args - the `tools/call` arguments
|
|
45
|
+
* @param set.call - where the call came from
|
|
46
|
+
* @param set.stdioIdentity - the identity of stdio calls
|
|
47
|
+
*/
|
|
48
|
+
static call(set: {
|
|
49
|
+
tool: DyNTS_McpTool_Params;
|
|
50
|
+
args: unknown;
|
|
51
|
+
call?: DyNTS_Mcp_CallInfo;
|
|
52
|
+
stdioIdentity?: DyNTS_Operation_Identity;
|
|
53
|
+
}): Promise<DyNTS_Mcp_ToolOutcome>;
|
|
54
|
+
/**
|
|
55
|
+
* The positional inputs of an operation from the `tools/call` arguments — the MCP twin of the REST adapter:
|
|
56
|
+
* the declared inputs in declaration order (typed, defaults applied), then the body (the remaining arguments) when the
|
|
57
|
+
* operation takes one.
|
|
58
|
+
* @param tool - the tool
|
|
59
|
+
* @param args - the arguments object
|
|
60
|
+
* @throws 400 `DyNTS-MTD-INR` (missing) · `DyNTS-MTD-INT` (wrong type / not in the enum) · `DyNTS-MTD-UNK` (unknown)
|
|
61
|
+
*/
|
|
62
|
+
static buildInputs(tool: DyNTS_McpTool_Params, args: Record<string, unknown>): unknown[];
|
|
63
|
+
/** The generated read-only `capabilities` tool (DMCP-010). */
|
|
64
|
+
private static capabilitiesTool;
|
|
65
|
+
/** The caller identity: the REST-equal request identity over HTTP, the configured one over stdio. */
|
|
66
|
+
private static identityOf;
|
|
67
|
+
/** The arguments as an object (missing = empty). */
|
|
68
|
+
private static argsObject;
|
|
69
|
+
/** Checks a JSON value against the declared basic type and enum. */
|
|
70
|
+
private static checkType;
|
|
71
|
+
/** A caller-facing 400 input error (the message is safe: it names only our own tool and inputs). */
|
|
72
|
+
private static inputError;
|
|
73
|
+
/** A coded error. */
|
|
74
|
+
private static error;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=mcp-tool-definition.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-tool-definition.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-tool-definition.util.ts"],"names":[],"mappings":"A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C,MAAM,CAAC,KAAK;CAQrB"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_McpToolDefinition_Util = void 0;
|
|
4
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
|
+
const global_settings_const_1 = require("../../../_collections/global-settings.const");
|
|
6
|
+
const global_service_1 = require("../../../_services/core/global.service");
|
|
7
|
+
const mcp_tool_exposure_type_enum_1 = require("../_enums/mcp-tool-exposure.type-enum");
|
|
8
|
+
const mcp_tool_load_util_1 = require("./mcp-tool-load.util");
|
|
9
|
+
/** The guardrail arguments an MCP call may carry next to the inputs (never passed to the operation as input). */
|
|
10
|
+
const DyNTS_mcpGuardrailArgs = ['ifMatch', 'dryRun'];
|
|
11
|
+
/**
|
|
12
|
+
* Turns operation-based tools into the MCP tool registry (HP-DOPL MP-3.5, DMCP-001/010) — the place where the MP-3
|
|
13
|
+
* pieces meet. For every ADVERTISED `DyNTS_McpTool_Params` one `DyNTS_Mcp_ToolDefinition` is built, whose handler runs:
|
|
14
|
+
*
|
|
15
|
+
* identity (REST-equal) → `DyFM_Operation_Context` (`transport: 'mcp'`) → args → positional inputs →
|
|
16
|
+
* `DyNTS_McpToolLoad_Util` (heavy tools) → `DyFM_OperationRun_Util.execute` (authz, guardrails, run) → `mapOutput`.
|
|
17
|
+
* Every error is thrown and turned into a caller-safe MCP error by the adapter (`DyNTS_McpError_Util`).
|
|
18
|
+
*
|
|
19
|
+
* Identity: over Streamable HTTP it is `DyNTS_AuthService.getOperationIdentityFromRequest(request)` — the SAME as the
|
|
20
|
+
* REST path, so a token gets the same issuer (accountId) on both; over stdio (no request) it is the given
|
|
21
|
+
* `stdioIdentity`, otherwise anonymous (an `issuerRequired` operation then answers 401 → forbidden).
|
|
22
|
+
*
|
|
23
|
+
* A generated `capabilities` tool (read-only) lists the advertised tools (DMCP-010).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* protected getTools(): DyNTS_Mcp_ToolDefinition[] {
|
|
28
|
+
* return DyNTS_McpToolDefinition_Util.fromParams({ serverInfo: this.getServerInfo(), tools: [ getNoteTool ] });
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
class DyNTS_McpToolDefinition_Util {
|
|
33
|
+
/**
|
|
34
|
+
* Builds the tool definitions of the advertised tools + the `capabilities` tool.
|
|
35
|
+
* @param set.tools - the operation tools
|
|
36
|
+
* @param set.serverInfo - the server identity (shown by `capabilities`)
|
|
37
|
+
* @param set.stdioIdentity - the caller identity of stdio calls (e.g. the local operator's account)
|
|
38
|
+
* @param set.settings - the MCP settings (default: `DyNTS_global_settings.mcp_settings`)
|
|
39
|
+
* @throws 500 `DyNTS-MTD-DUP` when two advertised tools have the same name
|
|
40
|
+
*/
|
|
41
|
+
static fromParams(set) {
|
|
42
|
+
const settings = set.settings === undefined ? global_settings_const_1.DyNTS_global_settings.mcp_settings : set.settings;
|
|
43
|
+
const advertised = set.tools.filter((tool) => tool.isAdvertised(settings));
|
|
44
|
+
const definitions = advertised.map((tool) => ({
|
|
45
|
+
name: tool.getToolName(settings),
|
|
46
|
+
description: tool.description,
|
|
47
|
+
inputSchema: tool.inputSchema,
|
|
48
|
+
handler: (args, call) => DyNTS_McpToolDefinition_Util.call({ tool: tool, args: args, call: call, stdioIdentity: set.stdioIdentity }),
|
|
49
|
+
}));
|
|
50
|
+
definitions.push(DyNTS_McpToolDefinition_Util.capabilitiesTool({
|
|
51
|
+
serverInfo: set.serverInfo, tools: advertised, settings: settings,
|
|
52
|
+
}));
|
|
53
|
+
const seen = new Set();
|
|
54
|
+
definitions.forEach((definition) => {
|
|
55
|
+
if (seen.has(definition.name)) {
|
|
56
|
+
throw DyNTS_McpToolDefinition_Util.error({
|
|
57
|
+
status: 500, code: 'DyNTS-MTD-DUP', message: `two MCP tools are advertised as "${definition.name}"`,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
seen.add(definition.name);
|
|
61
|
+
});
|
|
62
|
+
return definitions;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Runs one tool call through the single execution path.
|
|
66
|
+
* @param set.tool - the tool
|
|
67
|
+
* @param set.args - the `tools/call` arguments
|
|
68
|
+
* @param set.call - where the call came from
|
|
69
|
+
* @param set.stdioIdentity - the identity of stdio calls
|
|
70
|
+
*/
|
|
71
|
+
static async call(set) {
|
|
72
|
+
const args = DyNTS_McpToolDefinition_Util.argsObject(set.tool, set.args);
|
|
73
|
+
const identity = DyNTS_McpToolDefinition_Util.identityOf(set.call, set.stdioIdentity);
|
|
74
|
+
const ctx = new fsm_dynamo_1.DyFM_Operation_Context({
|
|
75
|
+
transport: 'mcp',
|
|
76
|
+
authKind: identity.authKind,
|
|
77
|
+
issuer: identity.issuer,
|
|
78
|
+
clientUserId: identity.clientUserId,
|
|
79
|
+
apiKeyScopes: identity.apiKeyScopes,
|
|
80
|
+
ifMatch: typeof args.ifMatch === 'string' && args.ifMatch ? args.ifMatch : undefined,
|
|
81
|
+
dryRun: args.dryRun === true,
|
|
82
|
+
});
|
|
83
|
+
const inputs = DyNTS_McpToolDefinition_Util.buildInputs(set.tool, args);
|
|
84
|
+
const outcome = await mcp_tool_load_util_1.DyNTS_McpToolLoad_Util.run(set.tool, () => fsm_dynamo_1.DyFM_OperationRun_Util.execute(set.tool.operation, ctx, inputs));
|
|
85
|
+
return { data: await set.tool.mapOutput(outcome.result, ctx) };
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The positional inputs of an operation from the `tools/call` arguments — the MCP twin of the REST adapter:
|
|
89
|
+
* the declared inputs in declaration order (typed, defaults applied), then the body (the remaining arguments) when the
|
|
90
|
+
* operation takes one.
|
|
91
|
+
* @param tool - the tool
|
|
92
|
+
* @param args - the arguments object
|
|
93
|
+
* @throws 400 `DyNTS-MTD-INR` (missing) · `DyNTS-MTD-INT` (wrong type / not in the enum) · `DyNTS-MTD-UNK` (unknown)
|
|
94
|
+
*/
|
|
95
|
+
static buildInputs(tool, args) {
|
|
96
|
+
const declared = Object.entries(tool.operation.inputs ?? {});
|
|
97
|
+
const names = declared.map(([name]) => name);
|
|
98
|
+
const inputs = declared.map(([name, input]) => {
|
|
99
|
+
const value = args[name];
|
|
100
|
+
if (value === undefined || value === null) {
|
|
101
|
+
if (input.required === true && input.default === undefined) {
|
|
102
|
+
throw DyNTS_McpToolDefinition_Util.inputError('DyNTS-MTD-INR', `${tool.tool}: "${name}" is required`);
|
|
103
|
+
}
|
|
104
|
+
return input.default;
|
|
105
|
+
}
|
|
106
|
+
return DyNTS_McpToolDefinition_Util.checkType(tool, name, input, value);
|
|
107
|
+
});
|
|
108
|
+
const rest = {};
|
|
109
|
+
Object.keys(args)
|
|
110
|
+
.filter((key) => !names.includes(key) && !DyNTS_mcpGuardrailArgs.includes(key))
|
|
111
|
+
.forEach((key) => {
|
|
112
|
+
rest[key] = args[key];
|
|
113
|
+
});
|
|
114
|
+
if (tool.operation.bodyParams || tool.operation.isBodyUntyped) {
|
|
115
|
+
inputs.push(rest);
|
|
116
|
+
}
|
|
117
|
+
else if (Object.keys(rest).length) {
|
|
118
|
+
throw DyNTS_McpToolDefinition_Util.inputError('DyNTS-MTD-UNK', `${tool.tool}: unknown argument(s) ${Object.keys(rest).join(', ')}`);
|
|
119
|
+
}
|
|
120
|
+
return inputs;
|
|
121
|
+
}
|
|
122
|
+
/** The generated read-only `capabilities` tool (DMCP-010). */
|
|
123
|
+
static capabilitiesTool(set) {
|
|
124
|
+
return {
|
|
125
|
+
name: `${set.settings?.toolPrefix ?? ''}capabilities`,
|
|
126
|
+
description: 'Lists the tools of this MCP server: name, description, whether it is read-only or heavy.',
|
|
127
|
+
inputSchema: { type: 'object', properties: {}, additionalProperties: false },
|
|
128
|
+
handler: async () => ({
|
|
129
|
+
data: {
|
|
130
|
+
server: { name: set.serverInfo.name, version: set.serverInfo.version },
|
|
131
|
+
readOnlyServer: set.settings?.readOnly === true,
|
|
132
|
+
tools: set.tools.map((tool) => ({
|
|
133
|
+
name: tool.getToolName(set.settings),
|
|
134
|
+
description: tool.description,
|
|
135
|
+
readOnly: tool.exposure === mcp_tool_exposure_type_enum_1.DyNTS_McpToolExposure_Type.readOnly,
|
|
136
|
+
heavy: tool.isHeavy,
|
|
137
|
+
})),
|
|
138
|
+
},
|
|
139
|
+
}),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/** The caller identity: the REST-equal request identity over HTTP, the configured one over stdio. */
|
|
143
|
+
static identityOf(call, stdioIdentity) {
|
|
144
|
+
const anonymous = { authKind: fsm_dynamo_1.DyFM_OperationAuth_Type.none };
|
|
145
|
+
if (call?.request) {
|
|
146
|
+
return global_service_1.DyNTS_GlobalService?.getAuthService()?.getOperationIdentityFromRequest?.(call.request) ?? anonymous;
|
|
147
|
+
}
|
|
148
|
+
return stdioIdentity ?? anonymous;
|
|
149
|
+
}
|
|
150
|
+
/** The arguments as an object (missing = empty). */
|
|
151
|
+
static argsObject(tool, args) {
|
|
152
|
+
if (args === undefined || args === null) {
|
|
153
|
+
return {};
|
|
154
|
+
}
|
|
155
|
+
if (typeof args !== 'object' || Array.isArray(args)) {
|
|
156
|
+
throw DyNTS_McpToolDefinition_Util.inputError('DyNTS-MTD-ARG', `${tool.tool}: the arguments must be an object`);
|
|
157
|
+
}
|
|
158
|
+
return args;
|
|
159
|
+
}
|
|
160
|
+
/** Checks a JSON value against the declared basic type and enum. */
|
|
161
|
+
static checkType(tool, name, input, value) {
|
|
162
|
+
const expected = {
|
|
163
|
+
[fsm_dynamo_1.DyFM_BasicProperty_Type.string]: 'string',
|
|
164
|
+
[fsm_dynamo_1.DyFM_BasicProperty_Type.number]: 'number',
|
|
165
|
+
[fsm_dynamo_1.DyFM_BasicProperty_Type.boolean]: 'boolean',
|
|
166
|
+
}[input.type];
|
|
167
|
+
let converted = value;
|
|
168
|
+
if (expected && (typeof value !== expected || (expected === 'number' && !Number.isFinite(value)))) {
|
|
169
|
+
throw DyNTS_McpToolDefinition_Util.inputError('DyNTS-MTD-INT', `${tool.tool}: "${name}" must be a ${expected}`);
|
|
170
|
+
}
|
|
171
|
+
if (input.type === fsm_dynamo_1.DyFM_BasicProperty_Type.date) {
|
|
172
|
+
converted = new Date(value);
|
|
173
|
+
if (typeof value !== 'string' || Number.isNaN(converted.getTime())) {
|
|
174
|
+
throw DyNTS_McpToolDefinition_Util.inputError('DyNTS-MTD-INT', `${tool.tool}: "${name}" must be an ISO date`);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (input.enum && !input.enum.includes(value)) {
|
|
178
|
+
throw DyNTS_McpToolDefinition_Util.inputError('DyNTS-MTD-INT', `${tool.tool}: "${name}" must be one of ${input.enum.join(', ')}`);
|
|
179
|
+
}
|
|
180
|
+
return converted;
|
|
181
|
+
}
|
|
182
|
+
/** A caller-facing 400 input error (the message is safe: it names only our own tool and inputs). */
|
|
183
|
+
static inputError(code, message) {
|
|
184
|
+
return DyNTS_McpToolDefinition_Util.error({ status: 400, code: code, message: message, userMessage: message });
|
|
185
|
+
}
|
|
186
|
+
/** A coded error. */
|
|
187
|
+
static error(set) {
|
|
188
|
+
return new fsm_dynamo_1.DyFM_Error({
|
|
189
|
+
status: set.status,
|
|
190
|
+
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|${set.code}`,
|
|
191
|
+
message: set.message,
|
|
192
|
+
userMessage: set.userMessage,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.DyNTS_McpToolDefinition_Util = DyNTS_McpToolDefinition_Util;
|
|
197
|
+
//# sourceMappingURL=mcp-tool-definition.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-tool-definition.util.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_collections/mcp-tool-definition.util.ts"],"names":[],"mappings":";;;AAAA,sDAG+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AAS,CAAC;IACnB,CAAC;IAED,oGAAoG;IAC5F,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,OAAe;QACrD,OAAO,4BAA4B,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;IACjH,CAAC;IAED,qBAAqB;IACb,MAAM,CAAC,KAAK,CAAC,GAA4E;QAC/F,OAAO,IAAI,uBAAU,CAAC;YACpB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,IAAI,GAAG,CAAC,IAAI,EAAE;YACrE,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,WAAW,EAAE,GAAG,CAAC,WAAW;SAC7B,CAAC,CAAC;IACL,CAAC;CACF;AA3ND,oEA2NC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IncomingMessage } from 'http';
|
|
1
2
|
/**
|
|
2
3
|
* MCP-réteg shared vokabulár (BFR-AM-003) — a domain-agnosztikus MCP-szerver-base + adaptor közös
|
|
3
4
|
* típusai. Egy fájlban a szorosan összetartozó tool-/transport-típusok (`*.interface.ts` az
|
|
@@ -53,7 +54,17 @@ export interface DyNTS_Mcp_ToolOutcome {
|
|
|
53
54
|
* input-shape-jére validál + a `DyNTS_Mcp_ToolOutcome`-ot adja. A hibát NEM nyeli el (strukturált
|
|
54
55
|
* hiba-payload `isError:true`-val VAGY dobott exception, amit az adaptor egységes MCP-error-ré fordít).
|
|
55
56
|
*/
|
|
56
|
-
export type DyNTS_Mcp_ToolHandler = (args: unknown) => Promise<DyNTS_Mcp_ToolOutcome>;
|
|
57
|
+
export type DyNTS_Mcp_ToolHandler = (args: unknown, call?: DyNTS_Mcp_CallInfo) => Promise<DyNTS_Mcp_ToolOutcome>;
|
|
58
|
+
/**
|
|
59
|
+
* Where a tool call came from (HP-DOPL MP-3.5) — the second, optional handler argument, so a handler can resolve the
|
|
60
|
+
* caller identity the same way as the REST path (`getOperationIdentityFromRequest(call.request)`).
|
|
61
|
+
*/
|
|
62
|
+
export interface DyNTS_Mcp_CallInfo {
|
|
63
|
+
/** The transport of the call. */
|
|
64
|
+
transport: DyNTS_Mcp_TransportKind;
|
|
65
|
+
/** The HTTP request (Streamable HTTP only) — carries what the endpoint guard put on it. */
|
|
66
|
+
request?: IncomingMessage;
|
|
67
|
+
}
|
|
57
68
|
/**
|
|
58
69
|
* Egy MCP tool-definíció (a `registerTool` egységes shape-je). A consumer ezt a shape-et használja az
|
|
59
70
|
* advertised halmazba (`name`+`description`+`inputSchema`+`handler`). A `tools/list` a regisztrált
|
|
@@ -83,7 +94,7 @@ export interface DyNTS_Mcp_ServerInfo {
|
|
|
83
94
|
* ezzel választ — egy jövőbeli transport (pl. `http`/`sse`) NON-breaking módon bővíthető (csak az
|
|
84
95
|
* adaptor `start`-ja kap új ágat; a server-base + a tool-ok változatlanok).
|
|
85
96
|
*/
|
|
86
|
-
export type DyNTS_Mcp_TransportKind = 'stdio';
|
|
97
|
+
export type DyNTS_Mcp_TransportKind = 'stdio' | 'streamable-http';
|
|
87
98
|
/**
|
|
88
99
|
* A `start()` opciói. A `transport` választja a csatornát (default `stdio`).
|
|
89
100
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynts-mcp.interface.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;IACrD,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;IACrC,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC,oEAAoE;IACpE,IAAI,EAAE,OAAO,CAAC;IACd,gFAAgF;IAChF,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"dynts-mcp.interface.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5C;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAC;IACrD,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;IACrC,+DAA+D;IAC/D,WAAW,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AAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* MCP-réteg shared vokabulár (BFR-AM-003) — a domain-agnosztikus MCP-szerver-base + adaptor közös
|
|
4
|
-
* típusai. Egy fájlban a szorosan összetartozó tool-/transport-típusok (`*.interface.ts` az
|
|
5
|
-
* egy-export-per-file konvenció ismert kivétele a tightly-coupled shape-ekre).
|
|
6
|
-
*
|
|
7
|
-
* Boundary: a `DyNTS_McpToolDefinition` + a `DyNTS_Mcp_Adapter` egyetlen `registerTool` choke-pontot
|
|
8
|
-
* ad — a hivatalos `@modelcontextprotocol/sdk` KIZÁRÓLAG az adaptor mögött él, így egy jövőbeli
|
|
9
|
-
* transport-/SDK-csere NEM-breaking (csak az adaptor cserélődik, a `DyNTS_Mcp_Server_ServiceBase` + a
|
|
10
|
-
* consumer-tool-ok változatlanok). A consumer a SAJÁT tool-jait regisztrálja (a bedrock NEM definiál
|
|
11
|
-
* domain-tool-okat — csak a server-base + a transport + a registry).
|
|
12
|
-
*/
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
//# sourceMappingURL=dynts-mcp.interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynts-mcp.interface.js","sourceRoot":"","sources":["../../../../../src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynts-mcp.interface.js","sourceRoot":"","sources":["../../../../../src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
import { DyNTS_Mcp_CallInfo, DyNTS_Mcp_CallResult, DyNTS_Mcp_ServerInfo, DyNTS_Mcp_ToolDefinition } from '../_models/interfaces/dynts-mcp.interface';
|
|
2
3
|
/**
|
|
3
4
|
* `DyNTS_Mcp_Adapter` (BFR-AM-003) — a hivatalos `@modelcontextprotocol/sdk` köré épített **vékony
|
|
4
5
|
* adaptor-réteg**. EZ az EGYETLEN hely a `/mcp` submodule-ban, ahol a SDK-típusok megjelennek — a
|
|
@@ -40,6 +41,17 @@ export declare class DyNTS_Mcp_Adapter {
|
|
|
40
41
|
* regisztrált tool-okat hirdeti. A boot-üzenetek a stderr-en (a hívó App felel).
|
|
41
42
|
*/
|
|
42
43
|
startStdio(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Serves ONE MCP Streamable-HTTP request (HP-DOPL MP-3.4, D-3, DMCP-003) — stateless: every request gets its own
|
|
46
|
+
* SDK server + transport (no session id, JSON responses instead of an SSE stream), both closed when the response
|
|
47
|
+
* closes. The tool registry is shared, so `tools/list` and `tools/call` behave exactly as on stdio.
|
|
48
|
+
* Authentication is NOT done here: the serving endpoint runs the consumer's preProcesses first
|
|
49
|
+
* (`DyNTS_McpHttpEndpoint_Util`).
|
|
50
|
+
* @param req - the incoming HTTP request
|
|
51
|
+
* @param res - the HTTP response the SDK writes
|
|
52
|
+
* @param body - the already parsed JSON-RPC body (e.g. `req.body` behind express.json)
|
|
53
|
+
*/
|
|
54
|
+
handleHttpRequest(req: IncomingMessage, res: ServerResponse, body?: unknown): Promise<void>;
|
|
43
55
|
/** A szerver leállítása (graceful close — teszt-/shutdown-úthoz). */
|
|
44
56
|
close(): Promise<void>;
|
|
45
57
|
/**
|
|
@@ -50,14 +62,17 @@ export declare class DyNTS_Mcp_Adapter {
|
|
|
50
62
|
dispatchToolCall(set: {
|
|
51
63
|
name: string;
|
|
52
64
|
arguments?: unknown;
|
|
65
|
+
call?: DyNTS_Mcp_CallInfo;
|
|
53
66
|
}): Promise<DyNTS_Mcp_CallResult>;
|
|
54
67
|
/**
|
|
55
68
|
* Loads the SDK; a missing SDK becomes a coded error that says what to install.
|
|
56
69
|
* @throws 501 `DyNTS-OPT-MIS` (the SDK is not installed) · `DyNTS-OPT-LDF` (installed, but failed to load)
|
|
57
70
|
*/
|
|
58
71
|
private static loadSdk;
|
|
59
|
-
/** The SDK server, created once with the handlers installed. */
|
|
72
|
+
/** The stdio SDK server, created once with the handlers installed. */
|
|
60
73
|
private getServer;
|
|
74
|
+
/** A new SDK server with the tools/list + tools/call handlers installed (stdio: once · HTTP: per request). */
|
|
75
|
+
private createServer;
|
|
61
76
|
/** A `tools/list` és a `tools/call` JSON-RPC handler bekötése a SDK-szerverre. */
|
|
62
77
|
private installHandlers;
|
|
63
78
|
/** Egy sikeres (vagy strukturált-hiba) handler-outcome → `CallToolResult` (text-JSON content). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynts-mcp.adapter.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/dynts-mcp.adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynts-mcp.adapter.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/dynts-mcp.adapter.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAO5D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,2CAA2C,CAAC;AAcnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,iBAAiB;IAE5B,6FAA6F;IAC7F,OAAO,CAAC,MAAM,CAAC,SAAS,CAiBtB;IAEF,yGAAyG;IACzG,OAAO,CAAC,MAAM,CAAuB;IAErC,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAElD,uFAAuF;IACvF,OAAO,CAAC,QAAQ,CAAC,KAAK,CACwB;gBAElC,GAAG,EAAE,oBAAoB;IAKrC;;;SAGK;IACE,YAAY,CAAC,UAAU,EAAE,wBAAwB,GAAG,IAAI;IAI/D,8EAA8E;IACvE,sBAAsB,IAAI,MAAM,EAAE;IAIzC;;;SAGK;IACQ,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAOxC;;;;;;;;;OASG;IACU,iBAAiB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBxG,qEAAqE;IACxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAOnC;;;;SAIK;IACQ,gBAAgB,CAAC,GAAG,EAAE;QACjC,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,IAAI,CAAC,EAAE,kBAAkB,CAAC;KAC3B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAsBjC;;;OAGG;mBACkB,OAAO;IAO5B,sEAAsE;IACtE,OAAO,CAAC,SAAS;IAQjB,8GAA8G;IAC9G,OAAO,CAAC,YAAY;IAWpB,kFAAkF;IAClF,OAAO,CAAC,eAAe;IA4BvB,kGAAkG;IAClG,OAAO,CAAC,YAAY;IAOpB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAiBnB,mGAAmG;IACnG,OAAO,CAAC,SAAS;CAOlB"}
|
|
@@ -34,7 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.DyNTS_Mcp_Adapter = void 0;
|
|
37
|
-
/* eslint-enable @futdevpro/dynamo/no-js-import */
|
|
38
37
|
const optional_peer_util_1 = require("../../../_collections/optional-peer.util");
|
|
39
38
|
const mcp_error_util_1 = require("../_collections/mcp-error.util");
|
|
40
39
|
const mcp_method_not_found_error_1 = require("../_models/errors/mcp-method-not-found.error");
|
|
@@ -63,15 +62,17 @@ class DyNTS_Mcp_Adapter {
|
|
|
63
62
|
/** Loads the SDK modules - a static seam, so a spec can simulate a missing or a fake SDK. */
|
|
64
63
|
static importSdk = async () => {
|
|
65
64
|
/* eslint-disable @futdevpro/dynamo/no-js-import */
|
|
66
|
-
const [serverModule, stdioModule, typesModule] = await Promise.all([
|
|
65
|
+
const [serverModule, stdioModule, httpModule, typesModule] = await Promise.all([
|
|
67
66
|
Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/server/index.js'))),
|
|
68
67
|
Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/server/stdio.js'))),
|
|
68
|
+
Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/server/streamableHttp.js'))),
|
|
69
69
|
Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/types.js'))),
|
|
70
70
|
]);
|
|
71
71
|
/* eslint-enable @futdevpro/dynamo/no-js-import */
|
|
72
72
|
return {
|
|
73
73
|
Server: serverModule.Server,
|
|
74
74
|
StdioServerTransport: stdioModule.StdioServerTransport,
|
|
75
|
+
StreamableHTTPServerTransport: httpModule.StreamableHTTPServerTransport,
|
|
75
76
|
CallToolRequestSchema: typesModule.CallToolRequestSchema,
|
|
76
77
|
ListToolsRequestSchema: typesModule.ListToolsRequestSchema,
|
|
77
78
|
};
|
|
@@ -106,6 +107,30 @@ class DyNTS_Mcp_Adapter {
|
|
|
106
107
|
const transport = new sdk.StdioServerTransport();
|
|
107
108
|
await this.getServer(sdk).connect(transport);
|
|
108
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Serves ONE MCP Streamable-HTTP request (HP-DOPL MP-3.4, D-3, DMCP-003) — stateless: every request gets its own
|
|
112
|
+
* SDK server + transport (no session id, JSON responses instead of an SSE stream), both closed when the response
|
|
113
|
+
* closes. The tool registry is shared, so `tools/list` and `tools/call` behave exactly as on stdio.
|
|
114
|
+
* Authentication is NOT done here: the serving endpoint runs the consumer's preProcesses first
|
|
115
|
+
* (`DyNTS_McpHttpEndpoint_Util`).
|
|
116
|
+
* @param req - the incoming HTTP request
|
|
117
|
+
* @param res - the HTTP response the SDK writes
|
|
118
|
+
* @param body - the already parsed JSON-RPC body (e.g. `req.body` behind express.json)
|
|
119
|
+
*/
|
|
120
|
+
async handleHttpRequest(req, res, body) {
|
|
121
|
+
const sdk = await DyNTS_Mcp_Adapter.loadSdk();
|
|
122
|
+
const server = this.createServer(sdk, { transport: 'streamable-http', request: req });
|
|
123
|
+
const transport = new sdk.StreamableHTTPServerTransport({
|
|
124
|
+
sessionIdGenerator: undefined, enableJsonResponse: true,
|
|
125
|
+
});
|
|
126
|
+
// stateless: the per-request server and transport live exactly as long as the response
|
|
127
|
+
res.on('close', () => {
|
|
128
|
+
void transport.close();
|
|
129
|
+
void server.close();
|
|
130
|
+
});
|
|
131
|
+
await server.connect(transport);
|
|
132
|
+
await transport.handleRequest(req, res, body);
|
|
133
|
+
}
|
|
109
134
|
/** A szerver leállítása (graceful close — teszt-/shutdown-úthoz). */
|
|
110
135
|
async close() {
|
|
111
136
|
// no-op when no transport was started (the SDK server does not exist yet)
|
|
@@ -125,7 +150,7 @@ class DyNTS_Mcp_Adapter {
|
|
|
125
150
|
return this.errorResult(new mcp_method_not_found_error_1.DyNTS_Mcp_MethodNotFoundError(`Unknown tool: '${set.name}'. Advertised tools: ${this.getAdvertisedToolNames().join(', ')}.`), set.name);
|
|
126
151
|
}
|
|
127
152
|
try {
|
|
128
|
-
const outcome = await definition.handler(set.arguments);
|
|
153
|
+
const outcome = await definition.handler(set.arguments, set.call);
|
|
129
154
|
return this.toCallResult(outcome);
|
|
130
155
|
}
|
|
131
156
|
catch (error) {
|
|
@@ -145,16 +170,23 @@ class DyNTS_Mcp_Adapter {
|
|
|
145
170
|
importer: DyNTS_Mcp_Adapter.importSdk,
|
|
146
171
|
});
|
|
147
172
|
}
|
|
148
|
-
/** The SDK server, created once with the handlers installed. */
|
|
173
|
+
/** The stdio SDK server, created once with the handlers installed. */
|
|
149
174
|
getServer(sdk) {
|
|
150
175
|
if (!this.server) {
|
|
151
|
-
this.server =
|
|
152
|
-
this.installHandlers(this.server, sdk);
|
|
176
|
+
this.server = this.createServer(sdk, { transport: 'stdio' });
|
|
153
177
|
}
|
|
154
178
|
return this.server;
|
|
155
179
|
}
|
|
180
|
+
/** A new SDK server with the tools/list + tools/call handlers installed (stdio: once · HTTP: per request). */
|
|
181
|
+
createServer(sdk, call) {
|
|
182
|
+
const server = new sdk.Server({ name: this.serverInfo.name, version: this.serverInfo.version }, { capabilities: { tools: {} } });
|
|
183
|
+
this.installHandlers({ server: server, sdk: sdk, call: call });
|
|
184
|
+
return server;
|
|
185
|
+
}
|
|
156
186
|
/** A `tools/list` és a `tools/call` JSON-RPC handler bekötése a SDK-szerverre. */
|
|
157
|
-
installHandlers(
|
|
187
|
+
installHandlers(set) {
|
|
188
|
+
const server = set.server;
|
|
189
|
+
const sdk = set.sdk;
|
|
158
190
|
// tools/list — PONTOSAN a regisztrált (advertised) tool-okat hirdeti.
|
|
159
191
|
server.setRequestHandler(sdk.ListToolsRequestSchema, async () => ({
|
|
160
192
|
tools: Array.from(this.tools.values()).map((definition) => ({
|
|
@@ -169,6 +201,7 @@ class DyNTS_Mcp_Adapter {
|
|
|
169
201
|
server.setRequestHandler(sdk.CallToolRequestSchema, async (request) => (await this.dispatchToolCall({
|
|
170
202
|
name: request.params.name,
|
|
171
203
|
arguments: request.params.arguments,
|
|
204
|
+
call: set.call,
|
|
172
205
|
})));
|
|
173
206
|
}
|
|
174
207
|
// =========================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynts-mcp.adapter.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/dynts-mcp.adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dynts-mcp.adapter.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/dynts-mcp.adapter.ts"],"names":[],"mappings":";;;;;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EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,wCAAwC,EAAE,EAAE,CAAC,CAAC;QACrG,CAAC;IACH,CAAC;;AAjOH,8CAkOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/mcp-server.service-base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-server.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/mcp-server.service-base.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EAEzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,8BAAsB,4BAA4B;IAEhD,oGAAoG;IACpG,OAAO,CAAC,OAAO,CAAkC;IAE/C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,oBAAoB;IAExD;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,wBAAwB,EAAE;IAEzD;;;;OAIG;IACI,KAAK,IAAI,iBAAiB;IAcjC;;;;OAIG;IACU,KAAK,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnE;;;OAGG;IACI,sBAAsB,IAAI,MAAM,EAAE;IAMzC;;;;OAIG;IACU,QAAQ,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIhG,qEAAqE;IACxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMnC;;;OAGG;YACW,cAAc;CAsB/B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DyNTS_Mcp_Server_ServiceBase = void 0;
|
|
4
4
|
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
|
+
const global_settings_const_1 = require("../../../_collections/global-settings.const");
|
|
5
6
|
const dynts_mcp_adapter_1 = require("./dynts-mcp.adapter");
|
|
6
7
|
/**
|
|
7
8
|
* `DyNTS_Mcp_Server_ServiceBase` (BFR-AM-003) — a **domain-agnosztikus** MCP-szerver-base. Egy bedrock-réteg
|
|
@@ -89,6 +90,15 @@ class DyNTS_Mcp_Server_ServiceBase {
|
|
|
89
90
|
case 'stdio':
|
|
90
91
|
await adapter.startStdio();
|
|
91
92
|
return;
|
|
93
|
+
case 'streamable-http':
|
|
94
|
+
// HP-DOPL MP-3.4: HTTP has nothing to start - the app route serves it (getHttpEndpoint)
|
|
95
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
96
|
+
status: 400,
|
|
97
|
+
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MCP-HTP`,
|
|
98
|
+
// not a prototype method on purpose: the export-compatibility spec pins the prototype of this base
|
|
99
|
+
message: 'the streamable-http transport is served by an endpoint, not started: add ' +
|
|
100
|
+
'DyNTS_McpHttpEndpoint_Util.getEndpoint({ adapter: server.build(), preProcesses }) to a controller',
|
|
101
|
+
});
|
|
92
102
|
default:
|
|
93
103
|
// Exhaustiveness-guard: a `DyNTS_Mcp_TransportKind` bővülésekor itt fordítási hibát kapunk.
|
|
94
104
|
throw new Error(`Unsupported MCP transport: '${transport}'.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.service-base.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/mcp-server.service-base.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"mcp-server.service-base.js","sourceRoot":"","sources":["../../../../src/_modules/mcp/_services/mcp-server.service-base.ts"],"names":[],"mappings":";;;AAAA,sDAA6D;AAE7D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AC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,QAAQ,CAAC,GAA0C;QAC9D,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,qEAAqE;IAC9D,KAAK,CAAC,KAAK;QAChB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,cAAc,CAAC,OAA0B,EAAE,SAAkC;QACzF,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,OAAO;gBACV,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;gBAE3B,OAAO;YAET,KAAK,iBAAiB;gBACpB,wFAAwF;gBACxF,MAAM,IAAI,uBAAU,CAAC;oBACnB,MAAM,EAAE,GAAG;oBACX,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,gBAAgB;oBACvE,mGAAmG;oBACnG,OAAO,EAAE,2EAA2E;wBAClF,mGAAmG;iBACtG,CAAC,CAAC;YAEL;gBACE,4FAA4F;gBAC5F,MAAM,IAAI,KAAK,CAAC,+BAA+B,SAAmB,IAAI,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;CACJ;AAtGD,oEAsGC"}
|
|
@@ -13,7 +13,9 @@ export * from './_models/errors/mcp-invalid-params.error';
|
|
|
13
13
|
export * from './_models/errors/mcp-method-not-found.error';
|
|
14
14
|
export * from './_models/control-models/mcp-tool-params.control-model';
|
|
15
15
|
export * from './_collections/mcp-error.util';
|
|
16
|
+
export * from './_collections/mcp-http-endpoint.util';
|
|
16
17
|
export * from './_collections/mcp-ref.util';
|
|
18
|
+
export * from './_collections/mcp-tool-definition.util';
|
|
17
19
|
export * from './_collections/mcp-tool-load.util';
|
|
18
20
|
export * from './_services/dynts-mcp.adapter';
|
|
19
21
|
export * from './_services/mcp-server.service-base';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/mcp/index.ts"],"names":[],"mappings":"AAQA,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0DAA0D,CAAC;AAGzE,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAG5D,cAAc,wDAAwD,CAAC;AAGvE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAGlD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/mcp/index.ts"],"names":[],"mappings":"AAQA,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0DAA0D,CAAC;AAGzE,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAG5D,cAAc,wDAAwD,CAAC;AAGvE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAGlD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC"}
|
|
@@ -25,7 +25,9 @@ tslib_1.__exportStar(require("./_models/errors/mcp-method-not-found.error"), exp
|
|
|
25
25
|
tslib_1.__exportStar(require("./_models/control-models/mcp-tool-params.control-model"), exports);
|
|
26
26
|
// COLLECTIONS
|
|
27
27
|
tslib_1.__exportStar(require("./_collections/mcp-error.util"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./_collections/mcp-http-endpoint.util"), exports);
|
|
28
29
|
tslib_1.__exportStar(require("./_collections/mcp-ref.util"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./_collections/mcp-tool-definition.util"), exports);
|
|
29
31
|
tslib_1.__exportStar(require("./_collections/mcp-tool-load.util"), exports);
|
|
30
32
|
// SERVICES
|
|
31
33
|
tslib_1.__exportStar(require("./_services/dynts-mcp.adapter"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/mcp/index.ts"],"names":[],"mappings":";AAEA,iGAAiG;AACjG,6FAA6F;AAC7F,4GAA4G;AAC5G,kGAAkG;;;AAElG,QAAQ;AACR,4EAAkD;AAClD,+EAAqD;AAErD,aAAa;AACb,mFAAyD;AACzD,wFAA8D;AAC9D,4FAAkE;AAClE,sFAA4D;AAC5D,mGAAyE;AAEzE,SAAS;AACT,0EAAgD;AAChD,8EAAoD;AACpD,+EAAqD;AACrD,8EAAoD;AACpD,oFAA0D;AAC1D,sFAA4D;AAE5D,iBAAiB;AACjB,iGAAuE;AAEvE,cAAc;AACd,wEAA8C;AAC9C,sEAA4C;AAC5C,4EAAkD;AAElD,WAAW;AACX,wEAA8C;AAC9C,8EAAoD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/mcp/index.ts"],"names":[],"mappings":";AAEA,iGAAiG;AACjG,6FAA6F;AAC7F,4GAA4G;AAC5G,kGAAkG;;;AAElG,QAAQ;AACR,4EAAkD;AAClD,+EAAqD;AAErD,aAAa;AACb,mFAAyD;AACzD,wFAA8D;AAC9D,4FAAkE;AAClE,sFAA4D;AAC5D,mGAAyE;AAEzE,SAAS;AACT,0EAAgD;AAChD,8EAAoD;AACpD,+EAAqD;AACrD,8EAAoD;AACpD,oFAA0D;AAC1D,sFAA4D;AAE5D,iBAAiB;AACjB,iGAAuE;AAEvE,cAAc;AACd,wEAA8C;AAC9C,gFAAsD;AACtD,sEAA4C;AAC5C,kFAAwD;AACxD,4EAAkD;AAElD,WAAW;AACX,wEAA8C;AAC9C,8EAAoD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/nts-dynamo",
|
|
3
|
-
"version": "01.15.
|
|
3
|
+
"version": "01.15.299",
|
|
4
4
|
"description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "server-package",
|