superpowers-mcp 6.2.2 → 6.2.4
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.ja.md +33 -2
- package/README.ko.md +33 -2
- package/README.md +28 -2
- package/README.zh-TW.md +28 -3
- package/out/server.js +17 -17
- package/package.json +6 -3
- package/skills/brainstorming/scripts/helper.js +8 -15
- package/skills/brainstorming/scripts/server.cjs +600 -142
- package/skills/brainstorming/scripts/start-server.ps1 +99 -9
- package/skills/brainstorming/scripts/start-server.sh +104 -15
- package/skills/brainstorming/scripts/stop-server.ps1 +33 -2
- package/skills/brainstorming/scripts/stop-server.sh +36 -4
- package/skills/brainstorming/visual-companion.md +19 -22
package/README.ja.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/Poseidoncode/superpowers-mcp)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
このドキュメントは、オリジナルの Superpowers スキルライブラリを独立した MCP Toolpack にパッケージ化するための情報と使用手順をまとめたものです。
|
|
@@ -128,7 +128,38 @@
|
|
|
128
128
|
|
|
129
129
|
## 🆕 最近の更新
|
|
130
130
|
|
|
131
|
-
### v6.2.
|
|
131
|
+
### v6.2.4(最新)
|
|
132
|
+
|
|
133
|
+
- **上流に合わせた brainstorm セッションの永続化**:`--project-dir` 指定時、companion はセッションキーを `.superpowers/brainstorm/.last-token`(オーナーのみ読み取り可、.gitignore 済み)に保存し、`.last-port` と並んで再起動後も再利用します——開いたままのブラウザタブは再起動後も接続を維持し、URL の再共有は不要です。一時 `/tmp` セッションでは従来どおり起動ごとにキーをローテーションします。明示的な `BRAINSTORM_TOKEN` 環境変数は常に優先され、ファイルには書き込まれません。強制的にローテーションするには、サーバー停止後に `.last-token` を削除してください。
|
|
134
|
+
- **トークンファイル読み取り経路の強化**(`readPrivateFile`):シンボリックリンクや複数リンクの `.last-token` は拒否され、セッションキーとして採用されなくなります。読み取りは `O_NOFOLLOW` 付き fd 経由で行い、identity を再検証し 0600 に締め付けます——既に強化済みの書き込み経路との非対称性を解消しました(独立したセキュリティレビューで発見)。
|
|
135
|
+
- **診断性**:トークンファイルの書き込み失敗時に `Failed to write private token file:` をログ出力し、起動ごとのローテーションへの静かな縮退を防ぎます。
|
|
136
|
+
- **start-server.ps1 の環境衛生**:`--project-dir` なしの一時起動で、呼び出し元 pwsh セッションに残ったプロジェクトキー/ポートを継承しなくなります。
|
|
137
|
+
- **テスト**:companion スイートは 31 アサーションに——再起動をまたぐキー永続化、事前シード済みファイルの尊重、シンボリックリンクされたトークンファイルの拒否、トークンファイルなしでのローテーション維持。テスト後処理は障害安全(try/finally)。PowerShell スイートは `.last-token` が提供キーと一致することを検証します。
|
|
138
|
+
|
|
139
|
+
### v6.2.3(最新)
|
|
140
|
+
|
|
141
|
+
- **Brainstorm Visual Companion の強化(`server.cjs`)**:ローカル loopback 限定の HTTP+WebSocket サーバーがファイルシステムのレースに耐性を持つようになりました(content ディレクトリの削除や画面ファイルの読み取り中の消失は待機ページ / 404 へフォールバック)。watcher はディレクトリの削除・再作成後に自己修復します(Linux inotify + macOS FSEvents)。WebSocket ハンドシェイクは RFC 6455 に基づき検証され、制御フレームは 125 バイト、idle/partial-frame に期限を設定し、接続上限時は最古の接続を破棄します。nonce CSP、起動ごとのキー更新、画面・スキル・イベントのサイズ上限、private state ファイルを適用しました。
|
|
142
|
+
- **`/files/` の二重 `writeHead` クラッシュ修正**(subagent レビューで発見):ヘッダー送信の前にファイルを読み取り、`O_NOFOLLOW` + fd ベースの `fstat` + サイズ上限で check-then-read の TOCTOU を閉鎖。
|
|
143
|
+
- **プロセスライフサイクルの安全性**:`start-server.sh/.ps1` はシグナル送信前に PID が本当にこのセッションの brainstorm サーバーであることを検証(server-instance-id + cmdline チェック、stop-server と同一);`stop-server.sh` は一時セッション削除前にパスを正規化し、`/tmp/../` による一時ルート外への脱出を防止;相対 `--project-dir` は事前に絶対パスへ解決;`server-instance-id` は BOM なしで書き込み、Windows PowerShell 5.1 でもシェル間の ID チェックが機能。
|
|
144
|
+
- **SkillsManager の強化**:POSIX では `O_NOFOLLOW` でスキルファイルを読み取り(シンボリックリンク置換の TOCTOU を閉鎖);再スキャン失敗時は最後の正常キャッシュを返し、空リストで汚染しない;連続ドットを含むスキル名(例 `a..b`)も検索可能に — ルックアップは Map のみでファイルシステムには触れません。
|
|
145
|
+
- **MCP プロトコルの改善**:リソース URI の不正なパーセントエンコーディングは `InvalidRequest` (-32600) を返し、内部エラーを漏らしません。
|
|
146
|
+
- **依存関係**:検証済みの exact override により `hono` 4.13.0、`@hono/node-server` 2.0.11、`fast-uri` 4.1.2 を固定(関連する勧告を解決)。`npm audit`:**0 脆弱性**。
|
|
147
|
+
- **テストスイート**:`npm test` はビルド後に JavaScript のエッジケース/セキュリティ、MCP フロー、companion 回帰スイートを実行します。63 アサーションの PowerShell スイートは `tests/powershell/run-tests.sh` で別途実行し、`pwsh` がない場合はスキップします。
|
|
148
|
+
- **独立レビュー**:セキュリティと正確性の指摘に対し、起動ごとの認証ローテーション、loopback 限定 HTTP、nonce CSP、上限付き読み取り、private state 書き込み、決定的なクロスプラットフォームテストで対応しました。
|
|
149
|
+
|
|
150
|
+
### v6.2.2
|
|
151
|
+
|
|
152
|
+
- **シンボリックリンクトラバーサル防止**:`SkillsManager.readSkillContent()` は `fs.realpath` でパスを正規化してから境界を確認するようになり、シンボリックリンクを利用した任意ファイル読み取りを防止します。`getSafeSkillsPath` も危険なシステムディレクトリのプレフィックスをブロックします。
|
|
153
|
+
- **互換性とプロトコル**:frontmatter とスキルコンテンツで UTF-8 BOM をサポートし、空白や特殊文字を含む resource URI に RFC 3986 準拠のエンコード/デコードを適用します。
|
|
154
|
+
- **正確性とテスト**:強制リロード時にコンテンツキャッシュを無効化し、並行リロードのロックを安全にしました。複数行 YAML の説明ではタブとスペースのインデントを受け付け、`tests/edge_cases_test.js` でこれらのセキュリティとキャッシュ動作を検証します。
|
|
155
|
+
|
|
156
|
+
### v6.2.1
|
|
157
|
+
|
|
158
|
+
- **PowerShell スクリプトテストスイート**:`sdd-workspace.ps1`、`task-brief.ps1`、`review-package.ps1`、`find-polluter.ps1`、brainstorm の `start-server.ps1`/`stop-server.ps1` のライフサイクルを対象とする 63 アサーションの 5 スイートを `tests/powershell/` に追加。`tests/powershell/run-tests.sh` で実行でき、`pwsh` がない場合はスキップします。
|
|
159
|
+
- **`stop-server.ps1` のクロスプラットフォーム修正**:`Get-CimInstance Win32_Process` は Windows 専用のため、Unix では `ps` を使って server-id を正しく確認するようにしました。
|
|
160
|
+
- **クリーンアップ**:上流ですでに削除され、ローカルでも参照されていなかった孤立した `skills/using-superpowers/references/copilot-tools.md` を削除しました。
|
|
161
|
+
|
|
162
|
+
### v6.2.0
|
|
132
163
|
- **上流 obra/superpowers v6.2.0 との同期**:ローカルのセキュリティ強化と PowerShell ヘルパーを保持したまま、全スキルに上流の改善を同期しました。
|
|
133
164
|
- **subagent-driven-development 再構築**:プラン単位のワークスペース(`.superpowers/sdd/<plan>/`)を採用し、並行プラン間で成果物の読み書きが干渉しない構造になりました。再開可能な review-fix ループに 5 ラウンドのサーキットブレーカーを内蔵し、修正後の再レビュー専用の `re-review-prompt.md` を追加。
|
|
134
165
|
- **test-driven-development**:`testing-anti-patterns.md` が上流の `writing-good-tests.md` に置き換わりました。
|
package/README.ko.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/Poseidoncode/superpowers-mcp)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
이 문서는 원본 Superpowers 스킬 라이브러리를 독립적인 MCP Toolpack으로 패키징하기 위한 정보와 사용 지침을 요약한 것입니다.
|
|
@@ -128,7 +128,38 @@
|
|
|
128
128
|
|
|
129
129
|
## 🆕 최근 업데이트
|
|
130
130
|
|
|
131
|
-
### v6.2.
|
|
131
|
+
### v6.2.4 (최신)
|
|
132
|
+
|
|
133
|
+
- **업스트림 정렬 — brainstorm 세션 영속화**: `--project-dir` 사용 시 companion이 세션 키를 `.superpowers/brainstorm/.last-token`(소유자 전용, .gitignore 적용)에 저장하고 `.last-port`와 함께 재시작 후에도 재사용합니다 — 이미 열린 브라우저 탭은 재시작 후에도 연결이 유지되며 URL을 다시 공유할 필요가 없습니다. 임시 `/tmp` 세션은 기존처럼 호출마다 키를 교체하며, 명시적 `BRAINSTORM_TOKEN` 환경 변수는 항상 우선하고 파일에 기록되지 않습니다. 강제 교체를 원하면 서버 중지 후 `.last-token`을 삭제하세요.
|
|
134
|
+
- **토큰 파일 읽기 경로 강화** (`readPrivateFile`): 심볼릭 링크 또는 다중 링크 `.last-token`은 거부되어 세션 키로 채택되지 않습니다. 읽기는 `O_NOFOLLOW` fd를 통해 수행되고 identity를 재검증하며 0600으로 강화됩니다 — 이미 강화된 쓰기 경로와의 비대칭을 해소했습니다(독립 보안 리뷰에서 발견).
|
|
135
|
+
- **진단 가능성**: 토큰 파일 쓰기 실패 시 `Failed to write private token file:`을 로그로 남겨 조용한 키 교체로의 퇴화를 방지합니다.
|
|
136
|
+
- **start-server.ps1 환경 위생**: `--project-dir` 없는 임시 실행에서 호출한 pwsh 세션의 잔여 프로젝트 키/포트를 상속하지 않습니다.
|
|
137
|
+
- **테스트**: companion 스위트가 31개 assertion으로 — 재시작 간 키 영속화, 사전 시드 파일 준수, 심볼릭 링크 토큰 파일 거부, 토큰 파일 없이도 키 교체 유지. 테스트 정리는 실패 안전(try/finally). PowerShell 스위트는 `.last-token`이 제공된 키와 일치함을 검증합니다.
|
|
138
|
+
|
|
139
|
+
### v6.2.3 (최신)
|
|
140
|
+
|
|
141
|
+
- **Brainstorm Visual Companion 강화 (`server.cjs`)**:로컬 loopback 전용 HTTP+WebSocket 서버가 파일시스템 레이스에 안전하게 대응합니다(content 디렉터리 삭제 또는 화면 파일 소실 시 대기 페이지 / 404로 폴백)。watcher는 디렉터리 삭제·재생성 후 자가 치유됩니다(Linux inotify + macOS FSEvents)。WebSocket 핸드셰이크는 RFC 6455로 검증하고, 제어 프레임은 125바이트, idle/partial-frame deadline을 적용하며, 상한 도달 시 가장 오래된 연결을 제거합니다. nonce CSP, 시작별 키 로테이션, 화면·스킬·이벤트 크기 제한, private state 파일을 적용했습니다.
|
|
142
|
+
- **`/files/` 이중 `writeHead` 크래시 수정**(subagent 리뷰에서 발견):헤더 전송 전에 파일을 읽고, `O_NOFOLLOW` + fd 기반 `fstat` + 크기 상한으로 check-then-read TOCTOU 차단.
|
|
143
|
+
- **프로세스 수명주기 안전**:`start-server.sh/.ps1`은 시그널 전에 PID가 실제로 이 세션의 brainstorm 서버인지 검증(server-instance-id + cmdline 확인, stop-server와 동일);`stop-server.sh`는 임시 세션 삭제 전 경로를 정규화하여 `/tmp/../` 트릭으로 임시 루트를 벗어날 수 없음;상대 `--project-dir`는 사전에 절대 경로로 변환;`server-instance-id`는 BOM 없이 기록되어 Windows PowerShell 5.1에서도 셸 간 ID 확인이 동작.
|
|
144
|
+
- **SkillsManager 강화**:POSIX에서 `O_NOFOLLOW`로 스킬 파일 읽기(심링크 교체 TOCTOU 차단);재스캔 실패 시 마지막 양호 캐시 반환(빈 목록으로 오염되지 않음);연속 점이 포함된 스킬 이름(예: `a..b`)도 검색 가능 — 조회는 Map 전용이며 파일시스템에 닿지 않음.
|
|
145
|
+
- **MCP 프로토콜 개선**:리소스 URI의 잘못된 퍼센트 인코딩은 `InvalidRequest` (-32600)를 반환하며 내부 오류를 노출하지 않음.
|
|
146
|
+
- **의존성**:검증된 exact override로 `hono` 4.13.0、`@hono/node-server` 2.0.11、`fast-uri` 4.1.2를 고정(관련 권고 해결)。`npm audit`:**0 취약점**.
|
|
147
|
+
- **테스트 스위트**:`npm test`는 빌드 후 JavaScript 엣지/보안, MCP 플로우, companion 회귀 스위트를 실행합니다. 63개 assertion PowerShell 스위트는 `tests/powershell/run-tests.sh`로 별도 실행하며 `pwsh`가 없으면 건너뜁니다.
|
|
148
|
+
- **독립 리뷰**:시작별 인증 키 로테이션, loopback 전용 HTTP, nonce CSP, bounded read, private state 쓰기, 결정적 크로스플랫폼 테스트로 보안·정확성 지적을 모두 반영했습니다.
|
|
149
|
+
|
|
150
|
+
### v6.2.2
|
|
151
|
+
|
|
152
|
+
- **심볼릭 링크 트래버설 방지**: `SkillsManager.readSkillContent()`가 `fs.realpath`로 경로를 정규화한 뒤 경계를 확인하여 심볼릭 링크를 통한 임의 파일 읽기를 방지합니다. `getSafeSkillsPath`도 위험한 시스템 디렉터리 접두사를 차단합니다.
|
|
153
|
+
- **호환성 및 프로토콜**: frontmatter와 스킬 콘텐츠의 UTF-8 BOM을 지원하고, 공백이나 특수 문자가 포함된 resource URI에 RFC 3986 인코딩/디코딩을 적용합니다.
|
|
154
|
+
- **정확성 및 테스트**: 강제 reload 시 콘텐츠 캐시를 무효화하고 동시 reload 잠금을 안전하게 했습니다. 여러 줄 YAML 설명에서 탭과 공백 들여쓰기를 모두 허용하며, `tests/edge_cases_test.js`가 이러한 보안 및 캐시 동작을 검증합니다.
|
|
155
|
+
|
|
156
|
+
### v6.2.1
|
|
157
|
+
|
|
158
|
+
- **PowerShell 스크립트 테스트 스위트**: `sdd-workspace.ps1`, `task-brief.ps1`, `review-package.ps1`, `find-polluter.ps1`, brainstorm `start-server.ps1`/`stop-server.ps1` 수명주기를 대상으로 63개 assertion의 5개 스위트를 `tests/powershell/`에 추가했습니다. `tests/powershell/run-tests.sh`로 실행하며 `pwsh`가 없으면 자동으로 건너뜁니다.
|
|
159
|
+
- **`stop-server.ps1` 크로스 플랫폼 수정**: `Get-CimInstance Win32_Process`는 Windows 전용이므로 Unix에서는 `ps`를 사용해 server-id를 올바르게 확인합니다.
|
|
160
|
+
- **정리**: 업스트림에서 이미 제거되었고 로컬에서도 참조되지 않던 고아 `skills/using-superpowers/references/copilot-tools.md`를 제거했습니다.
|
|
161
|
+
|
|
162
|
+
### v6.2.0
|
|
132
163
|
- **업스트림 obra/superpowers v6.2.0 동기화**: 로컬 보안 강화와 PowerShell 헬퍼를 유지하면서 모든 스킬에 업스트림 개선 사항을 동기화했습니다.
|
|
133
164
|
- **subagent-driven-development 재구성**: 플랜 단위 워크스페이스(`.superpowers/sdd/<plan>/`)를 도입하여 동시에 실행되는 플랜 간 산출물이 서로를 읽거나 덮어쓰지 않도록 구조적으로 방지합니다. 재개 가능한 review-fix 루프에 5회 서킷 브레이커를 내장하고, 수정 후 재검토 전용 `re-review-prompt.md`를 추가했습니다.
|
|
134
165
|
- **test-driven-development**: `testing-anti-patterns.md`가 업스트림의 `writing-good-tests.md`로 대체되었습니다.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/Poseidoncode/superpowers-mcp)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
This document summarizes the information and usage instructions for packaging the original Superpowers skills library into an independent MCP Toolpack.
|
|
@@ -128,7 +128,33 @@ These skills are designed for orchestrating complex meta-execution patterns with
|
|
|
128
128
|
|
|
129
129
|
## 🆕 Recent Updates
|
|
130
130
|
|
|
131
|
-
### v6.2.
|
|
131
|
+
### v6.2.4 (Latest)
|
|
132
|
+
|
|
133
|
+
- **Upstream alignment — persistent brainstorm sessions**: with `--project-dir`, the companion now persists its session key to `.superpowers/brainstorm/.last-token` (owner-only, gitignored) alongside `.last-port` and reuses it across restarts — an already-open browser tab stays connected after a restart, no URL re-sharing needed. Ephemeral `/tmp` sessions keep rotating the key per invocation, and an explicit `BRAINSTORM_TOKEN` env var still wins and is never persisted. Delete `.last-token` (server stopped) to force a fresh key.
|
|
134
|
+
- **Token-file read path hardened** (`readPrivateFile`): symlinked or multi-link `.last-token` files are rejected instead of being adopted as the session key, with the read performed through an `O_NOFOLLOW` fd whose identity is re-checked and tightened to 0600 — closing the asymmetry with the already-hardened write path (found by independent security review).
|
|
135
|
+
- **Diagnosability**: a failed token-file write now logs `Failed to write private token file:` instead of silently degrading to per-start key rotation.
|
|
136
|
+
- **start-server.ps1 env hygiene**: an ephemeral (no `--project-dir`) launch no longer inherits a stale project key/port from the invoking pwsh session.
|
|
137
|
+
- **Tests**: companion suite now 31 assertions — token persistence across restarts, pre-seeded file honored, symlinked token file rejected, rotation preserved without a token file; test cleanup is failure-safe (try/finally). PowerShell suite asserts `.last-token` matches the served key.
|
|
138
|
+
|
|
139
|
+
### v6.2.3
|
|
140
|
+
|
|
141
|
+
- **Hardened Brainstorming Visual Companion (`server.cjs`)**: the local loopback-only HTTP+WebSocket server is crash-resistant against filesystem races (a deleted content dir or a screen vanishing mid-read degrades to the waiting page / 404 instead of killing the process), and its watcher self-heals after the content dir is deleted and recreated (Linux inotify + macOS FSEvents). WebSocket handshakes are validated against RFC 6455 (version/upgrade/connection/key), control-frame payloads are capped at 125 bytes, clients have idle/partial-frame deadlines, and the oldest connection is evicted when the cap is full. Security headers now include `nosniff` and a nonce CSP; generated keys rotate per invocation; screen, skill, event, and user-event reads/logs are size-capped and state files are private.
|
|
142
|
+
- **Companion security defaults**: the server only binds to loopback HTTP, rotates its key on every invocation, stores browser authentication only in an HttpOnly/SameSite cookie after the initial URL, and blocks unnonce'd scripts in screen HTML. Remote browsers must use an authenticated SSH tunnel; a restart requires sharing the new `server-info` URL.
|
|
143
|
+
- **`/files/` double-`writeHead` crash fixed** (found by subagent review): files are read *before* headers are sent, and reads use `O_NOFOLLOW` + fd-based `fstat` + size cap, closing the check-then-read TOCTOU.
|
|
144
|
+
- **Process-lifecycle safety**: `start-server.sh/.ps1` now prove a PID is a live brainstorm server of this session (server-instance-id + cmdline check, same as stop-server) before signalling it; `stop-server.sh` resolves paths canonically before deleting temp sessions so `/tmp/../` tricks can't escape the temp root; relative `--project-dir` is resolved up front; `server-instance-id` is written without BOM so cross-shell identity checks work on Windows PowerShell 5.1.
|
|
145
|
+
- **SkillsManager hardening**: skill reads use `O_NOFOLLOW` on POSIX (symlink-swap TOCTOU); a failed rescan returns the last-good cache instead of poisoning it; skill names containing consecutive dots (e.g. `a..b`) are now findable — lookups are map-only and never touch the filesystem.
|
|
146
|
+
- **MCP protocol polish**: malformed percent-encoding in resource URIs now returns `InvalidRequest` (-32600) instead of leaking an internal error.
|
|
147
|
+
- **Dependencies**: exact verified overrides pin `hono` to 4.13.0, `@hono/node-server` to 2.0.11, and `fast-uri` to 4.1.2 (resolving the relevant advisories). `npm audit`: **0 vulnerabilities**.
|
|
148
|
+
- **Test suite**: `npm test` builds first and runs the JavaScript edge-case/security, MCP server flow, and companion-server regression suites. The 63-assertion PowerShell suite runs separately with `tests/powershell/run-tests.sh` and skips gracefully when `pwsh` is unavailable.
|
|
149
|
+
- **Independent review**: the security and correctness findings were addressed with per-invocation auth rotation, loopback-only HTTP, nonce CSP, bounded reads, private state writes, and deterministic cross-platform tests.
|
|
150
|
+
|
|
151
|
+
### v6.2.2
|
|
152
|
+
|
|
153
|
+
- **Symlink Traversal Prevention**: `SkillsManager.readSkillContent()` now canonicalizes paths with `fs.realpath` before checking boundaries, preventing symlink-based arbitrary file reads; `getSafeSkillsPath` also blocks dangerous system-directory prefixes.
|
|
154
|
+
- **Compatibility & Protocol**: Added UTF-8 BOM support for frontmatter and skill content, and enforced RFC 3986 encoding/decoding for resource URIs containing spaces or special characters.
|
|
155
|
+
- **Correctness & Tests**: Force reloads now invalidate the content cache, concurrent reload locking is safer, multiline YAML descriptions accept tab or space indentation, and `tests/edge_cases_test.js` covers these security and cache behaviors.
|
|
156
|
+
|
|
157
|
+
### v6.2.1
|
|
132
158
|
|
|
133
159
|
- **PowerShell Script Test Suite**: Added `tests/powershell/` with 63 assertions across 5 suites for `sdd-workspace.ps1`, `task-brief.ps1`, `review-package.ps1`, `find-polluter.ps1`, and the brainstorm `start-server.ps1`/`stop-server.ps1` lifecycle. Run with `tests/powershell/run-tests.sh`; it skips gracefully when `pwsh` is unavailable.
|
|
134
160
|
- **stop-server.ps1 Cross-Platform Fix**: `Get-CimInstance Win32_Process` is Windows-only; the script now uses `ps` on Unix so the server-id check works correctly on macOS/Linux.
|
package/README.zh-TW.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [繁體中文](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/Poseidoncode/superpowers-mcp)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
本文檔總結了將原始 Superpowers 技能庫打包成獨立 MCP Toolpack 的相關資訊與使用說明。
|
|
@@ -128,13 +128,38 @@
|
|
|
128
128
|
|
|
129
129
|
## 🆕 最近更新
|
|
130
130
|
|
|
131
|
-
### v6.2.
|
|
131
|
+
### v6.2.4 (最新版)
|
|
132
|
+
|
|
133
|
+
- **對齊上游 — brainstorm 持久化 session**:搭配 `--project-dir` 時,companion 現在會把 session 金鑰持久化到 `.superpowers/brainstorm/.last-token`(僅擁有者可讀、已列入 .gitignore),與 `.last-port` 並存並在重啟後重用——已開啟的瀏覽器分頁在重啟後依然保持連線,無需重新分享 URL。暫存 `/tmp` session 仍維持每次啟動輪換金鑰;明確設定的 `BRAINSTORM_TOKEN` env 依然優先且永不寫入檔案。若要強制輪換,請在停止伺服器後刪除 `.last-token`。
|
|
134
|
+
- **Token 檔讀取路徑加固**(`readPrivateFile`):symlink 或多重連結的 `.last-token` 現在會被拒絕,不再被採納為 session 金鑰;讀取透過 `O_NOFOLLOW` fd 進行,身份複查並收緊為 0600——補上與已加固寫入路徑之間的不對稱(由獨立資安審查發現)。
|
|
135
|
+
- **可診斷性**:token 檔寫入失敗現在會記錄 `Failed to write private token file:`,不再靜默退化為每次啟動輪換金鑰。
|
|
136
|
+
- **start-server.ps1 環境衛生**:無 `--project-dir` 的暫存啟動不再繼承呼叫端 pwsh session 中殘留的專案金鑰/埠號。
|
|
137
|
+
- **測試**:companion 套件現為 31 個斷言——重啟後金鑰持久化、預置檔原樣採用、symlink token 檔被拒絕、無 token 檔時仍輪換;測試清理具失敗安全性(try/finally)。PowerShell 套件斷言 `.last-token` 與伺服器提供之金鑰一致。
|
|
138
|
+
|
|
139
|
+
### v6.2.3 (最新版)
|
|
140
|
+
|
|
141
|
+
- **Brainstorm Visual Companion 強化 (`server.cjs`)**:本機 loopback 限定的 HTTP+WebSocket 伺服器可安全處理檔案系統競態(content 目錄被刪除或畫面檔消失時降級為等待頁 / 404);watcher 在目錄刪除重建後自動自癒(Linux inotify + macOS FSEvents)。WebSocket handshake 依 RFC 6455 驗證,控制訊框上限 125 bytes,並加入 idle/partial-frame deadline,滿額時淘汰最舊連線。套用 nonce CSP、每次啟動輪換金鑰、畫面/技能/事件大小上限與私有 state 檔案。
|
|
142
|
+
- **`/files/` double-`writeHead` 崩潰修復**(subagent review 發現):改為先讀檔再送 headers,並以 `O_NOFOLLOW` + fd 級 `fstat` + 大小上限關閉 check-then-read 的 TOCTOU。
|
|
143
|
+
- **程序生命週期安全**:`start-server.sh/.ps1` 在送出訊號前先驗證 PID 確實是本 session 的 brainstorm server(server-instance-id + cmdline 檢查,與 stop-server 一致);`stop-server.sh` 刪除暫存 session 前先做路徑正規化,`/tmp/../` 手法無法逃出暫存根目錄;相對 `--project-dir` 預先解析為絕對路徑;`server-instance-id` 改以無 BOM 寫入,Windows PowerShell 5.1 跨 shell 身份檢查不再失效。
|
|
144
|
+
- **SkillsManager 強化**:POSIX 上以 `O_NOFOLLOW` 讀取技能檔(關閉 symlink 置換的 TOCTOU);重新掃描失敗時回傳最後良好快取而非污染為空;名稱含連續句點(如 `a..b`)的技能現在可被查詢——查詢純走 Map、永不觸碰檔案系統。
|
|
145
|
+
- **MCP 協定完善**:資源 URI 的畸形百分比跳脫回傳 `InvalidRequest` (-32600),不再洩漏內部錯誤。
|
|
146
|
+
- **依賴**:以已驗證的 exact override 固定 `hono` 4.13.0、`@hono/node-server` 2.0.11、`fast-uri` 4.1.2(解決相關公告)。`npm audit`:**0 漏洞**。
|
|
147
|
+
- **測試套件**:`npm test` 會先建置,再執行 JavaScript 邊界/安全、MCP 流程與 companion 回歸測試。63 個斷言的 PowerShell 套件改由 `tests/powershell/run-tests.sh` 分開執行;沒有 `pwsh` 時會跳過。
|
|
148
|
+
- **獨立審查**:已以每次啟動輪換認證金鑰、僅限 loopback 的 HTTP、nonce CSP、有界讀取、私有 state 寫入與跨平台確定性測試,處理安全與正確性審查發現。
|
|
149
|
+
|
|
150
|
+
### v6.2.2
|
|
151
|
+
|
|
152
|
+
- **Symlink 遍歷防護**:`SkillsManager.readSkillContent()` 現在會先使用 `fs.realpath` 將路徑正規化再檢查邊界,防止透過 symlink 任意讀取檔案;`getSafeSkillsPath` 也會阻擋危險的系統目錄前綴。
|
|
153
|
+
- **相容性與協定**:新增 frontmatter 與技能內容的 UTF-8 BOM 支援,並依 RFC 3986 對包含空格或特殊字元的 resource URI 強制進行編碼與解碼。
|
|
154
|
+
- **正確性與測試**:強制重新載入現在會清除內容快取;併發重新載入的鎖定更安全;多行 YAML 描述同時接受 tab 與空格縮排;新增 `tests/edge_cases_test.js` 覆蓋這些安全性與快取行為。
|
|
155
|
+
|
|
156
|
+
### v6.2.1
|
|
132
157
|
|
|
133
158
|
- **PowerShell 腳本測試套件**:新增 `tests/powershell/`,橫跨 `sdd-workspace.ps1`、`task-brief.ps1`、`review-package.ps1`、`find-polluter.ps1` 與 brainstorm `start-server.ps1`/`stop-server.ps1` 生命週期,共 63 個 assertion。使用 `tests/powershell/run-tests.sh` 執行;未安裝 `pwsh` 時會自動跳過。
|
|
134
159
|
- **`stop-server.ps1` 跨平台修正**:`Get-CimInstance Win32_Process` 僅 Windows 可用,腳本現在在 Unix 上改用 `ps` 以正確檢查 server-id,macOS/Linux 不再出錯。
|
|
135
160
|
- **清理**:移除已無用的 `skills/using-superpowers/references/copilot-tools.md`(上游已在 v6.2.0 中刪除,本地也沒有任何引用)。
|
|
136
161
|
|
|
137
|
-
### v6.2.0
|
|
162
|
+
### v6.2.0
|
|
138
163
|
- **上游同步 obra/superpowers v6.2.0**:同步上游所有技能的改進,同時保留本地的安全性強化與 PowerShell 輔助腳本。
|
|
139
164
|
- **subagent-driven-development 重構**:採用計畫範圍工作區(`.superpowers/sdd/<plan>/`),並行計畫之間的產物再也不會互相讀寫。改為可續接的 review-fix 迴圈,內建五輪熔斷機制,並新增修復後複審專用的 `re-review-prompt.md`。
|
|
140
165
|
- **test-driven-development**:`testing-anti-patterns.md` 由上游的 `writing-good-tests.md` 取代。
|