@cannbot-ai/install-helper 1.1.6-beta.12 → 1.1.6-beta.13

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 CHANGED
@@ -125,13 +125,45 @@ install-helper uninstall --all --tool opencode --level project # 指定范围
125
125
 
126
126
  根据安装记录精确删除所有产物,自动清理空目录。
127
127
 
128
- 交互式卸载:已安装项全部预勾选(✓=保留),取消勾选后确认即可批量卸载。
128
+ **交互式卸载**:
129
+
130
+ ```bash
131
+ install-helper uninstall
132
+ ```
133
+
134
+ - 自动检测已安装内容,跳过只有单一选项的步骤(如仅一个工具/级别有内容时自动选中)
135
+ - 若 Skills 和 Plugins 都已安装,先选择卸载类型
136
+ - ≤15 个已安装 Skill 时显示扁平列表,>15 个时按类别导航
137
+ - **勾选=卸载**(标准 checkbox 语义),勾选后确认即可批量卸载
138
+ - 支持跨类别累积选择
139
+
140
+ **`--all` 一键卸载**:
141
+
142
+ ```bash
143
+ install-helper uninstall --all --yes
144
+ ```
145
+
146
+ 卸载指定范围内全部已安装的 Skills 和 Plugins。通过 `--tool` / `--level` 限定范围,未指定时默认 project 级别。
147
+
148
+ **`--recent` 批次卸载**:
149
+
150
+ ```bash
151
+ install-helper uninstall --recent --yes
152
+ ```
153
+
154
+ 仅卸载最近一次安装批次中的 Skills。每次 `install-helper install` 会自动记录安装批次,`--recent` 精确卸载最后一批,不影响更早安装的内容。
155
+
156
+ **安全机制**:
157
+
158
+ - 仅删除 `install-helper` 安装的 symlink,不影响用户手动创建的目录或文件
159
+ - 无安装记录时自动回退到文件系统扫描(识别 symlink)和 manifest 文件,确保残留内容可清理
160
+ - Plugin 卸载时完整清理 skills、agents、配置文件(AGENTS.md/CLAUDE.md)、manifest、外部仓库链接
129
161
 
130
162
  **选项:**
131
163
 
132
164
  | 选项 | 说明 |
133
165
  |------|------|
134
- | `--tool <tool>` | 指定 AI 工具 |
166
+ | `--tool <tool>` | 指定 AI 工具(opencode, claude, trae, cursor, copilot, codearts) |
135
167
  | `--level <level>` | 安装级别(project, global),默认 project |
136
168
  | `--yes` `-y` | 跳过确认提示 |
137
169
  | `--all` `-a` | 卸载全部已安装 Skills 和 Plugins |
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) {