@josephyan/qingflow-app-user-mcp 0.2.0-beta.51 → 0.2.0-beta.52
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/README.md +2 -2
- package/npm/lib/runtime.mjs +22 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Install:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install @josephyan/qingflow-app-user-mcp@0.2.0-beta.
|
|
6
|
+
npm install @josephyan/qingflow-app-user-mcp@0.2.0-beta.52
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Run:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y -p @josephyan/qingflow-app-user-mcp@0.2.0-beta.
|
|
12
|
+
npx -y -p @josephyan/qingflow-app-user-mcp@0.2.0-beta.52 qingflow-app-user-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Environment:
|
package/npm/lib/runtime.mjs
CHANGED
|
@@ -82,6 +82,16 @@ export function getVenvServerCommand(packageRoot, commandName = "qingflow-mcp")
|
|
|
82
82
|
: path.join(getVenvDir(packageRoot), "bin", commandName);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
function readPackageVersion(packageRoot) {
|
|
86
|
+
const packageJsonPath = path.join(packageRoot, "package.json");
|
|
87
|
+
try {
|
|
88
|
+
const payload = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
89
|
+
return typeof payload.version === "string" && payload.version.trim() ? payload.version.trim() : null;
|
|
90
|
+
} catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
85
95
|
function getVenvPip(packageRoot) {
|
|
86
96
|
return WINDOWS
|
|
87
97
|
? path.join(getVenvDir(packageRoot), "Scripts", "pip.exe")
|
|
@@ -123,8 +133,18 @@ export function ensurePythonEnv(packageRoot, { force = false, commandName = "qin
|
|
|
123
133
|
const venvPython = getVenvPython(packageRoot);
|
|
124
134
|
const serverCommand = getVenvServerCommand(packageRoot, commandName);
|
|
125
135
|
const stampPath = path.join(venvDir, ".bootstrap.json");
|
|
136
|
+
const packageVersion = readPackageVersion(packageRoot);
|
|
137
|
+
let stampVersion = null;
|
|
138
|
+
if (fs.existsSync(stampPath)) {
|
|
139
|
+
try {
|
|
140
|
+
const payload = JSON.parse(fs.readFileSync(stampPath, "utf8"));
|
|
141
|
+
stampVersion = typeof payload.package_version === "string" && payload.package_version.trim() ? payload.package_version.trim() : null;
|
|
142
|
+
} catch {
|
|
143
|
+
stampVersion = null;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
126
146
|
|
|
127
|
-
if (!force && fs.existsSync(serverCommand) && fs.existsSync(stampPath)) {
|
|
147
|
+
if (!force && fs.existsSync(serverCommand) && fs.existsSync(stampPath) && stampVersion && stampVersion === packageVersion) {
|
|
128
148
|
return serverCommand;
|
|
129
149
|
}
|
|
130
150
|
|
|
@@ -145,6 +165,7 @@ export function ensurePythonEnv(packageRoot, { force = false, commandName = "qin
|
|
|
145
165
|
{
|
|
146
166
|
installed_at: new Date().toISOString(),
|
|
147
167
|
installer: "npm",
|
|
168
|
+
package_version: packageVersion,
|
|
148
169
|
},
|
|
149
170
|
null,
|
|
150
171
|
2
|
package/package.json
CHANGED