@weapp-vite/mcp 1.4.2 → 1.4.4

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/dist/index.d.mts CHANGED
@@ -121,6 +121,7 @@ interface RuntimeConnectionInput {
121
121
  timeout?: number;
122
122
  port?: number;
123
123
  preferOpenedSession?: boolean;
124
+ preserveProjectRoot?: boolean;
124
125
  sessionId?: string;
125
126
  }
126
127
  interface RuntimeConsoleLogEntry {
package/dist/index.d.ts CHANGED
@@ -121,6 +121,7 @@ interface RuntimeConnectionInput {
121
121
  timeout?: number;
122
122
  port?: number;
123
123
  preferOpenedSession?: boolean;
124
+ preserveProjectRoot?: boolean;
124
125
  sessionId?: string;
125
126
  }
126
127
  interface RuntimeConsoleLogEntry {
package/dist/index.mjs CHANGED
@@ -627,6 +627,7 @@ z.object({
627
627
  timeout: z.number().int().positive().optional(),
628
628
  port: z.number().int().positive().optional(),
629
629
  preferOpenedSession: z.boolean().optional(),
630
+ preserveProjectRoot: z.boolean().optional(),
630
631
  sessionId: z.string().trim().min(1).optional()
631
632
  });
632
633
  const connectionInputSchema = {
@@ -634,6 +635,7 @@ const connectionInputSchema = {
634
635
  timeout: z.number().int().positive().optional(),
635
636
  port: z.number().int().positive().optional(),
636
637
  preferOpenedSession: z.boolean().optional(),
638
+ preserveProjectRoot: z.boolean().optional(),
637
639
  sessionId: z.string().trim().min(1).optional()
638
640
  };
639
641
  class RuntimeSessionManager {
@@ -670,6 +672,7 @@ class RuntimeSessionManager {
670
672
  sessionId: input.sessionId,
671
673
  timeout: input.timeout,
672
674
  preferOpenedSession: input.preferOpenedSession,
675
+ preserveProjectRoot: input.preserveProjectRoot ?? true,
673
676
  sharedSession: true
674
677
  });
675
678
  const sessionKey = this.resolveSessionKey(projectPath, input);
@@ -1938,6 +1941,7 @@ const connectionSchema = z.object({
1938
1941
  timeout: z.number().int().positive().optional(),
1939
1942
  port: z.number().int().positive().optional(),
1940
1943
  preferOpenedSession: z.boolean().optional(),
1944
+ preserveProjectRoot: z.boolean().optional(),
1941
1945
  sessionId: z.string().trim().min(1).optional()
1942
1946
  });
1943
1947
  const routeBodySchema = connectionSchema.extend({
@@ -2019,6 +2023,7 @@ function readConnectionFromQuery(url) {
2019
2023
  timeout: readNumberParam(url.searchParams.get("timeout")),
2020
2024
  port: readNumberParam(url.searchParams.get("port")),
2021
2025
  preferOpenedSession: readBooleanParam(url.searchParams.get("preferOpenedSession")),
2026
+ preserveProjectRoot: readBooleanParam(url.searchParams.get("preserveProjectRoot")),
2022
2027
  sessionId: url.searchParams.get("sessionId") ?? void 0
2023
2028
  }));
2024
2029
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/mcp",
3
3
  "type": "module",
4
- "version": "1.4.2",
4
+ "version": "1.4.4",
5
5
  "description": "mcp",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "ISC",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@modelcontextprotocol/sdk": "^1.29.0",
35
35
  "zod": "^4.4.3",
36
- "@weapp-vite/devtools-runtime": "0.4.2"
36
+ "@weapp-vite/devtools-runtime": "0.4.4"
37
37
  },
38
38
  "scripts": {
39
39
  "dev": "unbuild --stub",