@typia/mcp 13.0.0-dev.20260427-2 → 13.0.0-dev.20260430

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/lib/index.mjs CHANGED
@@ -1,8 +1,3 @@
1
- import { getDefaultExportFromCjs } from './_virtual/_commonjsHelpers.mjs';
2
- import { __require as requireLib } from './index2.mjs';
3
-
4
- var libExports = requireLib();
5
- var index = /*@__PURE__*/getDefaultExportFromCjs(libExports);
6
-
7
- export { index as default };
1
+ export { registerMcpControllers } from './index2.mjs';
2
+ export { __exports as default } from './_virtual/index.mjs';
8
3
  //# sourceMappingURL=index.mjs.map
package/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["index.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireLib } from \"/home/samchon/github/samchon/typia@next/packages/mcp/lib/index.js\";\nvar libExports = requireLib();\nexport { libExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(libExports);"],"names":[],"mappings":";;;AAEA,IAAI,UAAU,GAAG,UAAU,EAAE;AAE7B,YAAe,aAAa,uBAAuB,CAAC,UAAU,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/lib/index2.mjs CHANGED
@@ -1,47 +1,40 @@
1
1
  import { __exports as lib } from './_virtual/index.mjs';
2
- import { __require as requireMcpControllerRegistrar } from './internal/McpControllerRegistrar2.mjs';
2
+ import './internal/McpControllerRegistrar2.mjs';
3
+ import { __exports as McpControllerRegistrar } from './_virtual/McpControllerRegistrar.mjs';
3
4
 
4
- var hasRequiredLib;
5
-
6
- function requireLib () {
7
- if (hasRequiredLib) return lib;
8
- hasRequiredLib = 1;
9
- Object.defineProperty(lib, "__esModule", { value: true });
10
- lib.registerMcpControllers = registerMcpControllers;
11
- const McpControllerRegistrar_1 = requireMcpControllerRegistrar();
12
- /**
13
- * Register MCP tools from controllers.
14
- *
15
- * Registers TypeScript class methods via `typia.llm.controller<Class>()` or
16
- * OpenAPI operations via `HttpLlm.controller()` as MCP tools.
17
- *
18
- * Every tool call is validated by typia. If LLM provides invalid arguments,
19
- * returns {@link IValidation.IFailure} formatted by {@link LlmJson.stringify} so
20
- * that LLM can correct them automatically. Below is an example of the
21
- * validation error format:
22
- *
23
- * ```json
24
- * {
25
- * "name": "John",
26
- * "age": "twenty", // ❌ [{"path":"$input.age","expected":"number & Type<\"uint32\">"}]
27
- * "email": "not-an-email", // [{"path":"$input.email","expected":"string & Format<\"email\">"}]
28
- * "hobbies": "reading" // [{"path":"$input.hobbies","expected":"Array<string>"}]
29
- * }
30
- * ```
31
- *
32
- * If you use `McpServer.registerTool()` instead, you have to define Zod schema,
33
- * function name, and description string manually for each tool. Also, without
34
- * typia's validation feedback, LLM cannot auto-correct its mistakes, which
35
- * significantly degrades tool calling performance.
36
- *
37
- * @param props Registration properties
38
- */
39
- function registerMcpControllers(props) {
40
- return McpControllerRegistrar_1.McpControllerRegistrar.register(props);
41
- }
42
-
43
- return lib;
5
+ Object.defineProperty(lib, "__esModule", { value: true });
6
+ var registerMcpControllers_1 = lib.registerMcpControllers = registerMcpControllers;
7
+ const McpControllerRegistrar_1 = McpControllerRegistrar;
8
+ /**
9
+ * Register MCP tools from controllers.
10
+ *
11
+ * Registers TypeScript class methods via `typia.llm.controller<Class>()` or
12
+ * OpenAPI operations via `HttpLlm.controller()` as MCP tools.
13
+ *
14
+ * Every tool call is validated by typia. If LLM provides invalid arguments,
15
+ * returns {@link IValidation.IFailure} formatted by {@link LlmJson.stringify} so
16
+ * that LLM can correct them automatically. Below is an example of the
17
+ * validation error format:
18
+ *
19
+ * ```json
20
+ * {
21
+ * "name": "John",
22
+ * "age": "twenty", // ❌ [{"path":"$input.age","expected":"number & Type<\"uint32\">"}]
23
+ * "email": "not-an-email", // ❌ [{"path":"$input.email","expected":"string & Format<\"email\">"}]
24
+ * "hobbies": "reading" // ❌ [{"path":"$input.hobbies","expected":"Array<string>"}]
25
+ * }
26
+ * ```
27
+ *
28
+ * If you use `McpServer.registerTool()` instead, you have to define Zod schema,
29
+ * function name, and description string manually for each tool. Also, without
30
+ * typia's validation feedback, LLM cannot auto-correct its mistakes, which
31
+ * significantly degrades tool calling performance.
32
+ *
33
+ * @param props Registration properties
34
+ */
35
+ function registerMcpControllers(props) {
36
+ return McpControllerRegistrar_1.McpControllerRegistrar.register(props);
44
37
  }
45
38
 
46
- export { requireLib as __require };
39
+ export { lib as default, registerMcpControllers_1 as registerMcpControllers };
47
40
  //# sourceMappingURL=index2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.registerMcpControllers = registerMcpControllers;\nconst McpControllerRegistrar_1 = require(\"./internal/McpControllerRegistrar\");\n/**\n * Register MCP tools from controllers.\n *\n * Registers TypeScript class methods via `typia.llm.controller<Class>()` or\n * OpenAPI operations via `HttpLlm.controller()` as MCP tools.\n *\n * Every tool call is validated by typia. If LLM provides invalid arguments,\n * returns {@link IValidation.IFailure} formatted by {@link LlmJson.stringify} so\n * that LLM can correct them automatically. Below is an example of the\n * validation error format:\n *\n * ```json\n * {\n * \"name\": \"John\",\n * \"age\": \"twenty\", // ❌ [{\"path\":\"$input.age\",\"expected\":\"number & Type<\\\"uint32\\\">\"}]\n * \"email\": \"not-an-email\", // ❌ [{\"path\":\"$input.email\",\"expected\":\"string & Format<\\\"email\\\">\"}]\n * \"hobbies\": \"reading\" // ❌ [{\"path\":\"$input.hobbies\",\"expected\":\"Array<string>\"}]\n * }\n * ```\n *\n * If you use `McpServer.registerTool()` instead, you have to define Zod schema,\n * function name, and description string manually for each tool. Also, without\n * typia's validation feedback, LLM cannot auto-correct its mistakes, which\n * significantly degrades tool calling performance.\n *\n * @param props Registration properties\n */\nfunction registerMcpControllers(props) {\n return McpControllerRegistrar_1.McpControllerRegistrar.register(props);\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0"],"mappings":";;;;;;;;AACA,CAAA,MAAM,CAAC,cAAc,CAAC,GAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAA,GAAA,CAAA,sBAA8B,GAAG,sBAAsB;CACvD,MAAM,wBAAwB,GAAGA,6BAAA,EAA4C;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;CACA,SAAS,sBAAsB,CAAC,KAAK,EAAE;KACnC,OAAO,wBAAwB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC1E,CAAA;AACA;;;;;;"}
1
+ {"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.registerMcpControllers = registerMcpControllers;\nconst McpControllerRegistrar_1 = require(\"./internal/McpControllerRegistrar\");\n/**\n * Register MCP tools from controllers.\n *\n * Registers TypeScript class methods via `typia.llm.controller<Class>()` or\n * OpenAPI operations via `HttpLlm.controller()` as MCP tools.\n *\n * Every tool call is validated by typia. If LLM provides invalid arguments,\n * returns {@link IValidation.IFailure} formatted by {@link LlmJson.stringify} so\n * that LLM can correct them automatically. Below is an example of the\n * validation error format:\n *\n * ```json\n * {\n * \"name\": \"John\",\n * \"age\": \"twenty\", // ❌ [{\"path\":\"$input.age\",\"expected\":\"number & Type<\\\"uint32\\\">\"}]\n * \"email\": \"not-an-email\", // ❌ [{\"path\":\"$input.email\",\"expected\":\"string & Format<\\\"email\\\">\"}]\n * \"hobbies\": \"reading\" // ❌ [{\"path\":\"$input.hobbies\",\"expected\":\"Array<string>\"}]\n * }\n * ```\n *\n * If you use `McpServer.registerTool()` instead, you have to define Zod schema,\n * function name, and description string manually for each tool. Also, without\n * typia's validation feedback, LLM cannot auto-correct its mistakes, which\n * significantly degrades tool calling performance.\n *\n * @param props Registration properties\n */\nfunction registerMcpControllers(props) {\n return McpControllerRegistrar_1.McpControllerRegistrar.register(props);\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0"],"mappings":";;;;AACA,MAAM,CAAC,cAAc,CAAC,GAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,wBAAA,GAAA,GAAA,CAAA,sBAA8B,GAAG;AACjC,MAAM,wBAAwB,GAAGA,sBAA4C;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sBAAsB,CAAC,KAAK,EAAE;AACvC,IAAI,OAAO,wBAAwB,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC1E;;;;"}
@@ -1,8 +1,3 @@
1
- import { getDefaultExportFromCjs } from '../_virtual/_commonjsHelpers.mjs';
2
- import { __require as requireMcpControllerRegistrar } from './McpControllerRegistrar2.mjs';
3
-
4
- var McpControllerRegistrarExports = requireMcpControllerRegistrar();
5
- var McpControllerRegistrar = /*@__PURE__*/getDefaultExportFromCjs(McpControllerRegistrarExports);
6
-
7
- export { McpControllerRegistrar as default };
1
+ export { McpControllerRegistrar } from './McpControllerRegistrar2.mjs';
2
+ export { __exports as default } from '../_virtual/McpControllerRegistrar.mjs';
8
3
  //# sourceMappingURL=McpControllerRegistrar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpControllerRegistrar.mjs","sources":["McpControllerRegistrar.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireMcpControllerRegistrar } from \"/home/samchon/github/samchon/typia@next/packages/mcp/lib/internal/McpControllerRegistrar.js\";\nvar McpControllerRegistrarExports = requireMcpControllerRegistrar();\nexport { McpControllerRegistrarExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(McpControllerRegistrarExports);"],"names":[],"mappings":";;;AAEA,IAAI,6BAA6B,GAAG,6BAA6B,EAAE;AAEnE,6BAAe,aAAa,uBAAuB,CAAC,6BAA6B,CAAC;;;;"}
