@corsenai/corsen-context 2.0.0 → 2.0.1

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Corsen AI
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Corsen AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.d.mts CHANGED
@@ -440,7 +440,7 @@ declare class MCPServer {
440
440
  * published and what is reported over MCP.
441
441
  */
442
442
  /** Corsen Context release version. */
443
- declare const CORSEN_CONTEXT_VERSION = "2.0.0";
443
+ declare const CORSEN_CONTEXT_VERSION = "2.0.1";
444
444
  /** MCP protocol version implemented by this server. */
445
445
  declare const MCP_PROTOCOL_VERSION = "2025-11-25";
446
446
 
package/dist/index.d.ts CHANGED
@@ -440,7 +440,7 @@ declare class MCPServer {
440
440
  * published and what is reported over MCP.
441
441
  */
442
442
  /** Corsen Context release version. */
443
- declare const CORSEN_CONTEXT_VERSION = "2.0.0";
443
+ declare const CORSEN_CONTEXT_VERSION = "2.0.1";
444
444
  /** MCP protocol version implemented by this server. */
445
445
  declare const MCP_PROTOCOL_VERSION = "2025-11-25";
446
446
 
package/dist/index.js CHANGED
@@ -170,7 +170,7 @@ var SECURITY_HEADERS = {
170
170
  };
171
171
 
172
172
  // src/version.ts
173
- var CORSEN_CONTEXT_VERSION = "2.0.0";
173
+ var CORSEN_CONTEXT_VERSION = "2.0.1";
174
174
  var MCP_PROTOCOL_VERSION = "2025-11-25";
175
175
 
176
176
  // src/security.ts
@@ -771,7 +771,10 @@ function normalizePath(path) {
771
771
  if (withSlash.includes("//")) return null;
772
772
  const segments = withSlash.split("/");
773
773
  if (segments.some((segment) => segment === "." || segment === "..")) return null;
774
- const withoutTrailing = withSlash.replace(/\/+$/, "");
774
+ let withoutTrailing = withSlash;
775
+ while (withoutTrailing.length > 1 && withoutTrailing.endsWith("/")) {
776
+ withoutTrailing = withoutTrailing.slice(0, -1);
777
+ }
775
778
  return withoutTrailing || "/";
776
779
  }
777
780
  function rawPathFromInput(value) {
package/dist/index.mjs CHANGED
@@ -78,7 +78,7 @@ var SECURITY_HEADERS = {
78
78
  };
79
79
 
80
80
  // src/version.ts
81
- var CORSEN_CONTEXT_VERSION = "2.0.0";
81
+ var CORSEN_CONTEXT_VERSION = "2.0.1";
82
82
  var MCP_PROTOCOL_VERSION = "2025-11-25";
83
83
 
84
84
  // src/security.ts
@@ -679,7 +679,10 @@ function normalizePath(path) {
679
679
  if (withSlash.includes("//")) return null;
680
680
  const segments = withSlash.split("/");
681
681
  if (segments.some((segment) => segment === "." || segment === "..")) return null;
682
- const withoutTrailing = withSlash.replace(/\/+$/, "");
682
+ let withoutTrailing = withSlash;
683
+ while (withoutTrailing.length > 1 && withoutTrailing.endsWith("/")) {
684
+ withoutTrailing = withoutTrailing.slice(0, -1);
685
+ }
683
686
  return withoutTrailing || "/";
684
687
  }
685
688
  function rawPathFromInput(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsenai/corsen-context",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Owner-controlled public content tools for MCP, WebMCP, llms.txt, and sitemaps",
5
5
  "author": "Corsen AI <contact@corsen.ai>",
6
6
  "license": "MIT",