@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remcp/remcp",
3
- "version": "0.2.211",
3
+ "version": "0.2.212",
4
4
  "description": "ReMCP device client: pair a computer with ReMCP and run the outbound-only agent that hosts the local MCP runtime.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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 data all the way to the OS. In particular, do not route it
13
- // through `cmd /c start` on Windows: cmd reparses metacharacters such as `&`, so a custom pairing
14
- // server could otherwise turn a verification URL into a local shell command.
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: 'explorer.exe', args: [target] };
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
 
@@ -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.