@leanmcp/core 0.3.17 → 0.3.18-alpha.6.6dae082
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +485 -474
- package/dist/index.d.mts +4 -16
- package/dist/index.d.ts +4 -16
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +76 -76
- package/dist/chunk-LPEX4YW6.mjs +0 -13
- package/dist/server-BEQUIEE2.mjs +0 -25808
package/dist/index.d.mts
CHANGED
|
@@ -673,16 +673,10 @@ declare class MCPServer {
|
|
|
673
673
|
method: string;
|
|
674
674
|
params?: {
|
|
675
675
|
[x: string]: unknown;
|
|
676
|
-
task?: {
|
|
677
|
-
[x: string]: unknown;
|
|
678
|
-
ttl?: number | null | undefined;
|
|
679
|
-
pollInterval?: number | undefined;
|
|
680
|
-
} | undefined;
|
|
681
676
|
_meta?: {
|
|
682
677
|
[x: string]: unknown;
|
|
683
678
|
progressToken?: string | number | undefined;
|
|
684
679
|
"io.modelcontextprotocol/related-task"?: {
|
|
685
|
-
[x: string]: unknown;
|
|
686
680
|
taskId: string;
|
|
687
681
|
} | undefined;
|
|
688
682
|
} | undefined;
|
|
@@ -693,8 +687,8 @@ declare class MCPServer {
|
|
|
693
687
|
[x: string]: unknown;
|
|
694
688
|
_meta?: {
|
|
695
689
|
[x: string]: unknown;
|
|
690
|
+
progressToken?: string | number | undefined;
|
|
696
691
|
"io.modelcontextprotocol/related-task"?: {
|
|
697
|
-
[x: string]: unknown;
|
|
698
692
|
taskId: string;
|
|
699
693
|
} | undefined;
|
|
700
694
|
} | undefined;
|
|
@@ -703,8 +697,8 @@ declare class MCPServer {
|
|
|
703
697
|
[x: string]: unknown;
|
|
704
698
|
_meta?: {
|
|
705
699
|
[x: string]: unknown;
|
|
700
|
+
progressToken?: string | number | undefined;
|
|
706
701
|
"io.modelcontextprotocol/related-task"?: {
|
|
707
|
-
[x: string]: unknown;
|
|
708
702
|
taskId: string;
|
|
709
703
|
} | undefined;
|
|
710
704
|
} | undefined;
|
|
@@ -734,16 +728,10 @@ declare class MCPServerRuntime {
|
|
|
734
728
|
method: string;
|
|
735
729
|
params?: {
|
|
736
730
|
[x: string]: unknown;
|
|
737
|
-
task?: {
|
|
738
|
-
[x: string]: unknown;
|
|
739
|
-
ttl?: number | null | undefined;
|
|
740
|
-
pollInterval?: number | undefined;
|
|
741
|
-
} | undefined;
|
|
742
731
|
_meta?: {
|
|
743
732
|
[x: string]: unknown;
|
|
744
733
|
progressToken?: string | number | undefined;
|
|
745
734
|
"io.modelcontextprotocol/related-task"?: {
|
|
746
|
-
[x: string]: unknown;
|
|
747
735
|
taskId: string;
|
|
748
736
|
} | undefined;
|
|
749
737
|
} | undefined;
|
|
@@ -754,8 +742,8 @@ declare class MCPServerRuntime {
|
|
|
754
742
|
[x: string]: unknown;
|
|
755
743
|
_meta?: {
|
|
756
744
|
[x: string]: unknown;
|
|
745
|
+
progressToken?: string | number | undefined;
|
|
757
746
|
"io.modelcontextprotocol/related-task"?: {
|
|
758
|
-
[x: string]: unknown;
|
|
759
747
|
taskId: string;
|
|
760
748
|
} | undefined;
|
|
761
749
|
} | undefined;
|
|
@@ -764,8 +752,8 @@ declare class MCPServerRuntime {
|
|
|
764
752
|
[x: string]: unknown;
|
|
765
753
|
_meta?: {
|
|
766
754
|
[x: string]: unknown;
|
|
755
|
+
progressToken?: string | number | undefined;
|
|
767
756
|
"io.modelcontextprotocol/related-task"?: {
|
|
768
|
-
[x: string]: unknown;
|
|
769
757
|
taskId: string;
|
|
770
758
|
} | undefined;
|
|
771
759
|
} | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -673,16 +673,10 @@ declare class MCPServer {
|
|
|
673
673
|
method: string;
|
|
674
674
|
params?: {
|
|
675
675
|
[x: string]: unknown;
|
|
676
|
-
task?: {
|
|
677
|
-
[x: string]: unknown;
|
|
678
|
-
ttl?: number | null | undefined;
|
|
679
|
-
pollInterval?: number | undefined;
|
|
680
|
-
} | undefined;
|
|
681
676
|
_meta?: {
|
|
682
677
|
[x: string]: unknown;
|
|
683
678
|
progressToken?: string | number | undefined;
|
|
684
679
|
"io.modelcontextprotocol/related-task"?: {
|
|
685
|
-
[x: string]: unknown;
|
|
686
680
|
taskId: string;
|
|
687
681
|
} | undefined;
|
|
688
682
|
} | undefined;
|
|
@@ -693,8 +687,8 @@ declare class MCPServer {
|
|
|
693
687
|
[x: string]: unknown;
|
|
694
688
|
_meta?: {
|
|
695
689
|
[x: string]: unknown;
|
|
690
|
+
progressToken?: string | number | undefined;
|
|
696
691
|
"io.modelcontextprotocol/related-task"?: {
|
|
697
|
-
[x: string]: unknown;
|
|
698
692
|
taskId: string;
|
|
699
693
|
} | undefined;
|
|
700
694
|
} | undefined;
|
|
@@ -703,8 +697,8 @@ declare class MCPServer {
|
|
|
703
697
|
[x: string]: unknown;
|
|
704
698
|
_meta?: {
|
|
705
699
|
[x: string]: unknown;
|
|
700
|
+
progressToken?: string | number | undefined;
|
|
706
701
|
"io.modelcontextprotocol/related-task"?: {
|
|
707
|
-
[x: string]: unknown;
|
|
708
702
|
taskId: string;
|
|
709
703
|
} | undefined;
|
|
710
704
|
} | undefined;
|
|
@@ -734,16 +728,10 @@ declare class MCPServerRuntime {
|
|
|
734
728
|
method: string;
|
|
735
729
|
params?: {
|
|
736
730
|
[x: string]: unknown;
|
|
737
|
-
task?: {
|
|
738
|
-
[x: string]: unknown;
|
|
739
|
-
ttl?: number | null | undefined;
|
|
740
|
-
pollInterval?: number | undefined;
|
|
741
|
-
} | undefined;
|
|
742
731
|
_meta?: {
|
|
743
732
|
[x: string]: unknown;
|
|
744
733
|
progressToken?: string | number | undefined;
|
|
745
734
|
"io.modelcontextprotocol/related-task"?: {
|
|
746
|
-
[x: string]: unknown;
|
|
747
735
|
taskId: string;
|
|
748
736
|
} | undefined;
|
|
749
737
|
} | undefined;
|
|
@@ -754,8 +742,8 @@ declare class MCPServerRuntime {
|
|
|
754
742
|
[x: string]: unknown;
|
|
755
743
|
_meta?: {
|
|
756
744
|
[x: string]: unknown;
|
|
745
|
+
progressToken?: string | number | undefined;
|
|
757
746
|
"io.modelcontextprotocol/related-task"?: {
|
|
758
|
-
[x: string]: unknown;
|
|
759
747
|
taskId: string;
|
|
760
748
|
} | undefined;
|
|
761
749
|
} | undefined;
|
|
@@ -764,8 +752,8 @@ declare class MCPServerRuntime {
|
|
|
764
752
|
[x: string]: unknown;
|
|
765
753
|
_meta?: {
|
|
766
754
|
[x: string]: unknown;
|
|
755
|
+
progressToken?: string | number | undefined;
|
|
767
756
|
"io.modelcontextprotocol/related-task"?: {
|
|
768
|
-
[x: string]: unknown;
|
|
769
757
|
taskId: string;
|
|
770
758
|
} | undefined;
|
|
771
759
|
} | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1454,14 +1454,14 @@ var init_index = __esm({
|
|
|
1454
1454
|
/**
|
|
1455
1455
|
* Auto-register all services from the mcp directory
|
|
1456
1456
|
* Scans the directory recursively and registers all exported classes
|
|
1457
|
-
*
|
|
1457
|
+
*
|
|
1458
1458
|
* @param mcpDir - Path to the mcp directory containing service files
|
|
1459
1459
|
* @param serviceFactories - Optional map of service class names to factory functions for dependency injection
|
|
1460
|
-
*
|
|
1460
|
+
*
|
|
1461
1461
|
* @example
|
|
1462
1462
|
* // Auto-register services with no dependencies
|
|
1463
1463
|
* await server.autoRegisterServices('./mcp');
|
|
1464
|
-
*
|
|
1464
|
+
*
|
|
1465
1465
|
* @example
|
|
1466
1466
|
* // Auto-register with dependency injection
|
|
1467
1467
|
* await server.autoRegisterServices('./mcp', {
|
|
@@ -1614,7 +1614,7 @@ var init_index = __esm({
|
|
|
1614
1614
|
}
|
|
1615
1615
|
/**
|
|
1616
1616
|
* Watch UI manifest for changes and reload resources dynamically
|
|
1617
|
-
*
|
|
1617
|
+
*
|
|
1618
1618
|
* CRITICAL: Only for stateful mode. In stateless mode, each request
|
|
1619
1619
|
* creates a fresh server that reads the manifest directly, making
|
|
1620
1620
|
* watchers both unnecessary and a memory leak source.
|
package/dist/index.mjs
CHANGED
|
@@ -1341,14 +1341,14 @@ var MCPServer = class {
|
|
|
1341
1341
|
/**
|
|
1342
1342
|
* Auto-register all services from the mcp directory
|
|
1343
1343
|
* Scans the directory recursively and registers all exported classes
|
|
1344
|
-
*
|
|
1344
|
+
*
|
|
1345
1345
|
* @param mcpDir - Path to the mcp directory containing service files
|
|
1346
1346
|
* @param serviceFactories - Optional map of service class names to factory functions for dependency injection
|
|
1347
|
-
*
|
|
1347
|
+
*
|
|
1348
1348
|
* @example
|
|
1349
1349
|
* // Auto-register services with no dependencies
|
|
1350
1350
|
* await server.autoRegisterServices('./mcp');
|
|
1351
|
-
*
|
|
1351
|
+
*
|
|
1352
1352
|
* @example
|
|
1353
1353
|
* // Auto-register with dependency injection
|
|
1354
1354
|
* await server.autoRegisterServices('./mcp', {
|
|
@@ -1501,7 +1501,7 @@ var MCPServer = class {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
/**
|
|
1503
1503
|
* Watch UI manifest for changes and reload resources dynamically
|
|
1504
|
-
*
|
|
1504
|
+
*
|
|
1505
1505
|
* CRITICAL: Only for stateful mode. In stateless mode, each request
|
|
1506
1506
|
* creates a fresh server that reads the manifest directly, making
|
|
1507
1507
|
* watchers both unnecessary and a memory leak source.
|
package/package.json
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@leanmcp/core",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Core library implementing decorators, reflection, and MCP runtime server",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"require": "./dist/index.js",
|
|
12
|
-
"import": "./dist/index.mjs"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist",
|
|
17
|
-
"README.md",
|
|
18
|
-
"LICENSE"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
22
|
-
"dev": "tsup src/index.ts --format esm,cjs --dts --watch",
|
|
23
|
-
"test": "jest --passWithNoTests",
|
|
24
|
-
"test:watch": "jest --watch"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
28
|
-
"ajv": "^8.12.0",
|
|
29
|
-
"chokidar": "^4.0.0",
|
|
30
|
-
"dotenv": "^16.3.1",
|
|
31
|
-
"reflect-metadata": "^0.2.1"
|
|
32
|
-
},
|
|
33
|
-
"peerDependencies": {
|
|
34
|
-
"cors": "^2.8.5",
|
|
35
|
-
"express": "^5.0.0",
|
|
36
|
-
"@leanmcp/auth": "^0.4.0"
|
|
37
|
-
},
|
|
38
|
-
"peerDependenciesMeta": {
|
|
39
|
-
"express": {
|
|
40
|
-
"optional": true
|
|
41
|
-
},
|
|
42
|
-
"cors": {
|
|
43
|
-
"optional": true
|
|
44
|
-
},
|
|
45
|
-
"@leanmcp/auth": {
|
|
46
|
-
"optional": true
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@types/cors": "^2.8.0",
|
|
51
|
-
"@types/express": "^5.0.0",
|
|
52
|
-
"@types/node": "^20.0.0"
|
|
53
|
-
},
|
|
54
|
-
"repository": {
|
|
55
|
-
"type": "git",
|
|
56
|
-
"url": "git+https://github.com/LeanMCP/leanmcp-sdk.git",
|
|
57
|
-
"directory": "packages/core"
|
|
58
|
-
},
|
|
59
|
-
"homepage": "https://github.com/LeanMCP/leanmcp-sdk#readme",
|
|
60
|
-
"bugs": {
|
|
61
|
-
"url": "https://github.com/LeanMCP/leanmcp-sdk/issues"
|
|
62
|
-
},
|
|
63
|
-
"keywords": [
|
|
64
|
-
"mcp",
|
|
65
|
-
"model-context-protocol",
|
|
66
|
-
"typescript",
|
|
67
|
-
"decorators",
|
|
68
|
-
"server",
|
|
69
|
-
"runtime"
|
|
70
|
-
],
|
|
71
|
-
"author": "LeanMCP <admin@leanmcp.com>",
|
|
72
|
-
"license": "MIT",
|
|
73
|
-
"publishConfig": {
|
|
74
|
-
"access": "public"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@leanmcp/core",
|
|
3
|
+
"version": "0.3.18-alpha.6.6dae082",
|
|
4
|
+
"description": "Core library implementing decorators, reflection, and MCP runtime server",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
22
|
+
"dev": "tsup src/index.ts --format esm,cjs --dts --watch",
|
|
23
|
+
"test": "jest --passWithNoTests",
|
|
24
|
+
"test:watch": "jest --watch"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
28
|
+
"ajv": "^8.12.0",
|
|
29
|
+
"chokidar": "^4.0.0",
|
|
30
|
+
"dotenv": "^16.3.1",
|
|
31
|
+
"reflect-metadata": "^0.2.1"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"cors": "^2.8.5",
|
|
35
|
+
"express": "^5.0.0",
|
|
36
|
+
"@leanmcp/auth": "^0.4.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependenciesMeta": {
|
|
39
|
+
"express": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"cors": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"@leanmcp/auth": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/cors": "^2.8.0",
|
|
51
|
+
"@types/express": "^5.0.0",
|
|
52
|
+
"@types/node": "^20.0.0"
|
|
53
|
+
},
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/LeanMCP/leanmcp-sdk.git",
|
|
57
|
+
"directory": "packages/core"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/LeanMCP/leanmcp-sdk#readme",
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "https://github.com/LeanMCP/leanmcp-sdk/issues"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"mcp",
|
|
65
|
+
"model-context-protocol",
|
|
66
|
+
"typescript",
|
|
67
|
+
"decorators",
|
|
68
|
+
"server",
|
|
69
|
+
"runtime"
|
|
70
|
+
],
|
|
71
|
+
"author": "LeanMCP <admin@leanmcp.com>",
|
|
72
|
+
"license": "MIT",
|
|
73
|
+
"publishConfig": {
|
|
74
|
+
"access": "public"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/dist/chunk-LPEX4YW6.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
-
}) : x)(function(x) {
|
|
6
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
__name,
|
|
12
|
-
__require
|
|
13
|
-
};
|