@tasksai/install 0.1.34 → 0.1.35

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +15 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tasksai/install",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "Shared TasksAI MCP installer CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -481,7 +481,7 @@ function buildMcpServerConfig({ client, vertical, installDir, runtimeDir, vendor
481
481
  TASKSAI_PRODUCT_ID: vertical.product_id,
482
482
  TASKSAI_API_BASE: vertical.api_base_url,
483
483
  TASKSAI_CLIENT: client.id,
484
- PYTHONPATH: vendorDir,
484
+ PYTHONPATH: pythonVendorPaths(vendorDir).join(path.delimiter),
485
485
  DOTENV_PATH: path.join(installDir, ".env")
486
486
  }
487
487
  };
@@ -491,6 +491,16 @@ function pythonCommandForPlatform(platform = process.platform) {
491
491
  return platform === "win32" ? "python" : "python3";
492
492
  }
493
493
 
494
+ function pythonVendorPaths(vendorDir, platform = process.platform) {
495
+ if (platform !== "win32") return [vendorDir];
496
+ return [
497
+ vendorDir,
498
+ path.win32.join(vendorDir, "win32"),
499
+ path.win32.join(vendorDir, "win32", "lib"),
500
+ path.win32.join(vendorDir, "Pythonwin")
501
+ ];
502
+ }
503
+
494
504
  async function jsonConfigHasServer(configPath, productId) {
495
505
  const config = await readJson(configPath);
496
506
  return Boolean(config.mcpServers?.[productId]);
@@ -1175,7 +1185,9 @@ async function safeReportDoctorPassed({
1175
1185
  async function verifyRuntimeHealth({ serverPath, vendorDir }) {
1176
1186
  const python = findPython();
1177
1187
  if (!python) throw new Error("Python 3 is unavailable");
1178
- const pythonPath = [vendorDir, process.env.PYTHONPATH].filter(Boolean).join(path.delimiter);
1188
+ const pythonPath = [...pythonVendorPaths(vendorDir), process.env.PYTHONPATH]
1189
+ .filter(Boolean)
1190
+ .join(path.delimiter);
1179
1191
  const check = [
1180
1192
  "import ast, pathlib, sys",
1181
1193
  "ast.parse(pathlib.Path(sys.argv[1]).read_text(encoding='utf-8'), filename=sys.argv[1])",
@@ -1361,6 +1373,7 @@ export {
1361
1373
  parseEnv,
1362
1374
  parseSource,
1363
1375
  pythonCommandForPlatform,
1376
+ pythonVendorPaths,
1364
1377
  safeReportDoctorPassed,
1365
1378
  verifyProductionSource,
1366
1379
  verifyRuntimeHealth,