superpowers-mcp 6.2.2 → 6.2.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.2.2",
5
+ "version": "6.2.3",
6
6
  "publisher": "superpowers",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -30,12 +30,15 @@
30
30
  "skills"
31
31
  ],
32
32
  "overrides": {
33
- "@hono/node-server": ">=2.0.5",
34
- "fast-uri": ">=3.1.4"
33
+ "@hono/node-server": "2.0.11",
34
+ "fast-uri": "4.1.2",
35
+ "hono": "4.13.0"
35
36
  },
36
37
  "scripts": {
37
38
  "build": "node esbuild.js --production",
38
39
  "watch": "node esbuild.js --watch",
40
+ "pretest": "npm run build",
41
+ "test": "node tests/edge_cases_test.js && node tests/run_test.js && node tests/brainstorm_server_test.js",
39
42
  "prepublishOnly": "npm run build"
40
43
  },
41
44
  "devDependencies": {
@@ -21,25 +21,13 @@
21
21
  let everConnected = false;
22
22
  let tombstoneShown = false;
23
23
 
24
- function sessionKey() {
25
- try {
26
- return window.sessionStorage && window.sessionStorage.getItem('brainstorm-session-key');
27
- } catch (e) {}
28
- return null;
29
- }
30
-
31
24
  function websocketUrl() {
32
- const key = sessionKey();
33
- return 'ws://' + window.location.host + (key ? '/?key=' + encodeURIComponent(key) : '');
25
+ const scheme = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
26
+ return scheme + window.location.host + '/';
34
27
  }
35
28
 
36
29
  function reloadAfterRecovery() {
37
- const key = sessionKey();
38
- if (key) {
39
- window.location.replace('/?key=' + encodeURIComponent(key));
40
- } else {
41
- window.location.reload();
42
- }
30
+ window.location.replace('/');
43
31
  }
44
32
 
45
33
  // Reflect connection state in the frame's status pill (absent on full-doc screens).
@@ -130,14 +118,19 @@
130
118
  ws.send(JSON.stringify(event));
131
119
  } else {
132
120
  eventQueue.push(event);
121
+ // Bound the queue so a long disconnect can't grow memory without limit;
122
+ // dropping the oldest events is fine — they're user clicks, not state.
123
+ if (eventQueue.length > 200) eventQueue.shift();
133
124
  }
134
125
  }
135
126
 
136
127
  // Capture clicks on choice elements
137
128
  document.addEventListener('click', (e) => {
129
+ if (!(e.target instanceof Element)) return;
138
130
  const target = e.target.closest('[data-choice]');
139
131
  if (!target) return;
140
132
 
133
+ if (typeof window.toggleSelect === 'function') window.toggleSelect(target);
141
134
  sendEvent({
142
135
  type: 'click',
143
136
  text: target.textContent.trim(),