@tasksai/install 0.1.7 → 0.1.8

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 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tasksai/install",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Shared TasksAI MCP installer CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -9,7 +9,7 @@ import readline from "node:readline/promises";
9
9
  import { spawnSync } from "node:child_process";
10
10
  import { stdin as input, stdout as output } from "node:process";
11
11
 
12
- const INSTALLER_VERSION = "0.1.7";
12
+ const INSTALLER_VERSION = "0.1.8";
13
13
  const DEFAULT_SOURCES = {
14
14
  lawtasksai: "https://github.com/laudoluxDev/lawtasksai-mcp",
15
15
  farmer: "https://github.com/laudoluxDev/farmertasksai-mcp",
@@ -477,19 +477,23 @@ function formatPermissionRecovery({ operation, failures, options, vertical, sour
477
477
  }
478
478
 
479
479
  function buildInstallCommand({ options, source }) {
480
- const parts = ["npm", "exec", "--package=@tasksai/install", "--", "tasksai-install", options.productId];
480
+ const cliParts = ["tasksai-install", options.productId];
481
481
  const sourceUrl = source?.repoUrl || options.source;
482
- if (sourceUrl) parts.push("--source", sourceUrl);
483
- if (options.client) parts.push("--client", options.client);
484
- if (options.installDir) parts.push("--install-dir", resolveUserPath(options.installDir));
485
- return parts.map(shellToken).join(" ");
482
+ if (sourceUrl) cliParts.push("--source", sourceUrl);
483
+ if (options.client) cliParts.push("--client", options.client);
484
+ if (options.installDir) cliParts.push("--install-dir", resolveUserPath(options.installDir));
485
+ return buildNpmCallCommand(cliParts);
486
486
  }
487
487
 
488
488
  function buildDoctorCommand(options) {
489
- const parts = ["npm", "exec", "--package=@tasksai/install", "--", "tasksai-install", options.productId, "doctor"];
490
- if (options.client) parts.push("--client", options.client);
491
- if (options.installDir) parts.push("--install-dir", resolveUserPath(options.installDir));
492
- return parts.map(shellToken).join(" ");
489
+ const cliParts = ["tasksai-install", options.productId, "doctor"];
490
+ if (options.client) cliParts.push("--client", options.client);
491
+ if (options.installDir) cliParts.push("--install-dir", resolveUserPath(options.installDir));
492
+ return buildNpmCallCommand(cliParts);
493
+ }
494
+
495
+ function buildNpmCallCommand(cliParts) {
496
+ return ["npm", "exec", "--package=@tasksai/install", "--call", cliParts.map(shellToken).join(" ")].map(shellToken).join(" ");
493
497
  }
494
498
 
495
499
  function shellToken(value) {
@@ -667,7 +671,7 @@ function verifySource({ options, source, manifest, vertical }) {
667
671
  const command = installer?.command;
668
672
  const args = installer?.args || [];
669
673
  const isLegacyNpx = command === "npx" && Array.isArray(args) && args[0] === "@tasksai/install";
670
- const isNpmExec = command === "npm" && Array.isArray(args) && args.includes("--package=@tasksai/install") && args.includes("tasksai-install");
674
+ const isNpmExec = command === "npm" && Array.isArray(args) && args.includes("--package=@tasksai/install") && (args.includes("tasksai-install") || args.includes("--call"));
671
675
  if (!isLegacyNpx && !isNpmExec) {
672
676
  throw new Error("Manifest installer command is not an approved @tasksai/install command.");
673
677
  }