mcp-server-framework 1.0.0 → 1.0.2

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.
Files changed (91) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/LICENSE-GPL.txt +675 -0
  3. package/LICENSE.txt +165 -0
  4. package/README.md +3 -5
  5. package/build/config/env.d.ts +11 -10
  6. package/build/config/env.d.ts.map +1 -1
  7. package/build/config/env.js +29 -17
  8. package/build/config/env.js.map +1 -1
  9. package/build/config/file/loader.js +1 -1
  10. package/build/config/file/schema.d.ts +18 -18
  11. package/build/config/file/schema.d.ts.map +1 -1
  12. package/build/config/file/schema.js +10 -10
  13. package/build/config/file/schema.js.map +1 -1
  14. package/build/errors/categories/validation.js +6 -6
  15. package/build/errors/categories/validation.js.map +1 -1
  16. package/build/errors/factory.d.ts +1 -1
  17. package/build/errors/factory.d.ts.map +1 -1
  18. package/build/errors/factory.js +1 -1
  19. package/build/errors/factory.js.map +1 -1
  20. package/build/index.d.ts +1 -1
  21. package/build/index.d.ts.map +1 -1
  22. package/build/index.js +1 -1
  23. package/build/index.js.map +1 -1
  24. package/build/logger/formatters/text-formatter.d.ts +4 -3
  25. package/build/logger/formatters/text-formatter.d.ts.map +1 -1
  26. package/build/logger/formatters/text-formatter.js +4 -3
  27. package/build/logger/formatters/text-formatter.js.map +1 -1
  28. package/build/mcp/capabilities/registry/tool-registry.d.ts.map +1 -1
  29. package/build/mcp/capabilities/registry/tool-registry.js +7 -2
  30. package/build/mcp/capabilities/registry/tool-registry.js.map +1 -1
  31. package/build/server/builder/server-builder.js +1 -1
  32. package/build/server/builder/server-builder.js.map +1 -1
  33. package/build/server/create-server.d.ts.map +1 -1
  34. package/build/server/create-server.js +30 -1
  35. package/build/server/create-server.js.map +1 -1
  36. package/build/server/middleware/rate-limit.d.ts.map +1 -1
  37. package/build/server/middleware/rate-limit.js +3 -2
  38. package/build/server/middleware/rate-limit.js.map +1 -1
  39. package/build/server/option-overrides.js +1 -1
  40. package/build/server/option-overrides.js.map +1 -1
  41. package/build/server/routes/health.d.ts.map +1 -1
  42. package/build/server/routes/health.js +2 -14
  43. package/build/server/routes/health.js.map +1 -1
  44. package/build/server/server-instance.d.ts.map +1 -1
  45. package/build/server/server-instance.js +4 -8
  46. package/build/server/server-instance.js.map +1 -1
  47. package/build/server/server-options.d.ts +6 -4
  48. package/build/server/server-options.d.ts.map +1 -1
  49. package/build/server/session/in-memory-store.d.ts.map +1 -1
  50. package/build/server/session/in-memory-store.js +2 -7
  51. package/build/server/session/in-memory-store.js.map +1 -1
  52. package/build/server/session/mcp-session.d.ts.map +1 -1
  53. package/build/server/session/mcp-session.js +10 -5
  54. package/build/server/session/mcp-session.js.map +1 -1
  55. package/build/server/session/session-factory.js +1 -1
  56. package/build/server/session/session-manager.d.ts +1 -1
  57. package/build/server/session/session-manager.d.ts.map +1 -1
  58. package/build/server/session/session-manager.js +15 -12
  59. package/build/server/session/session-manager.js.map +1 -1
  60. package/build/server/transport/sse/handler.d.ts.map +1 -1
  61. package/build/server/transport/sse/handler.js +2 -4
  62. package/build/server/transport/sse/handler.js.map +1 -1
  63. package/build/server/transport/streamable-http/stateful-handler.d.ts.map +1 -1
  64. package/build/server/transport/streamable-http/stateful-handler.js +24 -22
  65. package/build/server/transport/streamable-http/stateful-handler.js.map +1 -1
  66. package/build/server/types.d.ts +9 -6
  67. package/build/server/types.d.ts.map +1 -1
  68. package/build/telemetry/core/constants.d.ts +6 -4
  69. package/build/telemetry/core/constants.d.ts.map +1 -1
  70. package/build/telemetry/core/constants.js +6 -4
  71. package/build/telemetry/core/constants.js.map +1 -1
  72. package/build/telemetry/core/types.d.ts +1 -1
  73. package/build/telemetry/core/types.d.ts.map +1 -1
  74. package/build/telemetry/sdk.d.ts.map +1 -1
  75. package/build/telemetry/sdk.js +30 -6
  76. package/build/telemetry/sdk.js.map +1 -1
  77. package/build/utils/index.d.ts +2 -2
  78. package/build/utils/index.d.ts.map +1 -1
  79. package/build/utils/index.js +2 -2
  80. package/build/utils/index.js.map +1 -1
  81. package/build/utils/string-helpers.d.ts +69 -0
  82. package/build/utils/string-helpers.d.ts.map +1 -1
  83. package/build/utils/string-helpers.js +116 -0
  84. package/build/utils/string-helpers.js.map +1 -1
  85. package/build/utils/zod-helpers.d.ts +18 -0
  86. package/build/utils/zod-helpers.d.ts.map +1 -1
  87. package/build/utils/zod-helpers.js +27 -1
  88. package/build/utils/zod-helpers.js.map +1 -1
  89. package/package.json +5 -7
  90. package/LICENSE-GPL.md +0 -219
  91. package/LICENSE.md +0 -187
