superpowers-mcp 6.0.2 → 6.0.3

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "superpowers-mcp",
3
3
  "displayName": "Superpowers MCP",
4
4
  "description": "Superpowers skills library (TDD, debugging, collaboration workflows) as an MCP server for VSCode and Antigravity",
5
- "version": "6.0.2",
5
+ "version": "6.0.3",
6
6
  "publisher": "superpowers",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -29,6 +29,10 @@
29
29
  "out/server.js",
30
30
  "skills"
31
31
  ],
32
+ "overrides": {
33
+ "@hono/node-server": ">=2.0.5",
34
+ "fast-uri": ">=3.1.4"
35
+ },
32
36
  "scripts": {
33
37
  "build": "node esbuild.js --production",
34
38
  "watch": "node esbuild.js --watch",
@@ -535,9 +535,10 @@ function maybeOpenBrowser() {
535
535
  if (clients.size > 0) return; // the user already opened it
536
536
  const url = companionUrl(); // must carry the key or the gate 403s it
537
537
  const cp = require('child_process');
538
- // Operator-provided launcher: run as given (this env var is trusted operator input).
538
+ // Operator-provided launcher: run via execFile (no shell) so a malicious env var
539
+ // cannot inject commands through shell metacharacters.
539
540
  if (process.env.BRAINSTORM_OPEN_CMD) {
540
- try { cp.exec(process.env.BRAINSTORM_OPEN_CMD + ' ' + JSON.stringify(url), () => {}); } catch (e) { /* best effort */ }
541
+ try { cp.execFile(process.env.BRAINSTORM_OPEN_CMD, [url], () => {}); } catch (e) { /* best effort */ }
541
542
  return;
542
543
  }
543
544
  // Platform launchers: pass the URL as an argv element via execFile (no shell),
@@ -44,6 +44,9 @@ Stop. Don't proceed to Step 2.
44
44
  ```bash
45
45
  GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
46
46
  GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
47
+ # Capture now, while still inside the workspace — Step 5 changes directory
48
+ # before cleanup (Step 6) needs this value
49
+ WORKTREE_PATH=$(git rev-parse --show-toplevel)
47
50
  ```
48
51
 
49
52
  This determines which menu to show and how cleanup works:
@@ -123,6 +126,8 @@ git branch -d <feature-branch>
123
126
  ```bash
124
127
  # Push branch
125
128
  git push -u origin <feature-branch>
129
+ # From a detached HEAD, name the new branch on the remote:
130
+ # git push origin HEAD:refs/heads/<new-branch>
126
131
  ```
127
132
 
128
133
  **Do NOT clean up worktree** — user needs it alive to iterate on PR feedback.
@@ -160,21 +165,17 @@ git branch -D <feature-branch>
160
165
 
161
166
  ### Step 6: Cleanup Workspace
162
167
 
163
- **Only runs for Options 1 and 4.** Options 2 and 3 always preserve the worktree.
164
-
165
- ```bash
166
- GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
167
- GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
168
- WORKTREE_PATH=$(git rev-parse --show-toplevel)
169
- ```
168
+ **Only runs for Options 1 and 4.** Options 2 and 3 always preserve the worktree. Both callers have already changed directory to the
169
+ main repo root — worktree removal must run from outside the worktree —
170
+ and use the `GIT_DIR`/`GIT_COMMON`/`WORKTREE_PATH` values captured in
171
+ Step 2, from before that directory change.
170
172
 
171
173
  **If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
172
174
 
173
- **If worktree path is under `.worktrees/` or `worktrees/`:** Superpowers created this worktree — we own cleanup.
175
+ **If `WORKTREE_PATH` is under `.worktrees/` or `worktrees/`:** Superpowers
176
+ created this worktree — we own cleanup:
174
177
 
175
178
  ```bash
176
- MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
177
- cd "$MAIN_ROOT"
178
179
  git worktree remove "$WORKTREE_PATH"
179
180
  git worktree prune # Self-healing: clean up any stale registrations
180
181
  ```
@@ -18,9 +18,18 @@ echo "🔍 Searching for test that creates: $POLLUTION_CHECK"
18
18
  echo "Test pattern: $TEST_PATTERN"
19
19
  echo ""
20
20
 
21
- # Get list of test files
22
- TEST_FILES=$(find . -path "$TEST_PATTERN" | sort)
23
- TOTAL=$(echo "$TEST_FILES" | wc -l | tr -d ' ')
21
+ # Get list of test files (find . emits ./-prefixed paths, so accept the
22
+ # pattern written with or without a leading ./)
23
+ TEST_PATTERN="${TEST_PATTERN#./}"
24
+ # find -path can't match '**/' against zero directory levels, so a pattern
25
+ # like src/**/*.test.ts would skip src/top.test.ts; also try the pattern
26
+ # with '**/' collapsed to cover files directly under the base directory.
27
+ TEST_FILES=$(find . \( -path "./$TEST_PATTERN" -o -path "./${TEST_PATTERN//\*\*\//}" \) | sort -u)
28
+ if [ -z "$TEST_FILES" ]; then
29
+ TOTAL=0
30
+ else
31
+ TOTAL=$(printf '%s\n' "$TEST_FILES" | wc -l | tr -d ' ')
32
+ fi
24
33
 
25
34
  echo "Found $TOTAL test files"
26
35
  echo ""