relay-companion 0.1.556 → 0.1.558

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.
@@ -447,8 +447,16 @@ async function restoreMissingPill(target, {
447
447
  // Stock Windows tasks normally delegate to a hidden launcher. Follow only
448
448
  // that exact managed file, never an arbitrary path supplied by task text.
449
449
  const launcher = path.join(homeDir, ".relay", "relay-companion-pill.vbs");
450
+ const launcherTargetsCurrent = () => {
451
+ const bytes = fs.readFileSync(launcher);
452
+ // install.js writes the stock WScript launcher as UTF-16LE with a BOM
453
+ // so non-ASCII account paths survive the Windows ANSI code page.
454
+ const text = bytes[0] === 0xff && bytes[1] === 0xfe
455
+ ? bytes.subarray(2).toString("utf16le") : bytes.toString("utf8");
456
+ return normalize(text).includes(script);
457
+ };
450
458
  const targetsCurrent = xml.includes(script) || (xml.includes(normalize(launcher))
451
- && normalize(fs.readFileSync(launcher, "utf8")).includes(script));
459
+ && launcherTargetsCurrent());
452
460
  if (!targetsCurrent || !/<MultipleInstancesPolicy>IgnoreNew<\/MultipleInstancesPolicy>/i.test(task.stdout)) return defer("service-target-unverified");
453
461
  command = "schtasks.exe"; args = ["/Run", "/TN", WINDOWS_PILL_TASK];
454
462
  } else if (platform === "linux") {
@@ -7,7 +7,8 @@ const nodeContract = require("./node-contract.cjs");
7
7
  // Registration restoration is part of the controller's canonical transaction.
8
8
  // The UI may bootstrap the controller, but never constructs daemon/pill jobs.
9
9
  async function repairServiceRegistrations({ homeDir = os.homedir(), platform = process.platform,
10
- run = (file, args) => spawnSync(file, args, { encoding: "utf8", windowsHide: true, timeout: 10_000 }),
10
+ spawn = spawnSync,
11
+ run = (file, args, options = {}) => spawn(file, args, { encoding: "utf8", windowsHide: true, timeout: 10_000, ...options }),
11
12
  validate = require("./recovery-local.cjs").validateLocalRuntime,
12
13
  execute = (...args) => require("./recovery-runner.cjs").execute(...args),
13
14
  own = require("./lifecycle-ownership.cjs").lifecycleOwnership,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relay-companion",
3
- "version": "0.1.556",
3
+ "version": "0.1.558",
4
4
  "description": "Install Relay for Claude Code, Cowork, and Codex, then sign in from the Relay pill.",
5
5
  "homepage": "https://sendrelays.com/get-started",
6
6
  "repository": {