package/LICENSE.md DELETED
@@ -1,187 +0,0 @@
1
- # GNU Lesser General Public License v3.0
2
-
3
- Copyright (c) 2025-present Marcel Pfennig
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU Lesser General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU Lesser General Public License for more details.
14
-
15
- You should have received a copy of the GNU Lesser General Public License
16
- along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- ---
19
-
20
- ## GNU LESSER GENERAL PUBLIC LICENSE
21
-
22
- Version 3, 29 June 2007
23
-
24
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
25
-
26
- Everyone is permitted to copy and distribute verbatim copies of this
27
- license document, but changing it is not allowed.
28
-
29
- This version of the GNU Lesser General Public License incorporates the
30
- terms and conditions of version 3 of the GNU General Public License,
31
- supplemented by the additional permissions listed below.
32
-
33
- ### 0. Additional Definitions.
34
-
35
- As used herein, "this License" refers to version 3 of the GNU Lesser
36
- General Public License, and the "GNU GPL" refers to version 3 of the
37
- GNU General Public License.
38
-
39
- "The Library" refers to a covered work governed by this License, other
40
- than an Application or a Combined Work as defined below.
41
-
42
- An "Application" is any work that makes use of an interface provided by
43
- the Library, but which is not otherwise based on the Library. Defining
44
- a subclass of a class defined by the Library is deemed a mode of using
45
- an interface provided by the Library.
46
-
47
- A "Combined Work" is a work produced by combining or linking an
48
- Application with the Library. The particular version of the Library
49
- with which the Combined Work was made is also called the "Linked
50
- Version".
51
-
52
- The "Minimal Corresponding Source" for a Combined Work means the
53
- Corresponding Source for the Combined Work, excluding any source code
54
- for portions of the Combined Work that, considered in isolation, are
55
- based on the Application, and not on the Linked Version.
56
-
57
- The "Corresponding Application Code" for a Combined Work means the
58
- object code and/or source code for the Application, including any data
59
- and utility programs needed for reproducing the Combined Work from the
60
- Application, but excluding the System Libraries of the Combined Work.
61
-
62
- ### 1. Exception to Section 3 of the GNU GPL.
63
-
64
- You may convey a covered work under sections 3 and 4 of this License
65
- without being bound by section 3 of the GNU GPL.
66
-
67
- ### 2. Conveying Modified Versions.
68
-
69
- If you modify a copy of the Library, and, in your modifications, a
70
- facility refers to a function or data to be supplied by an Application
71
- that uses the facility (other than as an argument passed when the
72
- facility is invoked), then you may convey a copy of the modified
73
- version:
74
-
75
- a) under this License, provided that your good faith effort is made
76
- to ensure that, in the event an Application does not supply the
77
- function or data, the facility still operates, and performs whatever
78
- part of its purpose remains meaningful, or
79
-
80
- b) under the GNU GPL, with none of the additional permissions of
81
- this License applicable to that copy.
82
-
83
- ### 3. Object Code Incorporating Material from Library Header Files.
84
-
85
- The object code form of an Application may incorporate material from a
86
- header file that is part of the Library. You may convey such object
87
- code under terms of your choice, provided that, if the incorporated
88
- material is not limited to numerical parameters, data structure layouts
89
- and accessors, or small macros, inline functions and templates (ten or
90
- fewer lines in length), you do both of the following:
91
-
92
- a) Give prominent notice with each copy of the object code that the
93
- Library is used in it and that the Library and its use are covered by
94
- this License.
95
-
96
- b) Accompany the object code with a copy of the GNU GPL and this
97
- license document.
98
-
99
- ### 4. Combined Works.
100
-
101
- You may convey a Combined Work under terms of your choice that, taken
102
- together, effectively do not restrict modification of the portions of
103
- the Library contained in the Combined Work and reverse engineering for
104
- debugging such modifications, if you also do each of the following:
105
-
106
- a) Give prominent notice with each copy of the Combined Work that
107
- the Library is used in it and that the Library and its use are
108
- covered by this License.
109
-
110
- b) Accompany the Combined Work with a copy of the GNU GPL and this
111
- license document.
112
-
113
- c) For a Combined Work that displays copyright notices during
114
- execution, include the copyright notice for the Library among these
115
- notices, as well as a reference directing the user to the copies of
116
- the GNU GPL and this license document.
117
-
118
- d) Do one of the following:
119
-
120
- 0) Convey the Minimal Corresponding Source under the terms of
121
- this License, and the Corresponding Application Code in a form
122
- suitable for, and under terms that permit, the user to recombine
123
- or relink the Application with a modified version of the Linked
124
- Version to produce a modified Combined Work, in the manner
125
- specified by section 6 of the GNU GPL for conveying Corresponding
126
- Source.
127
-
128
- 1) Use a suitable shared library mechanism for linking with the
129
- Library. A suitable mechanism is one that (a) uses at run time a
130
- copy of the Library already present on the user's computer system,
131
- rather than copying library functions into the executable, and (b)
132
- will operate properly with a modified version of the Library that
133
- is interface-compatible with the Linked Version.
134
-
135
- e) Provide Installation Information, but only if you would otherwise
136
- be required to provide such information under section 6 of the GNU
137
- GPL, and only to the extent that such information is necessary to
138
- install and execute a modified version of the Combined Work produced
139
- by recombining or relinking the Application with a modified version
140
- of the Linked Version. (If you use option 4d0, the Installation
141
- Information must accompany the Minimal Corresponding Source and
142
- Corresponding Application Code. If you use option 4d1, you must
143
- provide the Installation Information in the manner specified by
144
- section 6 of the GNU GPL for conveying Corresponding Source.)
145
-
146
- ### 5. Combined Libraries.
147
-
148
- You may place library facilities that are a work based on the Library
149
- side by side in a single library together with other library facilities
150
- that are not Applications and are not covered by this License, and
151
- convey such a combined library under terms of your choice, if you do
152
- both of the following:
153
-
154
- a) Accompany the combined library with a copy of the same work based
155
- on the Library, uncombined with any other library facilities,
156
- conveyed under the terms of this License.
157
-
158
- b) Give prominent notice with the combined library that part of it
159
- is a work based on the Library, and explaining where to find the
160
- accompanying uncombined form of the same work.
161
-
162
- ### 6. Revised Versions of the GNU Lesser General Public License.
163
-
164
- The Free Software Foundation may publish revised and/or new versions of
165
- the GNU Lesser General Public License from time to time. Such new
166
- versions will be similar in spirit to the present version, but may
167
- differ in detail to address new problems or concerns.
168
-
169
- Each version is given a distinguishing version number. If the Library
170
- as you received it specifies that a certain numbered version of the GNU
171
- Lesser General Public License "or any later version" applies to it, you
172
- have the option of following the terms and conditions either of that
173
- published version or of any later version published by the Free
174
- Software Foundation. If the Library as you received it does not specify
175
- a version number of the GNU Lesser General Public License, you may
176
- choose any version of the GNU Lesser General Public License ever
177
- published by the Free Software Foundation.
178
-
179
- If the Library as you received it specifies that a proxy can decide
180
- whether future versions of the GNU Lesser General Public License shall
181
- apply, that proxy's public statement of acceptance of any version is
182
- permanent authorization for you to choose that version for the Library.
183
-
184
- ---
185
-
186
- The full text of the GNU General Public License v3.0, which forms the
187
- basis of this license, is included in [LICENSE-GPL.md](LICENSE-GPL.md).