@remcp/remcp 0.2.211 → 0.2.212
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 +1 -1
- package/src/cli/connect.mjs +5 -4
- package/src/cli/service.mjs +11 -0
package/package.json
CHANGED
package/src/cli/connect.mjs
CHANGED
|
@@ -9,13 +9,14 @@ import { officialOrigin } from './env.mjs';
|
|
|
9
9
|
import { sleep } from './shell.mjs';
|
|
10
10
|
import { printPairingQr } from './pairing-qr.mjs';
|
|
11
11
|
|
|
12
|
-
// Keep the server-provided approval URL as
|
|
13
|
-
//
|
|
14
|
-
//
|
|
12
|
+
// Keep the server-provided approval URL as one argument all the way to the OS.
|
|
13
|
+
// Windows Explorer can treat a URL as a shell path and open Documents instead.
|
|
14
|
+
// FileProtocolHandler dispatches to the default browser without a cmd/PowerShell shell,
|
|
15
|
+
// where a URL query containing '&' could otherwise be interpreted as a command.
|
|
15
16
|
export function browserLaunchCommand(url, platform = process.platform) {
|
|
16
17
|
const target = String(url);
|
|
17
18
|
if (platform === 'darwin') return { command: 'open', args: [target] };
|
|
18
|
-
if (platform === 'win32') return { command: '
|
|
19
|
+
if (platform === 'win32') return { command: 'rundll32.exe', args: ['url.dll,FileProtocolHandler', target] };
|
|
19
20
|
return { command: 'xdg-open', args: [target] };
|
|
20
21
|
}
|
|
21
22
|
|
package/src/cli/service.mjs
CHANGED
|
@@ -147,6 +147,17 @@ export function installWindowsService(cliPath = globalCliPath(), { nodePath = pr
|
|
|
147
147
|
installWindowsUserStartup(cliPath, nodePath);
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
|
+
// Task Scheduler runs an /IT .cmd inside a *visible* terminal window.
|
|
151
|
+
// For fresh installations prefer our existing hidden WSH + Node supervisor.
|
|
152
|
+
// Keep already-registered scheduled tasks intact until an explicit migration;
|
|
153
|
+
// never start two supervisors for the same machine.
|
|
154
|
+
const previousTask = spawnSync('schtasks.exe', ['/Query', '/TN', windowsTaskName],
|
|
155
|
+
{ stdio:'ignore', windowsHide:true, timeout:10000 });
|
|
156
|
+
if (previousTask.status !== 0) {
|
|
157
|
+
requireWindowsScheduledTaskAbsent();
|
|
158
|
+
installWindowsUserStartup(cliPath, nodePath);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
150
161
|
const launcherFile = writeWindowsServiceLauncher(cliPath, nodePath);
|
|
151
162
|
const command = `"${launcherFile}"`;
|
|
152
163
|
// Current-user interactive tasks need /IT. /RL LIMITED avoids requiring elevation.
|