1
+ {"version":3,"file":"McpControllerRegistrar.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,278 +1,270 @@
1
- import { __exports as McpControllerRegistrar } from '../_virtual/McpControllerRegistrar.mjs';
1
+ import { __exports as McpControllerRegistrar$1 } from '../_virtual/McpControllerRegistrar.mjs';
2
2
  import require$$0 from '@modelcontextprotocol/sdk/types.js';
3
3
  import require$$1 from '@typia/utils';
4
4
  import require$$2 from 'zod-to-json-schema';
5
5
 
6
- var hasRequiredMcpControllerRegistrar;
6
+ var __awaiter = (McpControllerRegistrar$1 && McpControllerRegistrar$1.__awaiter) || function (thisArg, _arguments, P, generator) {
7
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8
+ return new (P || (P = Promise))(function (resolve, reject) {
9
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
10
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
12
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
13
+ });
14
+ };
15
+ Object.defineProperty(McpControllerRegistrar$1, "__esModule", { value: true });
16
+ var McpControllerRegistrar_2 = McpControllerRegistrar$1.McpControllerRegistrar = void 0;
17
+ const types_js_1 = require$$0;
18
+ const utils_1 = require$$1;
19
+ const zod_to_json_schema_1 = require$$2;
20
+ var McpControllerRegistrar;
21
+ (function (McpControllerRegistrar) {
22
+ McpControllerRegistrar.register = (props) => {
23
+ var _a;
24
+ // McpServer wraps raw Server - we need raw Server for JSON Schema support
25
+ const server = "server" in props.server
26
+ ? props.server.server
27
+ : props.server;
28
+ // Build tool registry from controllers
29
+ const registry = new Map();
30
+ for (const controller of props.controllers) {
31
+ if (controller.protocol === "class") {
32
+ registerClassController(registry, controller);
33
+ }
34
+ else {
35
+ registerHttpController(registry, controller);
36
+ }
37
+ }
38
+ // Determine preserve mode (default: false)
39
+ const preserve = (_a = props.preserve) !== null && _a !== void 0 ? _a : false;
40
+ if (preserve) {
41
+ // PRESERVE MODE: Coexist with McpServer.registerTool()
42
+ // Uses MCP SDK internal API (_registeredTools, _toolHandlersInitialized)
43
+ registerWithPreserve(server, registry, props.server);
44
+ }
45
+ else {
46
+ // STANDALONE MODE: Typia tools only, no private API dependency
47
+ registerStandalone(server, registry);
48
+ }
49
+ };
50
+ /**
51
+ * Standalone registration without private API. Typia tools completely replace
52
+ * any existing tool handlers.
53
+ */
54
+ const registerStandalone = (server, registry) => {
55
+ // tools/list handler
56
+ server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {
57
+ return ({
58
+ tools: Array.from(registry.values()).map((entry) => ({
59
+ name: entry.function.name,
60
+ description: entry.function.description,
61
+ inputSchema: {
62
+ type: "object",
63
+ properties: entry.function.parameters.properties,
64
+ required: entry.function.parameters.required,
65
+ additionalProperties: false,
66
+ $defs: entry.function.parameters.$defs,
67
+ },
68
+ })),
69
+ });
70
+ }));
71
+ // tools/call handler
72
+ server.setRequestHandler(types_js_1.CallToolRequestSchema, (request) => __awaiter(this, void 0, void 0, function* () {
73
+ const name = request.params.name;
74
+ const args = request.params.arguments;
75
+ const entry = registry.get(name);
76
+ if (entry !== undefined) {
77
+ return handleToolCall(entry, args);
78
+ }
79
+ return {
80
+ isError: true,
81
+ content: [{ type: "text", text: `Unknown tool: ${name}` }],
82
+ };
83
+ }));
84
+ };
85
+ /**
86
+ * Preserve mode registration with private API. Coexists with tools registered
87
+ * via McpServer.registerTool().
88
+ */
89
+ const registerWithPreserve = (server, registry, originalServer) => {
90
+ // Get McpServer reference for coexistence with McpServer.registerTool()
91
+ const mcpServer = "server" in originalServer ? originalServer : null;
92
+ // Helper to get existing tools dynamically (supports tools registered after this call)
93
+ const getExistingTools = () => {
94
+ var _a;
95
+ if (mcpServer === null)
96
+ return {};
97
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
98
+ return (_a = mcpServer._registeredTools) !== null && _a !== void 0 ? _a : {};
99
+ };
100
+ // Check for conflicts with existing McpServer tools at registration time
101
+ for (const pair of Object.entries(getExistingTools())) {
102
+ if (pair[1].enabled && registry.has(pair[0])) {
103
+ throw new Error(`Duplicate function name "${pair[0]}" between McpServer.registerTool() and controller "${registry.get(pair[0]).controller}"`);
104
+ }
105
+ }
106
+ // tools/list handler
107
+ server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {
108
+ const existingTools = getExistingTools();
109
+ return {
110
+ tools: [
111
+ // Typia controller tools
112
+ ...Array.from(registry.values()).map((entry) => {
113
+ return {
114
+ name: entry.function.name,
115
+ description: entry.function.description,
116
+ inputSchema: {
117
+ type: "object",
118
+ properties: entry.function.parameters.properties,
119
+ required: entry.function.parameters.required,
120
+ additionalProperties: false,
121
+ $defs: entry.function.parameters.$defs,
122
+ },
123
+ };
124
+ }),
125
+ // Existing McpServer tools
126
+ ...Object.entries(existingTools)
127
+ .filter((pair) => !registry.has(pair[0]) && pair[1].enabled)
128
+ .map((pair) => {
129
+ return {
130
+ name: pair[0],
131
+ description: pair[1].description,
132
+ inputSchema: convertZodToJsonSchema(pair[1].inputSchema),
133
+ };
134
+ }),
135
+ ],
136
+ };
137
+ }));
138
+ // tools/call handler
139
+ server.setRequestHandler(types_js_1.CallToolRequestSchema, (request, extra) => __awaiter(this, void 0, void 0, function* () {
140
+ const name = request.params.name;
141
+ const args = request.params.arguments;
142
+ // Check typia registry first
143
+ const entry = registry.get(name);
144
+ if (entry !== undefined) {
145
+ return handleToolCall(entry, args);
146
+ }
147
+ // Fall back to existing McpServer tools
148
+ const existingTools = getExistingTools();
149
+ const existingTool = existingTools[name];
150
+ if (existingTool && existingTool.enabled) {
151
+ return existingTool.handler(args, extra);
152
+ }
153
+ return {
154
+ isError: true,
155
+ content: [{ type: "text", text: `Unknown tool: ${name}` }],
156
+ };
157
+ }));
158
+ // Mark handlers as initialized to prevent McpServer from overwriting
159
+ if (mcpServer) {
160
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
161
+ mcpServer._toolHandlersInitialized = true;
162
+ }
163
+ };
164
+ const registerClassController = (registry, controller) => {
165
+ const execute = controller.execute;
166
+ for (const func of controller.application.functions) {
167
+ const existing = registry.get(func.name);
168
+ if (existing !== undefined) {
169
+ throw new Error(`Duplicate function name "${func.name}" between controllers "${existing.controller}" and "${controller.name}"`);
170
+ }
171
+ const method = execute[func.name];
172
+ if (typeof method !== "function") {
173
+ throw new Error(`Method "${func.name}" not found on controller "${controller.name}"`);
174
+ }
175
+ registry.set(func.name, {
176
+ controller: controller.name,
177
+ function: func,
178
+ execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),
179
+ });
180
+ }
181
+ };
182
+ const registerHttpController = (registry, controller) => {
183
+ const application = controller.application;
184
+ const connection = controller.connection;
185
+ for (const func of application.functions) {
186
+ const existing = registry.get(func.name);
187
+ if (existing !== undefined) {
188
+ throw new Error(`Duplicate function name "${func.name}" between controllers "${existing.controller}" and "${controller.name}"`);
189
+ }
190
+ registry.set(func.name, {
191
+ controller: controller.name,
192
+ function: func,
193
+ execute: (args) => __awaiter(this, void 0, void 0, function* () {
194
+ if (controller.execute !== undefined) {
195
+ const response = yield controller.execute({
196
+ connection,
197
+ application,
198
+ function: func,
199
+ arguments: args,
200
+ });
201
+ return response.body;
202
+ }
203
+ return utils_1.HttpLlm.execute({
204
+ application,
205
+ function: func,
206
+ connection,
207
+ input: args,
208
+ });
209
+ }),
210
+ });
211
+ }
212
+ };
213
+ const handleToolCall = (entry, args) => __awaiter(this, void 0, void 0, function* () {
214
+ const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);
215
+ const validation = entry.function.validate(coerced);
216
+ if (!validation.success) {
217
+ return {
218
+ isError: true,
219
+ content: [
220
+ {
221
+ type: "text",
222
+ text: utils_1.LlmJson.stringify(validation),
223
+ },
224
+ ],
225
+ };
226
+ }
227
+ try {
228
+ const result = yield entry.execute(validation.data);
229
+ return {
230
+ content: [
231
+ {
232
+ type: "text",
233
+ text: result === undefined
234
+ ? "Success"
235
+ : JSON.stringify(result, null, 2),
236
+ },
237
+ ],
238
+ };
239
+ }
240
+ catch (error) {
241
+ return {
242
+ isError: true,
243
+ content: [
244
+ {
245
+ type: "text",
246
+ text: error instanceof Error
247
+ ? `${error.name}: ${error.message}`
248
+ : String(error),
249
+ },
250
+ ],
251
+ };
252
+ }
253
+ });
254
+ const convertZodToJsonSchema = (zodSchema) => {
255
+ if (zodSchema === undefined) {
256
+ return { type: "object", properties: {} };
257
+ }
258
+ // @todo: error TS2589: Type instantiation is excessively deep and possibly infinite.
259
+ const converted = zod_to_json_schema_1.zodToJsonSchema(zodSchema);
260
+ if (typeof converted === "object" &&
261
+ "type" in converted &&
262
+ converted.type === "object") {
263
+ return converted;
264
+ }
265
+ return { type: "object", properties: {} };
266
+ };
267
+ })(McpControllerRegistrar || (McpControllerRegistrar_2 = McpControllerRegistrar$1.McpControllerRegistrar = McpControllerRegistrar = {}));
7
268
 
