triflux 9.5.0 → 9.5.1
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/.claude-plugin/plugin.json +1 -1
- package/bin/triflux.mjs +33 -4
- package/package.json +1 -1
- package/scripts/setup.mjs +21 -0
package/bin/triflux.mjs
CHANGED
|
@@ -727,6 +727,20 @@ function cmdSetup(options = {}) {
|
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
|
|
730
|
+
// ── psmux 기본 셸 자동 수정 (cmd.exe → PowerShell) ──
|
|
731
|
+
if (process.platform === "win32" && which("psmux")) {
|
|
732
|
+
try {
|
|
733
|
+
const shellOut = execSync("psmux show-options -g default-shell 2>NUL", { encoding: "utf8", timeout: 3000 }).trim();
|
|
734
|
+
if (!/powershell|pwsh/i.test(shellOut)) {
|
|
735
|
+
const pwsh = which("pwsh") ? "pwsh" : (which("powershell.exe") ? "powershell.exe" : "");
|
|
736
|
+
if (pwsh) {
|
|
737
|
+
execSync(`psmux set-option -g default-shell "${pwsh}"`, { timeout: 3000, stdio: "pipe" });
|
|
738
|
+
ok(`psmux 기본 셸 → ${pwsh}`);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
} catch { /* psmux 서버 미실행 — 무시 */ }
|
|
742
|
+
}
|
|
743
|
+
|
|
730
744
|
// ── 결과 추적 ──
|
|
731
745
|
const summary = [];
|
|
732
746
|
|
|
@@ -1210,10 +1224,25 @@ async function cmdDoctor(options = {}) {
|
|
|
1210
1224
|
ok("기본 셸: PowerShell");
|
|
1211
1225
|
addDoctorCheck(report, { name: "psmux", status: "ok", path: psmuxPath, shell: "powershell" });
|
|
1212
1226
|
} else {
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1227
|
+
if (fix) {
|
|
1228
|
+
// --fix: PowerShell로 자동 변경
|
|
1229
|
+
const pwshBin = which("pwsh") ? "pwsh" : "powershell.exe";
|
|
1230
|
+
try {
|
|
1231
|
+
execSync(`psmux set-option -g default-shell "${pwshBin}"`, { timeout: 3000, stdio: "pipe" });
|
|
1232
|
+
ok(`기본 셸 → ${pwshBin} 으로 변경 완료`);
|
|
1233
|
+
addDoctorCheck(report, { name: "psmux", status: "ok", path: psmuxPath, shell: pwshBin, fixed: true });
|
|
1234
|
+
report.actions.push("psmux default-shell → " + pwshBin);
|
|
1235
|
+
} catch (e) {
|
|
1236
|
+
fail(`기본 셸 변경 실패: ${e.message}`);
|
|
1237
|
+
addDoctorCheck(report, { name: "psmux", status: "issues", path: psmuxPath, shell: "cmd", fix: `psmux set-option -g default-shell "${pwshBin}"` });
|
|
1238
|
+
issues++;
|
|
1239
|
+
}
|
|
1240
|
+
} else {
|
|
1241
|
+
warn("기본 셸이 cmd.exe — headless 명령 실패 가능");
|
|
1242
|
+
info(`수정: tfx doctor --fix 또는 psmux set-option -g default-shell "powershell.exe"`);
|
|
1243
|
+
addDoctorCheck(report, { name: "psmux", status: "issues", path: psmuxPath, shell: "cmd", fix: "tfx doctor --fix" });
|
|
1244
|
+
issues++;
|
|
1245
|
+
}
|
|
1217
1246
|
}
|
|
1218
1247
|
} else {
|
|
1219
1248
|
info(`미설치 ${GRAY}(선택 — 멀티모델 병렬 실행에 필요)${RESET}`);
|
package/package.json
CHANGED
package/scripts/setup.mjs
CHANGED
|
@@ -854,6 +854,27 @@ if (process.platform === "win32") {
|
|
|
854
854
|
psmuxInstalled = true;
|
|
855
855
|
}
|
|
856
856
|
|
|
857
|
+
// ── psmux 기본 셸 자동 수정 (cmd.exe → PowerShell) ──
|
|
858
|
+
if (psmuxInstalled && process.platform === "win32") {
|
|
859
|
+
try {
|
|
860
|
+
const shellOut = execFileSync("psmux", ["show-options", "-g", "default-shell"], { encoding: "utf8", timeout: 3000, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
861
|
+
if (!/powershell|pwsh/i.test(shellOut)) {
|
|
862
|
+
// pwsh(7) 우선, powershell.exe(5) fallback
|
|
863
|
+
let pwsh = "";
|
|
864
|
+
try { execFileSync("where", ["pwsh"], { stdio: "ignore" }); pwsh = "pwsh"; } catch {
|
|
865
|
+
try { execFileSync("where", ["powershell.exe"], { stdio: "ignore" }); pwsh = "powershell.exe"; } catch {}
|
|
866
|
+
}
|
|
867
|
+
if (pwsh) {
|
|
868
|
+
execFileSync("psmux", ["set-option", "-g", "default-shell", pwsh], { timeout: 3000, stdio: "ignore" });
|
|
869
|
+
console.log(` \x1b[32m✓\x1b[0m psmux 기본 셸 → ${pwsh}`);
|
|
870
|
+
synced++;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
} catch {
|
|
874
|
+
// psmux show-options 미지원 또는 서버 미실행 — 무시
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
857
878
|
// ── stale 스킬 정리 (패키지에서 제거된 tfx-* 스킬 삭제) ──
|
|
858
879
|
{
|
|
859
880
|
const skillsDst = join(CLAUDE_DIR, "skills");
|