@triflux/core 10.74.0 → 10.76.0
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/hub/team/psmux.mjs +9 -2
- package/package.json +1 -1
package/hub/team/psmux.mjs
CHANGED
|
@@ -997,11 +997,18 @@ function killOrphanMcpProcesses(sessionName) {
|
|
|
997
997
|
function detachAttachedClients(sessionName, waitMs = 750) {
|
|
998
998
|
const attachedCount = getPsmuxSessionAttachedCount(sessionName);
|
|
999
999
|
if (!Number.isFinite(attachedCount) || attachedCount <= 0) return false;
|
|
1000
|
+
// -t 는 클라이언트 이름이다. 세션에 붙은 클라이언트 전부를 떼려면 -s 로 세션을 주고,
|
|
1001
|
+
// tmux 의 접두사 매칭이 같은 접두사의 다른 세션을 떼지 않게 정확한 타깃을 쓴다.
|
|
1000
1002
|
try {
|
|
1001
|
-
psmuxExec(["detach-client", "-
|
|
1003
|
+
psmuxExec(["detach-client", "-s", exactSessionTarget(sessionName)], {
|
|
1004
|
+
stdio: "ignore",
|
|
1005
|
+
});
|
|
1002
1006
|
sleepMs(waitMs);
|
|
1003
1007
|
return true;
|
|
1004
|
-
} catch {
|
|
1008
|
+
} catch (error) {
|
|
1009
|
+
process.stderr.write(
|
|
1010
|
+
`[psmux] detach-client 실패 (${sessionName}): ${error?.message || error}\n`,
|
|
1011
|
+
);
|
|
1005
1012
|
return false;
|
|
1006
1013
|
}
|
|
1007
1014
|
}
|