@maintainer-pro/ai-bridge 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/daemon.mjs +12 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainer-pro/ai-bridge",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Local bridge daemon that pairs a machine to Maintainer Pro and configures multiple client sandboxes.",
5
5
  "keywords": [
6
6
  "maintainer-pro",
package/src/daemon.mjs CHANGED
@@ -1100,6 +1100,7 @@ function runLauncher(command, args, extra = {}) {
1100
1100
  child = spawn(command, args, {
1101
1101
  stdio: ["ignore", "pipe", "pipe"],
1102
1102
  windowsHide: extra.windowsHide,
1103
+ windowsVerbatimArguments: Boolean(extra.windowsVerbatimArguments),
1103
1104
  });
1104
1105
  } catch (err) {
1105
1106
  done({
@@ -1163,15 +1164,17 @@ async function openInNewTerminal(opts) {
1163
1164
 
1164
1165
  try {
1165
1166
  if (process.platform === "win32") {
1166
- const inner = `cd /d "${folder}" && ${envWin ? `${envWin}&& ` : ""}title ${title}&& ${command}`;
1167
- const opened = await runLauncher(process.env.ComSpec || "cmd.exe", [
1168
- "/c",
1169
- "start",
1170
- title,
1171
- "cmd.exe",
1172
- "/k",
1173
- inner,
1174
- ]);
1167
+ const safeTitle =
1168
+ String(title || "Maintainer Pro").replace(/["&<>|^]/g, " ").trim() ||
1169
+ "Maintainer Pro";
1170
+ const body = [envWin, `title ${safeTitle}`, command]
1171
+ .filter(Boolean)
1172
+ .join("&& ");
1173
+ const opened = await runLauncher(
1174
+ process.env.ComSpec || "cmd.exe",
1175
+ ["/d", "/s", "/c", `start "${safeTitle}" /D "${folder}" cmd.exe /k ${body}`],
1176
+ { windowsVerbatimArguments: true }
1177
+ );
1175
1178
  if (!opened.ok) {
1176
1179
  return { ok: false, error: friendlyLaunchError(opened.error, title) };
1177
1180
  }