8
- function requireMcpControllerRegistrar () {
9
- if (hasRequiredMcpControllerRegistrar) return McpControllerRegistrar;
10
- hasRequiredMcpControllerRegistrar = 1;
11
- var __awaiter = (McpControllerRegistrar && McpControllerRegistrar.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
- Object.defineProperty(McpControllerRegistrar, "__esModule", { value: true });
21
- McpControllerRegistrar.McpControllerRegistrar = void 0;
22
- const types_js_1 = require$$0;
23
- const utils_1 = require$$1;
24
- const zod_to_json_schema_1 = require$$2;
25
- var McpControllerRegistrar$1;
26
- (function (McpControllerRegistrar) {
27
- McpControllerRegistrar.register = (props) => {
28
- var _a;
29
- // McpServer wraps raw Server - we need raw Server for JSON Schema support
30
- const server = "server" in props.server
31
- ? props.server.server
32
- : props.server;
33
- // Build tool registry from controllers
34
- const registry = new Map();
35
- for (const controller of props.controllers) {
36
- if (controller.protocol === "class") {
37
- registerClassController(registry, controller);
38
- }
39
- else {
40
- registerHttpController(registry, controller);
41
- }
42
- }
43
- // Determine preserve mode (default: false)
44
- const preserve = (_a = props.preserve) !== null && _a !== void 0 ? _a : false;
45
- if (preserve) {
46
- // PRESERVE MODE: Coexist with McpServer.registerTool()
47
- // Uses MCP SDK internal API (_registeredTools, _toolHandlersInitialized)
48
- registerWithPreserve(server, registry, props.server);
49
- }
50
- else {
51
- // STANDALONE MODE: Typia tools only, no private API dependency
52
- registerStandalone(server, registry);
53
- }
54
- };
55
- /**
56
- * Standalone registration without private API. Typia tools completely replace
57
- * any existing tool handlers.
58
- */
59
- const registerStandalone = (server, registry) => {
60
- // tools/list handler
61
- server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {
62
- return ({
63
- tools: Array.from(registry.values()).map((entry) => ({
64
- name: entry.function.name,
65
- description: entry.function.description,
66
- inputSchema: {
67
- type: "object",
68
- properties: entry.function.parameters.properties,
69
- required: entry.function.parameters.required,
70
- additionalProperties: false,
71
- $defs: entry.function.parameters.$defs,
72
- },
73
- })),
74
- });
75
- }));
76
- // tools/call handler
77
- server.setRequestHandler(types_js_1.CallToolRequestSchema, (request) => __awaiter(this, void 0, void 0, function* () {
78
- const name = request.params.name;
79
- const args = request.params.arguments;
80
- const entry = registry.get(name);
81
- if (entry !== undefined) {
82
- return handleToolCall(entry, args);
83
- }
84
- return {
85
- isError: true,
86
- content: [{ type: "text", text: `Unknown tool: ${name}` }],
87
- };
88
- }));
89
- };
90
- /**
91
- * Preserve mode registration with private API. Coexists with tools registered
92
- * via McpServer.registerTool().
93
- */
94
- const registerWithPreserve = (server, registry, originalServer) => {
95
- // Get McpServer reference for coexistence with McpServer.registerTool()
96
- const mcpServer = "server" in originalServer ? originalServer : null;
97
- // Helper to get existing tools dynamically (supports tools registered after this call)
98
- const getExistingTools = () => {
99
- var _a;
100
- if (mcpServer === null)
101
- return {};
102
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
- return (_a = mcpServer._registeredTools) !== null && _a !== void 0 ? _a : {};
104
- };
105
- // Check for conflicts with existing McpServer tools at registration time
106
- for (const pair of Object.entries(getExistingTools())) {
107
- if (pair[1].enabled && registry.has(pair[0])) {
108
- throw new Error(`Duplicate function name "${pair[0]}" between McpServer.registerTool() and controller "${registry.get(pair[0]).controller}"`);
109
- }
110
- }
111
- // tools/list handler
112
- server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {
113
- const existingTools = getExistingTools();
114
- return {
115
- tools: [
116
- // Typia controller tools
117
- ...Array.from(registry.values()).map((entry) => {
118
- return {
119
- name: entry.function.name,
120
- description: entry.function.description,
121
- inputSchema: {
122
- type: "object",
123
- properties: entry.function.parameters.properties,
124
- required: entry.function.parameters.required,
125
- additionalProperties: false,
126
- $defs: entry.function.parameters.$defs,
127
- },
128
- };
129
- }),
130
- // Existing McpServer tools
131
- ...Object.entries(existingTools)
132
- .filter((pair) => !registry.has(pair[0]) && pair[1].enabled)
133
- .map((pair) => {
134
- return {
135
- name: pair[0],
136
- description: pair[1].description,
137
- inputSchema: convertZodToJsonSchema(pair[1].inputSchema),
138
- };
139
- }),
140
- ],
141
- };
142
- }));
143
- // tools/call handler
144
- server.setRequestHandler(types_js_1.CallToolRequestSchema, (request, extra) => __awaiter(this, void 0, void 0, function* () {
145
- const name = request.params.name;
146
- const args = request.params.arguments;
147
- // Check typia registry first
148
- const entry = registry.get(name);
149
- if (entry !== undefined) {
150
- return handleToolCall(entry, args);
151
- }
152
- // Fall back to existing McpServer tools
153
- const existingTools = getExistingTools();
154
- const existingTool = existingTools[name];
155
- if (existingTool && existingTool.enabled) {
156
- return existingTool.handler(args, extra);
157
- }
158
- return {
159
- isError: true,
160
- content: [{ type: "text", text: `Unknown tool: ${name}` }],
161
- };
162
- }));
163
- // Mark handlers as initialized to prevent McpServer from overwriting
164
- if (mcpServer) {
165
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
166
- mcpServer._toolHandlersInitialized = true;
167
- }
168
- };
169
- const registerClassController = (registry, controller) => {
170
- const execute = controller.execute;
171
- for (const func of controller.application.functions) {
172
- const existing = registry.get(func.name);
173
- if (existing !== undefined) {
174
- throw new Error(`Duplicate function name "${func.name}" between controllers "${existing.controller}" and "${controller.name}"`);
175
- }
176
- const method = execute[func.name];
177
- if (typeof method !== "function") {
178
- throw new Error(`Method "${func.name}" not found on controller "${controller.name}"`);
179
- }
180
- registry.set(func.name, {
181
- controller: controller.name,
182
- function: func,
183
- execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),
184
- });
185
- }
186
- };
187
- const registerHttpController = (registry, controller) => {
188
- const application = controller.application;
189
- const connection = controller.connection;
190
- for (const func of application.functions) {
191
- const existing = registry.get(func.name);
192
- if (existing !== undefined) {
193
- throw new Error(`Duplicate function name "${func.name}" between controllers "${existing.controller}" and "${controller.name}"`);
194
- }
195
- registry.set(func.name, {
196
- controller: controller.name,
197
- function: func,
198
- execute: (args) => __awaiter(this, void 0, void 0, function* () {
199
- if (controller.execute !== undefined) {
200
- const response = yield controller.execute({
201
- connection,
202
- application,
203
- function: func,
204
- arguments: args,
205
- });
206
- return response.body;
207
- }
208
- return utils_1.HttpLlm.execute({
209
- application,
210
- function: func,
211
- connection,
212
- input: args,
213
- });
214
- }),
215
- });
216
- }
217
- };
218
- const handleToolCall = (entry, args) => __awaiter(this, void 0, void 0, function* () {
219
- const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);
220
- const validation = entry.function.validate(coerced);
221
- if (!validation.success) {
222
- return {
223
- isError: true,
224
- content: [
225
- {
226
- type: "text",
227
- text: utils_1.LlmJson.stringify(validation),
228
- },
229
- ],
230
- };
231
- }
232
- try {
233
- const result = yield entry.execute(validation.data);
234
- return {
235
- content: [
236
- {
237
- type: "text",
238
- text: result === undefined
239
- ? "Success"
240
- : JSON.stringify(result, null, 2),
241
- },
242
- ],
243
- };
244
- }
245
- catch (error) {
246
- return {
247
- isError: true,
248
- content: [
249
- {
250
- type: "text",
251
- text: error instanceof Error
252
- ? `${error.name}: ${error.message}`
253
- : String(error),
254
- },
255
- ],
256
- };
257
- }
258
- });
259
- const convertZodToJsonSchema = (zodSchema) => {
260
- if (zodSchema === undefined) {
261
- return { type: "object", properties: {} };
262
- }
263
- // @todo: error TS2589: Type instantiation is excessively deep and possibly infinite.
264
- const converted = zod_to_json_schema_1.zodToJsonSchema(zodSchema);
265
- if (typeof converted === "object" &&
266
- "type" in converted &&
267
- converted.type === "object") {
268
- return converted;
269
- }
270
- return { type: "object", properties: {} };
271
- };
272
- })(McpControllerRegistrar$1 || (McpControllerRegistrar.McpControllerRegistrar = McpControllerRegistrar$1 = {}));
273
-
274
- return McpControllerRegistrar;
275
- }
276
-
277
- export { requireMcpControllerRegistrar as __require };
269
+ export { McpControllerRegistrar_2 as McpControllerRegistrar, McpControllerRegistrar$1 as default };
278
270
  //# sourceMappingURL=McpControllerRegistrar2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"McpControllerRegistrar2.mjs","sources":["McpControllerRegistrar.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.McpControllerRegistrar = void 0;\nconst types_js_1 = require(\"@modelcontextprotocol/sdk/types.js\");\nconst utils_1 = require(\"@typia/utils\");\nconst zod_to_json_schema_1 = require(\"zod-to-json-schema\");\nvar McpControllerRegistrar;\n(function (McpControllerRegistrar) {\n McpControllerRegistrar.register = (props) => {\n var _a;\n // McpServer wraps raw Server - we need raw Server for JSON Schema support\n const server = \"server\" in props.server\n ? props.server.server\n : props.server;\n // Build tool registry from controllers\n const registry = new Map();\n for (const controller of props.controllers) {\n if (controller.protocol === \"class\") {\n registerClassController(registry, controller);\n }\n else {\n registerHttpController(registry, controller);\n }\n }\n // Determine preserve mode (default: false)\n const preserve = (_a = props.preserve) !== null && _a !== void 0 ? _a : false;\n if (preserve) {\n // PRESERVE MODE: Coexist with McpServer.registerTool()\n // Uses MCP SDK internal API (_registeredTools, _toolHandlersInitialized)\n registerWithPreserve(server, registry, props.server);\n }\n else {\n // STANDALONE MODE: Typia tools only, no private API dependency\n registerStandalone(server, registry);\n }\n };\n /**\n * Standalone registration without private API. Typia tools completely replace\n * any existing tool handlers.\n */\n const registerStandalone = (server, registry) => {\n // tools/list handler\n server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {\n return ({\n tools: Array.from(registry.values()).map((entry) => ({\n name: entry.function.name,\n description: entry.function.description,\n inputSchema: {\n type: \"object\",\n properties: entry.function.parameters.properties,\n required: entry.function.parameters.required,\n additionalProperties: false,\n $defs: entry.function.parameters.$defs,\n },\n })),\n });\n }));\n // tools/call handler\n server.setRequestHandler(types_js_1.CallToolRequestSchema, (request) => __awaiter(this, void 0, void 0, function* () {\n const name = request.params.name;\n const args = request.params.arguments;\n const entry = registry.get(name);\n if (entry !== undefined) {\n return handleToolCall(entry, args);\n }\n return {\n isError: true,\n content: [{ type: \"text\", text: `Unknown tool: ${name}` }],\n };\n }));\n };\n /**\n * Preserve mode registration with private API. Coexists with tools registered\n * via McpServer.registerTool().\n */\n const registerWithPreserve = (server, registry, originalServer) => {\n // Get McpServer reference for coexistence with McpServer.registerTool()\n const mcpServer = \"server\" in originalServer ? originalServer : null;\n // Helper to get existing tools dynamically (supports tools registered after this call)\n const getExistingTools = () => {\n var _a;\n if (mcpServer === null)\n return {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (_a = mcpServer._registeredTools) !== null && _a !== void 0 ? _a : {};\n };\n // Check for conflicts with existing McpServer tools at registration time\n for (const pair of Object.entries(getExistingTools())) {\n if (pair[1].enabled && registry.has(pair[0])) {\n throw new Error(`Duplicate function name \"${pair[0]}\" between McpServer.registerTool() and controller \"${registry.get(pair[0]).controller}\"`);\n }\n }\n // tools/list handler\n server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {\n const existingTools = getExistingTools();\n return {\n tools: [\n // Typia controller tools\n ...Array.from(registry.values()).map((entry) => {\n return {\n name: entry.function.name,\n description: entry.function.description,\n inputSchema: {\n type: \"object\",\n properties: entry.function.parameters.properties,\n required: entry.function.parameters.required,\n additionalProperties: false,\n $defs: entry.function.parameters.$defs,\n },\n };\n }),\n // Existing McpServer tools\n ...Object.entries(existingTools)\n .filter((pair) => !registry.has(pair[0]) && pair[1].enabled)\n .map((pair) => {\n return {\n name: pair[0],\n description: pair[1].description,\n inputSchema: convertZodToJsonSchema(pair[1].inputSchema),\n };\n }),\n ],\n };\n }));\n // tools/call handler\n server.setRequestHandler(types_js_1.CallToolRequestSchema, (request, extra) => __awaiter(this, void 0, void 0, function* () {\n const name = request.params.name;\n const args = request.params.arguments;\n // Check typia registry first\n const entry = registry.get(name);\n if (entry !== undefined) {\n return handleToolCall(entry, args);\n }\n // Fall back to existing McpServer tools\n const existingTools = getExistingTools();\n const existingTool = existingTools[name];\n if (existingTool && existingTool.enabled) {\n return existingTool.handler(args, extra);\n }\n return {\n isError: true,\n content: [{ type: \"text\", text: `Unknown tool: ${name}` }],\n };\n }));\n // Mark handlers as initialized to prevent McpServer from overwriting\n if (mcpServer) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n mcpServer._toolHandlersInitialized = true;\n }\n };\n const registerClassController = (registry, controller) => {\n const execute = controller.execute;\n for (const func of controller.application.functions) {\n const existing = registry.get(func.name);\n if (existing !== undefined) {\n throw new Error(`Duplicate function name \"${func.name}\" between controllers \"${existing.controller}\" and \"${controller.name}\"`);\n }\n const method = execute[func.name];\n if (typeof method !== \"function\") {\n throw new Error(`Method \"${func.name}\" not found on controller \"${controller.name}\"`);\n }\n registry.set(func.name, {\n controller: controller.name,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),\n });\n }\n };\n const registerHttpController = (registry, controller) => {\n const application = controller.application;\n const connection = controller.connection;\n for (const func of application.functions) {\n const existing = registry.get(func.name);\n if (existing !== undefined) {\n throw new Error(`Duplicate function name \"${func.name}\" between controllers \"${existing.controller}\" and \"${controller.name}\"`);\n }\n registry.set(func.name, {\n controller: controller.name,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n if (controller.execute !== undefined) {\n const response = yield controller.execute({\n connection,\n application,\n function: func,\n arguments: args,\n });\n return response.body;\n }\n return utils_1.HttpLlm.execute({\n application,\n function: func,\n connection,\n input: args,\n });\n }),\n });\n }\n };\n const handleToolCall = (entry, args) => __awaiter(this, void 0, void 0, function* () {\n const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);\n const validation = entry.function.validate(coerced);\n if (!validation.success) {\n return {\n isError: true,\n content: [\n {\n type: \"text\",\n text: utils_1.LlmJson.stringify(validation),\n },\n ],\n };\n }\n try {\n const result = yield entry.execute(validation.data);\n return {\n content: [\n {\n type: \"text\",\n text: result === undefined\n ? \"Success\"\n : JSON.stringify(result, null, 2),\n },\n ],\n };\n }\n catch (error) {\n return {\n isError: true,\n content: [\n {\n type: \"text\",\n text: error instanceof Error\n ? `${error.name}: ${error.message}`\n : String(error),\n },\n ],\n };\n }\n });\n const convertZodToJsonSchema = (zodSchema) => {\n if (zodSchema === undefined) {\n return { type: \"object\", properties: {} };\n }\n // @todo: error TS2589: Type instantiation is excessively deep and possibly infinite.\n const converted = zod_to_json_schema_1.zodToJsonSchema(zodSchema);\n if (typeof converted === \"object\" &&\n \"type\" in converted &&\n converted.type === \"object\") {\n return converted;\n }\n return { type: \"object\", properties: {} };\n };\n})(McpControllerRegistrar || (exports.McpControllerRegistrar = McpControllerRegistrar = {}));\n//# sourceMappingURL=McpControllerRegistrar.js.map"],"names":["this","McpControllerRegistrar_1","McpControllerRegistrar"],"mappings":";;;;;;;;;;AACA,CAAA,IAAI,SAAS,GAAG,CAACA,sBAAI,IAAIA,sBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;KACrF,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,KAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,SAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACjG,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AAA,CAAK,CAAC;AACN,KAAI,MAAM,sBAAsB,GAAG,CAAC,SAAS,KAAK;AAClD,SAAQ,IAAI,SAAS,KAAK,SAAS,EAAE;aACzB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;AACrD,SAAA;AACA;SACQ,MAAM,SAAS,GAAG,oBAAoB,CAAC,eAAe,CAAC,SAAS,CAAC;AACzE,SAAQ,IAAI,OAAO,SAAS,KAAK,QAAQ;aAC7B,MAAM,IAAI,SAAS;AAC/B,aAAY,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE;AACzC,aAAY,OAAO,SAAS;AAC5B,SAAA;SACQ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;KACjD,CAAK;CACL,CAAC,EAAEA,wBAAsB,KAAKD,sBAAA,CAAA,sBAA8B,GAAGC,wBAAsB,GAAG,EAAE,CAAC,CAAC;AAC5F;;;;;;"}
