principles-disciple 1.64.0 → 1.65.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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/sync-plugin.mjs +10 -7
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/scripts/sync-plugin.mjs
CHANGED
|
@@ -733,18 +733,21 @@ function restartGatewayWindows() {
|
|
|
733
733
|
const logPath = join(getTempDir(), 'openclaw-auto-restart.log');
|
|
734
734
|
|
|
735
735
|
try {
|
|
736
|
-
// Kill existing gateway processes first
|
|
736
|
+
// Kill existing gateway processes first — taskkill fails across Windows sessions,
|
|
737
|
+
// use WMIC which can terminate processes regardless of session boundary.
|
|
737
738
|
console.log(' Stopping existing gateway processes...');
|
|
738
739
|
try {
|
|
739
|
-
const
|
|
740
|
-
const pids = execSync(`powershell -NoProfile -Command "${
|
|
740
|
+
const findPids = `Get-NetTCPConnection -LocalPort 18789 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty OwningProcess -Unique`;
|
|
741
|
+
const pids = execSync(`powershell -NoProfile -Command "${findPids}"`, { encoding: 'utf-8' }).trim();
|
|
741
742
|
if (pids) {
|
|
742
|
-
const pidList = pids.split('\n').filter(p => p.trim());
|
|
743
|
+
const pidList = pids.split('\n').filter(p => p.trim() && p !== '0');
|
|
743
744
|
for (const pid of pidList) {
|
|
744
|
-
|
|
745
|
+
const pidTrim = pid.trim();
|
|
746
|
+
try {
|
|
747
|
+
execSync(`wmic process where "ProcessId=${pidTrim}" call terminate`, { stdio: 'ignore' });
|
|
748
|
+
} catch { /* ignore individual failures */ }
|
|
745
749
|
}
|
|
746
|
-
|
|
747
|
-
execSync('timeout /t 2 /nobreak > nul', { shell: true, stdio: 'ignore' });
|
|
750
|
+
execSync('timeout /t 3 /nobreak > nul', { shell: true, stdio: 'ignore' });
|
|
748
751
|
}
|
|
749
752
|
} catch { /* no existing processes */ }
|
|
750
753
|
|