argsbarg 5.1.13 → 5.1.14

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/CHANGELOG.md CHANGED
@@ -7,11 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [5.1.14] - 2026-07-06
11
+
12
+
10
13
  ## [5.1.13] - 2026-07-06
11
14
 
12
15
  ### Fixed
13
16
 
14
17
  - **`configure --remove-all`** — skill uninstall actions no longer reinstall skills after printing "Removing …".
18
+ - **Interactive `configure`** — choosing `n` on an installed skill now removes the skill directory (same bug as `--remove-all`, different code path).
15
19
 
16
20
  ### Changed
17
21
 
@@ -673,7 +677,8 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
673
677
  - Migrate schemas: rename every `children` property to **`commands`**; move positional definitions to **`CliPositional`** objects on `positionals` and strip `positional` / `argMin` / `argMax` from flag definitions under `options` (flags only carry `name`, `description`, `kind`, and optional `shortName`).
674
678
  - Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
675
679
 
676
- [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v5.1.13...HEAD
680
+ [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v5.1.14...HEAD
681
+ [5.1.14]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.14
677
682
  [5.1.13]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.13
678
683
  [5.1.11]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.11
679
684
  [5.1.10]: https://github.com/bdombro/bun-argsbarg/releases/tag/v5.1.10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argsbarg",
3
- "version": "5.1.13",
3
+ "version": "5.1.14",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "bun": ">=1.3"
@@ -13,6 +13,8 @@ import { detectInstalledArtifacts } from "../install/detect-installed.ts";
13
13
  import { parseInstallOpts } from "../install/opts.ts";
14
14
  import { resolveClaudeDesktopMcpPath, resolveInstallPaths } from "../install/paths.ts";
15
15
  import { buildInstallPlan, buildUpdatePlan } from "../install/plan.ts";
16
+ import { installTargetForKey } from "../install/target-registry.ts";
17
+ import { buildDetectedSnapshot, buildTargetPlanContext } from "../install/target-scope.ts";
16
18
  import { buildUninstallPlan } from "../install/uninstall.ts";
17
19
  import type { CliProgram } from "../types.ts";
18
20
 
@@ -153,6 +155,29 @@ describe("remove plan", () => {
153
155
  expect(result.exitCode).toBe(0);
154
156
  expect(existsSync(paths.cursorSkillDir)).toBe(false);
155
157
  });
158
+
159
+ test("scoped skill uninstall action removes directory without global uninstall flag", () => {
160
+ const skillApp: CliProgram = {
161
+ ...fixture,
162
+ configure: { agentIntegration: "skill" },
163
+ };
164
+ const paths = resolveInstallPaths(skillApp);
165
+ mkdirSync(paths.cursorSkillDir, { recursive: true });
166
+ writeFileSync(join(paths.cursorSkillDir, "SKILL.md"), "# test\n", "utf8");
167
+
168
+ const detected = buildDetectedSnapshot(skillApp, paths);
169
+ const ctx = buildTargetPlanContext(skillApp, paths, {}, detected);
170
+ const target = installTargetForKey("cursorSkill");
171
+ expect(target).toBeDefined();
172
+ const actions = target!.planUninstall({
173
+ ...ctx,
174
+ mode: "uninstall-scoped",
175
+ include: (key) => key === "cursorSkill",
176
+ });
177
+ expect(actions).toHaveLength(1);
178
+ expect(actions[0]!.run().length).toBeGreaterThan(0);
179
+ expect(existsSync(paths.cursorSkillDir)).toBe(false);
180
+ });
156
181
  });
157
182
 
158
183
  /** Tests for app config wizard. */
@@ -121,7 +121,10 @@ function executePlan(
121
121
  if ("kind" in action && action.kind) {
122
122
  const skillTarget = skillTargetFromActionKind(action.kind);
123
123
  if (skillTarget) {
124
- if (opts.uninstall) {
124
+ const runResult = action.run();
125
+ if (runResult.length > 0) {
126
+ changed.push(...runResult);
127
+ } else if (opts.uninstall) {
125
128
  const skillDir = skillDirFromUninstallSummary(action.summary, paths);
126
129
  if (skillDir) {
127
130
  changed.push(...uninstallSkillDir(skillDir, !!opts.dry));
@@ -228,7 +231,7 @@ async function runInteractiveConfigure(root: CliProgram, opts: ConfigureOpts): P
228
231
  runTargetPreflight(root, paths, mutationOpts, installActions);
229
232
  }
230
233
 
231
- changed.push(...executePlan(root, actions, mutationOpts, true));
234
+ changed.push(...executePlan(root, actions, { ...mutationOpts, uninstall: choice === "uninstall" }, true));
232
235
  }
233
236
 
234
237
  return changed;
@@ -12,6 +12,7 @@ import type {
12
12
  TargetPlanContext,
13
13
  UninstallAction,
14
14
  } from "./target-types.ts";
15
+ import { uninstallSkillDir } from "./uninstall.ts";
15
16
 
16
17
  export interface SkillHostSpec {
17
18
  key: CliInstallArtifactKey;
@@ -97,7 +98,7 @@ export class SkillInstallTarget extends InstallTarget {
97
98
  kind: this.actionKind,
98
99
  summary: `${this.uninstallPrefix}: ${displayInstallPath(dir)}/`,
99
100
  message: `Removing ${this.spec.label} skill ${displayInstallPath(dir)}/`,
100
- run: () => [],
101
+ run: () => uninstallSkillDir(dir, ctx.dry),
101
102
  },
102
103
  ];
103
104
  }