1
+ {"version":3,"file":"McpControllerRegistrar2.mjs","sources":["McpControllerRegistrar.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.McpControllerRegistrar = void 0;\nconst types_js_1 = require(\"@modelcontextprotocol/sdk/types.js\");\nconst utils_1 = require(\"@typia/utils\");\nconst zod_to_json_schema_1 = require(\"zod-to-json-schema\");\nvar McpControllerRegistrar;\n(function (McpControllerRegistrar) {\n McpControllerRegistrar.register = (props) => {\n var _a;\n // McpServer wraps raw Server - we need raw Server for JSON Schema support\n const server = \"server\" in props.server\n ? props.server.server\n : props.server;\n // Build tool registry from controllers\n const registry = new Map();\n for (const controller of props.controllers) {\n if (controller.protocol === \"class\") {\n registerClassController(registry, controller);\n }\n else {\n registerHttpController(registry, controller);\n }\n }\n // Determine preserve mode (default: false)\n const preserve = (_a = props.preserve) !== null && _a !== void 0 ? _a : false;\n if (preserve) {\n // PRESERVE MODE: Coexist with McpServer.registerTool()\n // Uses MCP SDK internal API (_registeredTools, _toolHandlersInitialized)\n registerWithPreserve(server, registry, props.server);\n }\n else {\n // STANDALONE MODE: Typia tools only, no private API dependency\n registerStandalone(server, registry);\n }\n };\n /**\n * Standalone registration without private API. Typia tools completely replace\n * any existing tool handlers.\n */\n const registerStandalone = (server, registry) => {\n // tools/list handler\n server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {\n return ({\n tools: Array.from(registry.values()).map((entry) => ({\n name: entry.function.name,\n description: entry.function.description,\n inputSchema: {\n type: \"object\",\n properties: entry.function.parameters.properties,\n required: entry.function.parameters.required,\n additionalProperties: false,\n $defs: entry.function.parameters.$defs,\n },\n })),\n });\n }));\n // tools/call handler\n server.setRequestHandler(types_js_1.CallToolRequestSchema, (request) => __awaiter(this, void 0, void 0, function* () {\n const name = request.params.name;\n const args = request.params.arguments;\n const entry = registry.get(name);\n if (entry !== undefined) {\n return handleToolCall(entry, args);\n }\n return {\n isError: true,\n content: [{ type: \"text\", text: `Unknown tool: ${name}` }],\n };\n }));\n };\n /**\n * Preserve mode registration with private API. Coexists with tools registered\n * via McpServer.registerTool().\n */\n const registerWithPreserve = (server, registry, originalServer) => {\n // Get McpServer reference for coexistence with McpServer.registerTool()\n const mcpServer = \"server\" in originalServer ? originalServer : null;\n // Helper to get existing tools dynamically (supports tools registered after this call)\n const getExistingTools = () => {\n var _a;\n if (mcpServer === null)\n return {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (_a = mcpServer._registeredTools) !== null && _a !== void 0 ? _a : {};\n };\n // Check for conflicts with existing McpServer tools at registration time\n for (const pair of Object.entries(getExistingTools())) {\n if (pair[1].enabled && registry.has(pair[0])) {\n throw new Error(`Duplicate function name \"${pair[0]}\" between McpServer.registerTool() and controller \"${registry.get(pair[0]).controller}\"`);\n }\n }\n // tools/list handler\n server.setRequestHandler(types_js_1.ListToolsRequestSchema, () => __awaiter(this, void 0, void 0, function* () {\n const existingTools = getExistingTools();\n return {\n tools: [\n // Typia controller tools\n ...Array.from(registry.values()).map((entry) => {\n return {\n name: entry.function.name,\n description: entry.function.description,\n inputSchema: {\n type: \"object\",\n properties: entry.function.parameters.properties,\n required: entry.function.parameters.required,\n additionalProperties: false,\n $defs: entry.function.parameters.$defs,\n },\n };\n }),\n // Existing McpServer tools\n ...Object.entries(existingTools)\n .filter((pair) => !registry.has(pair[0]) && pair[1].enabled)\n .map((pair) => {\n return {\n name: pair[0],\n description: pair[1].description,\n inputSchema: convertZodToJsonSchema(pair[1].inputSchema),\n };\n }),\n ],\n };\n }));\n // tools/call handler\n server.setRequestHandler(types_js_1.CallToolRequestSchema, (request, extra) => __awaiter(this, void 0, void 0, function* () {\n const name = request.params.name;\n const args = request.params.arguments;\n // Check typia registry first\n const entry = registry.get(name);\n if (entry !== undefined) {\n return handleToolCall(entry, args);\n }\n // Fall back to existing McpServer tools\n const existingTools = getExistingTools();\n const existingTool = existingTools[name];\n if (existingTool && existingTool.enabled) {\n return existingTool.handler(args, extra);\n }\n return {\n isError: true,\n content: [{ type: \"text\", text: `Unknown tool: ${name}` }],\n };\n }));\n // Mark handlers as initialized to prevent McpServer from overwriting\n if (mcpServer) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n mcpServer._toolHandlersInitialized = true;\n }\n };\n const registerClassController = (registry, controller) => {\n const execute = controller.execute;\n for (const func of controller.application.functions) {\n const existing = registry.get(func.name);\n if (existing !== undefined) {\n throw new Error(`Duplicate function name \"${func.name}\" between controllers \"${existing.controller}\" and \"${controller.name}\"`);\n }\n const method = execute[func.name];\n if (typeof method !== \"function\") {\n throw new Error(`Method \"${func.name}\" not found on controller \"${controller.name}\"`);\n }\n registry.set(func.name, {\n controller: controller.name,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),\n });\n }\n };\n const registerHttpController = (registry, controller) => {\n const application = controller.application;\n const connection = controller.connection;\n for (const func of application.functions) {\n const existing = registry.get(func.name);\n if (existing !== undefined) {\n throw new Error(`Duplicate function name \"${func.name}\" between controllers \"${existing.controller}\" and \"${controller.name}\"`);\n }\n registry.set(func.name, {\n controller: controller.name,\n function: func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n if (controller.execute !== undefined) {\n const response = yield controller.execute({\n connection,\n application,\n function: func,\n arguments: args,\n });\n return response.body;\n }\n return utils_1.HttpLlm.execute({\n application,\n function: func,\n connection,\n input: args,\n });\n }),\n });\n }\n };\n const handleToolCall = (entry, args) => __awaiter(this, void 0, void 0, function* () {\n const coerced = utils_1.LlmJson.coerce(args, entry.function.parameters);\n const validation = entry.function.validate(coerced);\n if (!validation.success) {\n return {\n isError: true,\n content: [\n {\n type: \"text\",\n text: utils_1.LlmJson.stringify(validation),\n },\n ],\n };\n }\n try {\n const result = yield entry.execute(validation.data);\n return {\n content: [\n {\n type: \"text\",\n text: result === undefined\n ? \"Success\"\n : JSON.stringify(result, null, 2),\n },\n ],\n };\n }\n catch (error) {\n return {\n isError: true,\n content: [\n {\n type: \"text\",\n text: error instanceof Error\n ? `${error.name}: ${error.message}`\n : String(error),\n },\n ],\n };\n }\n });\n const convertZodToJsonSchema = (zodSchema) => {\n if (zodSchema === undefined) {\n return { type: \"object\", properties: {} };\n }\n // @todo: error TS2589: Type instantiation is excessively deep and possibly infinite.\n const converted = zod_to_json_schema_1.zodToJsonSchema(zodSchema);\n if (typeof converted === \"object\" &&\n \"type\" in converted &&\n converted.type === \"object\") {\n return converted;\n }\n return { type: \"object\", properties: {} };\n };\n})(McpControllerRegistrar || (exports.McpControllerRegistrar = McpControllerRegistrar = {}));\n//# sourceMappingURL=McpControllerRegistrar.js.map"],"names":["this","McpControllerRegistrar_1"],"mappings":";;;;;AACA,IAAI,SAAS,GAAG,CAACA,wBAAI,IAAIA,wBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACjG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACpG,QAAQ,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAA;AACpH,QAAQ,IAAI,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,KA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AC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC;AAC9D,8BAA8B,MAAM,CAAC,KAAK,CAAC;AAC3C,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,QAAA;AACA,IAAA,CAAK,CAAC;AACN,IAAI,MAAM,sBAAsB,GAAG,CAAC,SAAS,KAAK;AAClD,QAAQ,IAAI,SAAS,KAAK,SAAS,EAAE;AACrC,YAAY,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;AACrD,QAAA;AACA;AACA,QAAQ,MAAM,SAAS,GAAG,oBAAoB,CAAC,eAAe,CAAC,SAAS,CAAC;AACzE,QAAQ,IAAI,OAAO,SAAS,KAAK,QAAQ;AACzC,YAAY,MAAM,IAAI,SAAS;AAC/B,YAAY,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE;AACzC,YAAY,OAAO,SAAS;AAC5B,QAAA;AACA,QAAQ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;AACjD,IAAA,CAAK;AACL,CAAC,EAAE,sBAAsB,KAAK,wBAAA,GAAAA,wBAAA,CAAA,sBAA8B,GAAG,sBAAsB,GAAG,EAAE,CAAC,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typia/mcp",
3
- "version": "13.0.0-dev.20260427-2",
3
+ "version": "13.0.0-dev.20260430",
4
4
  "description": "MCP (Model Context Protocol) integration for typia",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -23,8 +23,8 @@
23
23
  "homepage": "https://typia.io",
24
24
  "dependencies": {
25
25
  "zod-to-json-schema": ">=3.24.0",
26
- "@typia/utils": "^13.0.0-dev.20260427-2",
27
- "@typia/interface": "^13.0.0-dev.20260427-2"
26
+ "@typia/interface": "^13.0.0-dev.20260430",
27
+ "@typia/utils": "^13.0.0-dev.20260430"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@modelcontextprotocol/sdk": ">=1.0.0"
@@ -33,14 +33,14 @@
33
33
  "@modelcontextprotocol/sdk": "^1.26.0",
34
34
  "@rollup/plugin-commonjs": "^29.0.0",
35
35
  "@rollup/plugin-node-resolve": "^16.0.3",
36
- "@typescript/native-preview": "7.0.0-dev.20260425.1",
36
+ "@typescript/native-preview": "7.0.0-dev.20260429.1",
37
37
  "rimraf": "^6.1.2",
38
38
  "rollup": "^4.56.0",
39
39
  "rollup-plugin-auto-external": "^2.0.0",
40
40
  "rollup-plugin-node-externals": "^8.1.2",
41
41
  "tinyglobby": "^0.2.12",
42
42
  "zod": "^3.25.0",
43
- "ttsc": "^0.4.4"
43
+ "ttsc": "^0.6.0"
44
44
  },
45
45
  "sideEffects": false,
46
46
  "files": [
@@ -1,6 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- export { getDefaultExportFromCjs };
6
- //# sourceMappingURL=_commonjsHelpers.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}