@cannbot-ai/install-helper 1.1.6 → 1.1.7

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.js CHANGED
@@ -479,7 +479,7 @@ var init_embedded_plugins = __esm({
479
479
  aliases: [
480
480
  "triton"
481
481
  ],
482
- skills: 7,
482
+ skills: 8,
483
483
  agents: 0,
484
484
  description: "Triton-Ascend \u7B97\u5B50 6 \u9636\u6BB5\u81EA\u52A8\u751F\u6210\u4E0E\u4F18\u5316\uFF08\u63CF\u8FF0\u2192\u4EE3\u7801\u2192\u9A8C\u8BC1\u2192\u4F18\u5316\uFF09",
485
485
  version: "1.0.2",
@@ -495,7 +495,8 @@ var init_embedded_plugins = __esm({
495
495
  "triton-op-verifier",
496
496
  "triton-latency-optimizer",
497
497
  "npu-arch",
498
- "triton-precision-debug"
498
+ "triton-precision-debug",
499
+ "triton-simulator-optimizer"
499
500
  ]
500
501
  }
501
502
  ],
@@ -2891,7 +2892,7 @@ function removeSkillsFromRecord(skillIds, tool, level, installPath) {
2891
2892
  }
2892
2893
  writeSkillRecord(record);
2893
2894
  }
2894
- function getInstalledSkills(tool, level, installPath) {
2895
+ function getInstalledSkills(tool, level, installPath, allowFsScan = true) {
2895
2896
  const record = readSkillRecord();
2896
2897
  const recordedSkills = record[tool]?.[level]?.[installPath]?.skills || [];
2897
2898
  const configRoot = getConfigRoot(tool, level);
@@ -2900,6 +2901,9 @@ function getInstalledSkills(tool, level, installPath) {
2900
2901
  const skillPath = join10(skillsDir, skillId);
2901
2902
  return existsSync11(skillPath) || isSymlink(skillPath);
2902
2903
  });
2904
+ if (!allowFsScan) {
2905
+ return fromRecord;
2906
+ }
2903
2907
  const fromFs = [];
2904
2908
  if (existsSync11(skillsDir)) {
2905
2909
  try {
@@ -2923,7 +2927,7 @@ function getLastBatchSkills(tool, level, installPath) {
2923
2927
  return null;
2924
2928
  }
2925
2929
  const lastBatch = entry.batches[entry.batches.length - 1];
2926
- const configRoot = getConfigRoot(tool, level);
2930
+ const configRoot = level === "project" ? getConfigRoot(tool, level, installPath) : getConfigRoot(tool, level);
2927
2931
  const skillsDir = join10(configRoot, "skills");
2928
2932
  return lastBatch.skills.filter((skillId) => {
2929
2933
  const skillPath = join10(skillsDir, skillId);
@@ -5044,7 +5048,7 @@ async function uninstallCommand(names, options) {
5044
5048
  }
5045
5049
  async function uninstallAll(tool, level, yes) {
5046
5050
  const installPath = level === "project" ? process.cwd() : getConfigRoot(tool, level);
5047
- const installedSkills = getInstalledSkills(tool, level, installPath);
5051
+ const installedSkills = getInstalledSkills(tool, level, installPath, !yes);
5048
5052
  const installedPlugins = scanInstalled().filter((p) => p.tool === tool && p.level === level);
5049
5053
  const totalItems = installedSkills.length + installedPlugins.length;
5050
5054
  if (totalItems === 0) {