@algosuite/vo-mcp 0.2.0-beta.7 → 0.2.0-beta.71

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.
@@ -3,64 +3,110 @@ import { createRequire as __cr } from 'module'; const require = __cr(import.meta
3
3
 
4
4
  // src/autostart.ts
5
5
  import { homedir, platform } from "node:os";
6
- import { join } from "node:path";
6
+ import { isAbsolute, join } from "node:path";
7
7
  import { existsSync, mkdirSync, writeFileSync, readFileSync, unlinkSync, copyFileSync } from "node:fs";
8
+ var WINDOWS_RESTART_BACKOFF_MS = 1e4;
9
+ var WINDOWS_HEALTHY_RUN_MS = 6e4;
10
+ var WINDOWS_MAX_BACKOFF_MS = 3e5;
8
11
  function resolveRunnerCommand(override) {
9
12
  return override ?? "vo-mcp runner";
10
13
  }
14
+ function quotePosixShellArgument(value) {
15
+ if (value.includes("\0") || value.includes("\r") || value.includes("\n")) {
16
+ throw new Error("Runner command must not contain NUL, carriage return, or newline characters.");
17
+ }
18
+ return `'${value.replace(/'/gu, `'"'"'`)}'`;
19
+ }
20
+ function resolveLinuxConfigHome(home, env) {
21
+ const configured = env["XDG_CONFIG_HOME"]?.trim();
22
+ return configured && isAbsolute(configured) ? configured : join(home, ".config");
23
+ }
24
+ function launcherIsCurrent(path, desiredContent, label, log) {
25
+ if (!existsSync(path)) return false;
26
+ if (readFileSync(path, "utf8") === desiredContent) return true;
27
+ const backupPath = `${path}.backup-${Date.now()}`;
28
+ copyFileSync(path, backupPath);
29
+ log(` Backed up existing ${label} to: ${backupPath}`);
30
+ return false;
31
+ }
11
32
  function installWindowsAutostart(runnerCommand, log, env) {
12
33
  const appData = env["APPDATA"] ?? join(homedir(), "AppData", "Roaming");
13
34
  const startupDir = join(appData, "Microsoft", "Windows", "Start Menu", "Programs", "Startup");
14
35
  mkdirSync(startupDir, { recursive: true });
15
- const launcherPath = join(startupDir, "vo-runner.cmd");
16
- if (existsSync(launcherPath)) {
17
- const existing = readFileSync(launcherPath, "utf8");
18
- if (existing.includes("vo-mcp runner")) {
19
- log(`\u2713 Auto-start is already configured (Windows Startup folder)`);
20
- log(` Path: ${launcherPath}`);
21
- return;
36
+ const launcherPath = join(startupDir, "vo-runner.vbs");
37
+ const legacyCmdPath = join(startupDir, "vo-runner.cmd");
38
+ if (existsSync(legacyCmdPath)) {
39
+ try {
40
+ unlinkSync(legacyCmdPath);
41
+ log(` Removed legacy minimized .cmd launcher: ${legacyCmdPath}`);
42
+ } catch (error) {
43
+ log(`\u26A0 Could not remove legacy launcher ${legacyCmdPath} (${error instanceof Error ? error.message : String(error)}); remove it manually to avoid a double start`);
22
44
  }
23
- const backupPath = `${launcherPath}.backup-${Date.now()}`;
24
- copyFileSync(launcherPath, backupPath);
25
- log(` Backed up existing launcher to: ${backupPath}`);
26
- }
27
- const launcherContent = `@echo off
28
- REM Auto-start launcher for vo-mcp runner
29
- REM Created by vo-mcp autostart installer
30
- start /min cmd /c "${runnerCommand}"
45
+ }
46
+ const runnerConsoleCommand = `cmd /c ${runnerCommand} >> "%USERPROFILE%\\.claude\\vo-runner.log" 2>&1`.replace(/"/g, '""');
47
+ const launcherContent = `' Auto-start launcher for vo-mcp runner
48
+ ' Created by vo-mcp autostart installer
49
+ ' Keepalive supervisor: restarts the runner if it exits (parity with launchd
50
+ ' KeepAlive on macOS and systemd Restart=on-failure on Linux).
51
+ ' Runs the runner in a MINIMIZED (style 7), never a hidden (style 0) window:
52
+ ' hidden script-host exec trips Defender's PowhidSubExec.B heuristic and gets
53
+ ' blocked at logon. To stop: create %USERPROFILE%\\.claude\\vo-runner.stop, or
54
+ ' end wscript.exe.
55
+ Dim sh, fso, stopFile, backoff, startedAt, ranMs
56
+ Set sh = CreateObject("WScript.Shell")
57
+ Set fso = CreateObject("Scripting.FileSystemObject")
58
+ sh.CurrentDirectory = sh.ExpandEnvironmentStrings("%USERPROFILE%")
59
+ sh.Environment("Process")("VO_CODE_RUNNER_CLONES_ROOT") = sh.ExpandEnvironmentStrings("%APPDATA%\\ai.algosuite.vo-runner\\clones")
60
+ stopFile = sh.ExpandEnvironmentStrings("%USERPROFILE%\\.claude\\vo-runner.stop")
61
+ backoff = ${WINDOWS_RESTART_BACKOFF_MS}
62
+ Do
63
+ If fso.FileExists(stopFile) Then
64
+ fso.DeleteFile stopFile
65
+ WScript.Quit 0
66
+ End If
67
+ startedAt = Timer
68
+ sh.Run "${runnerConsoleCommand}", 7, True
69
+ ranMs = (Timer - startedAt) * 1000
70
+ If ranMs < 0 Then ranMs = ${WINDOWS_HEALTHY_RUN_MS}
71
+ If ranMs >= ${WINDOWS_HEALTHY_RUN_MS} Then
72
+ backoff = ${WINDOWS_RESTART_BACKOFF_MS}
73
+ ElseIf backoff < ${WINDOWS_MAX_BACKOFF_MS} Then
74
+ backoff = backoff * 2
75
+ End If
76
+ WScript.Sleep backoff
77
+ Loop
31
78
  `;
79
+ if (launcherIsCurrent(launcherPath, launcherContent, "launcher", log)) {
80
+ log(`\u2713 Auto-start is already configured (Windows Startup folder)`);
81
+ log(` Path: ${launcherPath}`);
82
+ return;
83
+ }
32
84
  writeFileSync(launcherPath, launcherContent, "utf8");
33
85
  log(`\u2713 Installed Windows auto-start launcher`);
34
86
  log(` Path: ${launcherPath}`);
35
- log(` The runner will start minimized at next login.`);
87
+ log(` The runner will start hidden at next login.`);
36
88
  }
37
89
  function uninstallWindowsAutostart(log, env) {
38
90
  const appData = env["APPDATA"] ?? join(homedir(), "AppData", "Roaming");
39
91
  const startupDir = join(appData, "Microsoft", "Windows", "Start Menu", "Programs", "Startup");
40
- const launcherPath = join(startupDir, "vo-runner.cmd");
41
- if (!existsSync(launcherPath)) {
92
+ const launcherPaths = [join(startupDir, "vo-runner.vbs"), join(startupDir, "vo-runner.cmd")];
93
+ let removedAny = false;
94
+ for (const launcherPath of launcherPaths) {
95
+ if (!existsSync(launcherPath)) continue;
96
+ unlinkSync(launcherPath);
97
+ removedAny = true;
98
+ log(`\u2713 Removed Windows auto-start launcher`);
99
+ log(` Path: ${launcherPath}`);
100
+ }
101
+ if (!removedAny) {
42
102
  log(`\u2713 Auto-start launcher not found (already removed)`);
43
- return;
44
103
  }
45
- unlinkSync(launcherPath);
46
- log(`\u2713 Removed Windows auto-start launcher`);
47
- log(` Path: ${launcherPath}`);
48
104
  }
49
- async function installMacAutostart(runnerCommand, log) {
50
- const launchAgentsDir = join(homedir(), "Library", "LaunchAgents");
105
+ async function installMacAutostart(runnerCommand, log, env) {
106
+ const home = env["HOME"]?.trim() || homedir();
107
+ const launchAgentsDir = join(home, "Library", "LaunchAgents");
51
108
  mkdirSync(launchAgentsDir, { recursive: true });
52
109
  const plistPath = join(launchAgentsDir, "ai.algosuite.vo-runner.plist");
53
- if (existsSync(plistPath)) {
54
- const existing = readFileSync(plistPath, "utf8");
55
- if (existing.includes("vo-mcp runner")) {
56
- log(`\u2713 Auto-start is already configured (launchd)`);
57
- log(` Path: ${plistPath}`);
58
- return;
59
- }
60
- const backupPath = `${plistPath}.backup-${Date.now()}`;
61
- copyFileSync(plistPath, backupPath);
62
- log(` Backed up existing plist to: ${backupPath}`);
63
- }
64
110
  const parts = runnerCommand.split(/\s+/);
65
111
  const program = parts[0] ?? "vo-mcp";
66
112
  const args = parts.length > 1 ? parts.slice(1) : ["runner"];
@@ -79,13 +125,25 @@ ${args.map((a) => ` <string>${a}</string>`).join("\n")}
79
125
  <true/>
80
126
  <key>KeepAlive</key>
81
127
  <true/>
128
+ <key>WorkingDirectory</key>
129
+ <string>${home}</string>
130
+ <key>EnvironmentVariables</key>
131
+ <dict>
132
+ <key>VO_CODE_RUNNER_CLONES_ROOT</key>
133
+ <string>${join(home, "Library", "Application Support", "ai.algosuite.vo-runner", "clones")}</string>
134
+ </dict>
82
135
  <key>StandardOutPath</key>
83
- <string>${join(homedir(), ".claude", "vo-runner.log")}</string>
136
+ <string>${join(home, ".claude", "vo-runner.log")}</string>
84
137
  <key>StandardErrorPath</key>
85
- <string>${join(homedir(), ".claude", "vo-runner-error.log")}</string>
138
+ <string>${join(home, ".claude", "vo-runner-error.log")}</string>
86
139
  </dict>
87
140
  </plist>
88
141
  `;
142
+ if (launcherIsCurrent(plistPath, plistContent, "plist", log)) {
143
+ log(`\u2713 Auto-start is already configured (launchd)`);
144
+ log(` Path: ${plistPath}`);
145
+ return;
146
+ }
89
147
  writeFileSync(plistPath, plistContent, "utf8");
90
148
  log(`\u2713 Installed launchd plist`);
91
149
  log(` Path: ${plistPath}`);
@@ -93,14 +151,15 @@ ${args.map((a) => ` <string>${a}</string>`).join("\n")}
93
151
  const { execSync } = await import("node:child_process");
94
152
  execSync(`launchctl load "${plistPath}"`, { stdio: "ignore" });
95
153
  log(`\u2713 Loaded plist with launchctl (runner will start at next login)`);
96
- log(` Logs: ${join(homedir(), ".claude", "vo-runner.log")}`);
154
+ log(` Logs: ${join(home, ".claude", "vo-runner.log")}`);
97
155
  } catch {
98
156
  log(`\u26A0 Failed to load plist with launchctl (you may need to load it manually)`);
99
157
  log(` Run: launchctl load "${plistPath}"`);
100
158
  }
101
159
  }
102
- async function uninstallMacAutostart(log) {
103
- const launchAgentsDir = join(homedir(), "Library", "LaunchAgents");
160
+ async function uninstallMacAutostart(log, env) {
161
+ const home = env["HOME"]?.trim() || homedir();
162
+ const launchAgentsDir = join(home, "Library", "LaunchAgents");
104
163
  const plistPath = join(launchAgentsDir, "ai.algosuite.vo-runner.plist");
105
164
  if (!existsSync(plistPath)) {
106
165
  log(`\u2713 Auto-start plist not found (already removed)`);
@@ -119,31 +178,24 @@ async function uninstallMacAutostart(log) {
119
178
  }
120
179
  async function installLinuxAutostart(runnerCommand, log, env) {
121
180
  const home = env["HOME"]?.trim() || homedir();
122
- const unitDir = join(home, ".config", "systemd", "user");
181
+ const configHome = resolveLinuxConfigHome(home, env);
182
+ const unitDir = join(configHome, "systemd", "user");
123
183
  mkdirSync(unitDir, { recursive: true });
124
184
  const unitPath = join(unitDir, "vo-runner.service");
125
- if (existsSync(unitPath)) {
126
- const existing = readFileSync(unitPath, "utf8");
127
- if (existing.includes(runnerCommand) || existing.includes("vo-mcp runner")) {
128
- log(`\u2713 Auto-start is already configured (systemd user unit)`);
129
- log(` Path: ${unitPath}`);
130
- return;
131
- }
132
- const backupPath = `${unitPath}.backup-${Date.now()}`;
133
- copyFileSync(unitPath, backupPath);
134
- log(` Backed up existing unit to: ${backupPath}`);
135
- }
136
185
  const logFile = join(home, ".claude", "vo-runner.log");
137
186
  const errFile = join(home, ".claude", "vo-runner-error.log");
187
+ const quotedRunnerCommand = quotePosixShellArgument(runnerCommand);
138
188
  mkdirSync(join(home, ".claude"), { recursive: true });
139
189
  const unit = `[Unit]
140
- Description=VO Code Runner (vo-mcp)
190
+ Description=AlgoHQ Code Runner (vo-mcp)
141
191
  After=network-online.target
142
192
  Wants=network-online.target
143
193
 
144
194
  [Service]
145
195
  Type=simple
146
- ExecStart=/bin/sh -lc '${runnerCommand}'
196
+ WorkingDirectory=${home}
197
+ Environment="VO_CODE_RUNNER_CLONES_ROOT=${join(configHome, "ai.algosuite.vo-runner", "clones")}"
198
+ ExecStart=/bin/sh -lc ${quotedRunnerCommand}
147
199
  Restart=on-failure
148
200
  RestartSec=10
149
201
  StandardOutput=append:${logFile}
@@ -152,6 +204,11 @@ StandardError=append:${errFile}
152
204
  [Install]
153
205
  WantedBy=default.target
154
206
  `;
207
+ if (launcherIsCurrent(unitPath, unit, "unit", log)) {
208
+ log(`\u2713 Auto-start is already configured (systemd user unit)`);
209
+ log(` Path: ${unitPath}`);
210
+ return;
211
+ }
155
212
  writeFileSync(unitPath, unit, "utf8");
156
213
  log(`\u2713 Installed systemd user unit`);
157
214
  log(` Path: ${unitPath}`);
@@ -172,7 +229,8 @@ WantedBy=default.target
172
229
  }
173
230
  async function uninstallLinuxAutostart(log, env) {
174
231
  const home = env["HOME"]?.trim() || homedir();
175
- const unitPath = join(home, ".config", "systemd", "user", "vo-runner.service");
232
+ const configHome = resolveLinuxConfigHome(home, env);
233
+ const unitPath = join(configHome, "systemd", "user", "vo-runner.service");
176
234
  if (!existsSync(unitPath)) {
177
235
  log(`\u2713 Auto-start unit not found (already removed)`);
178
236
  return;
@@ -194,11 +252,11 @@ async function installAutostart(opts = {}) {
194
252
  const log = opts.log ?? ((m) => console.error(m));
195
253
  const env = opts.env ?? process.env;
196
254
  const runnerCommand = resolveRunnerCommand(opts.runnerCommand);
197
- const plat = platform();
255
+ const plat = opts.platform ?? platform();
198
256
  if (plat === "win32") {
199
257
  installWindowsAutostart(runnerCommand, log, env);
200
258
  } else if (plat === "darwin") {
201
- await installMacAutostart(runnerCommand, log);
259
+ await installMacAutostart(runnerCommand, log, env);
202
260
  } else if (plat === "linux") {
203
261
  await installLinuxAutostart(runnerCommand, log, env);
204
262
  } else {
@@ -209,11 +267,11 @@ async function installAutostart(opts = {}) {
209
267
  async function uninstallAutostart(opts = {}) {
210
268
  const log = opts.log ?? ((m) => console.error(m));
211
269
  const env = opts.env ?? process.env;
212
- const plat = platform();
270
+ const plat = opts.platform ?? platform();
213
271
  if (plat === "win32") {
214
272
  uninstallWindowsAutostart(log, env);
215
273
  } else if (plat === "darwin") {
216
- await uninstallMacAutostart(log);
274
+ await uninstallMacAutostart(log, env);
217
275
  } else if (plat === "linux") {
218
276
  await uninstallLinuxAutostart(log, env);
219
277
  } else {
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/autostart.ts", "../src/autostart-cli.ts"],
4
- "sourcesContent": ["/**\n * Cross-platform auto-start registration for `vo-mcp runner`.\n *\n * WINDOWS: Uses the user Startup folder, NOT Task Scheduler. Headless\n * `claude -p` (which the runner spawns) HANGS under the Task Scheduler\n * service session \u2014 it only runs from an interactive, Explorer-descended\n * session. The Startup folder launches minimized at user login.\n *\n * MACOS: Uses ~/Library/LaunchAgents (launchd) with RunAtLoad + KeepAlive.\n *\n * LINUX: Uses ~/.config/systemd/user (systemd user unit) with Restart=on-failure;\n * ExecStart runs via a login shell so the npm-global `vo-mcp` resolves on PATH.\n *\n * All operations are idempotent and create backups where applicable.\n */\nimport { homedir, platform } from 'node:os';\nimport { join } from 'node:path';\nimport { existsSync, mkdirSync, writeFileSync, readFileSync, unlinkSync, copyFileSync } from 'node:fs';\n\nexport interface AutostartOptions {\n readonly log?: (msg: string) => void;\n readonly runnerCommand?: string; // Override for tests\n readonly env?: Readonly<Record<string, string | undefined>>;\n}\n\n/**\n * Resolve the path to the vo-mcp runner command. Defaults to 'vo-mcp runner'\n * (assumes it's in PATH). Can be overridden for tests.\n */\nfunction resolveRunnerCommand(override?: string): string {\n return override ?? 'vo-mcp runner';\n}\n\n/**\n * Windows: Install a launcher script in the Startup folder.\n *\n * Creates a .cmd file that starts `vo-mcp runner` minimized. The Startup\n * folder is %APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\.\n */\nfunction installWindowsAutostart(runnerCommand: string, log: (msg: string) => void, env: Readonly<Record<string, string | undefined>>): void {\n const appData = env['APPDATA'] ?? join(homedir(), 'AppData', 'Roaming');\n const startupDir = join(appData, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup');\n mkdirSync(startupDir, { recursive: true });\n\n const launcherPath = join(startupDir, 'vo-runner.cmd');\n\n // Idempotent: if the launcher already exists with our content, skip\n if (existsSync(launcherPath)) {\n const existing = readFileSync(launcherPath, 'utf8');\n if (existing.includes('vo-mcp runner')) {\n log(`\u2713 Auto-start is already configured (Windows Startup folder)`);\n log(` Path: ${launcherPath}`);\n return;\n }\n // Backup if content differs\n const backupPath = `${launcherPath}.backup-${Date.now()}`;\n copyFileSync(launcherPath, backupPath);\n log(` Backed up existing launcher to: ${backupPath}`);\n }\n\n // Write the launcher. Uses `start /min` to launch minimized.\n const launcherContent = `@echo off\nREM Auto-start launcher for vo-mcp runner\nREM Created by vo-mcp autostart installer\nstart /min cmd /c \"${runnerCommand}\"\n`;\n\n writeFileSync(launcherPath, launcherContent, 'utf8');\n log(`\u2713 Installed Windows auto-start launcher`);\n log(` Path: ${launcherPath}`);\n log(` The runner will start minimized at next login.`);\n}\n\n/**\n * Windows: Uninstall the Startup folder launcher.\n */\nfunction uninstallWindowsAutostart(log: (msg: string) => void, env: Readonly<Record<string, string | undefined>>): void {\n const appData = env['APPDATA'] ?? join(homedir(), 'AppData', 'Roaming');\n const startupDir = join(appData, 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup');\n const launcherPath = join(startupDir, 'vo-runner.cmd');\n\n if (!existsSync(launcherPath)) {\n log(`\u2713 Auto-start launcher not found (already removed)`);\n return;\n }\n\n unlinkSync(launcherPath);\n log(`\u2713 Removed Windows auto-start launcher`);\n log(` Path: ${launcherPath}`);\n}\n\n/**\n * macOS: Install a launchd plist in ~/Library/LaunchAgents.\n *\n * The plist runs `vo-mcp runner` at login with RunAtLoad=true and\n * KeepAlive=true (restarts if it crashes).\n */\nasync function installMacAutostart(runnerCommand: string, log: (msg: string) => void): Promise<void> {\n const launchAgentsDir = join(homedir(), 'Library', 'LaunchAgents');\n mkdirSync(launchAgentsDir, { recursive: true });\n\n const plistPath = join(launchAgentsDir, 'ai.algosuite.vo-runner.plist');\n\n // Idempotent: if the plist already exists with our content, skip\n if (existsSync(plistPath)) {\n const existing = readFileSync(plistPath, 'utf8');\n if (existing.includes('vo-mcp runner')) {\n log(`\u2713 Auto-start is already configured (launchd)`);\n log(` Path: ${plistPath}`);\n return;\n }\n // Backup if content differs\n const backupPath = `${plistPath}.backup-${Date.now()}`;\n copyFileSync(plistPath, backupPath);\n log(` Backed up existing plist to: ${backupPath}`);\n }\n\n // Parse the runner command into program + args for launchd\n const parts = runnerCommand.split(/\\s+/);\n const program = parts[0] ?? 'vo-mcp';\n const args = parts.length > 1 ? parts.slice(1) : ['runner'];\n\n const plistContent = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n <key>Label</key>\n <string>ai.algosuite.vo-runner</string>\n <key>ProgramArguments</key>\n <array>\n <string>${program}</string>\n${args.map((a) => ` <string>${a}</string>`).join('\\n')}\n </array>\n <key>RunAtLoad</key>\n <true/>\n <key>KeepAlive</key>\n <true/>\n <key>StandardOutPath</key>\n <string>${join(homedir(), '.claude', 'vo-runner.log')}</string>\n <key>StandardErrorPath</key>\n <string>${join(homedir(), '.claude', 'vo-runner-error.log')}</string>\n</dict>\n</plist>\n`;\n\n writeFileSync(plistPath, plistContent, 'utf8');\n log(`\u2713 Installed launchd plist`);\n log(` Path: ${plistPath}`);\n\n // Load the plist with launchctl\n try {\n const { execSync } = await import('node:child_process');\n execSync(`launchctl load \"${plistPath}\"`, { stdio: 'ignore' });\n log(`\u2713 Loaded plist with launchctl (runner will start at next login)`);\n log(` Logs: ${join(homedir(), '.claude', 'vo-runner.log')}`);\n } catch {\n log(`\u26A0 Failed to load plist with launchctl (you may need to load it manually)`);\n log(` Run: launchctl load \"${plistPath}\"`);\n }\n}\n\n/**\n * macOS: Uninstall the launchd plist.\n */\nasync function uninstallMacAutostart(log: (msg: string) => void): Promise<void> {\n const launchAgentsDir = join(homedir(), 'Library', 'LaunchAgents');\n const plistPath = join(launchAgentsDir, 'ai.algosuite.vo-runner.plist');\n\n if (!existsSync(plistPath)) {\n log(`\u2713 Auto-start plist not found (already removed)`);\n return;\n }\n\n // Unload the plist with launchctl\n try {\n const { execSync } = await import('node:child_process');\n execSync(`launchctl unload \"${plistPath}\"`, { stdio: 'ignore' });\n log(`\u2713 Unloaded plist with launchctl`);\n } catch {\n log(`\u26A0 Failed to unload plist with launchctl (continuing anyway)`);\n }\n\n unlinkSync(plistPath);\n log(`\u2713 Removed launchd plist`);\n log(` Path: ${plistPath}`);\n}\n\n/**\n * Linux: Install a systemd USER unit at ~/.config/systemd/user/vo-runner.service,\n * then enable + start it (`systemctl --user enable --now`). Restart=on-failure\n * mirrors the macOS KeepAlive. ExecStart runs via a login shell so the npm-global\n * `vo-mcp` resolves under systemd's minimal PATH.\n */\nasync function installLinuxAutostart(\n runnerCommand: string,\n log: (msg: string) => void,\n env: Readonly<Record<string, string | undefined>>,\n): Promise<void> {\n const home = env['HOME']?.trim() || homedir();\n const unitDir = join(home, '.config', 'systemd', 'user');\n mkdirSync(unitDir, { recursive: true });\n const unitPath = join(unitDir, 'vo-runner.service');\n\n if (existsSync(unitPath)) {\n const existing = readFileSync(unitPath, 'utf8');\n if (existing.includes(runnerCommand) || existing.includes('vo-mcp runner')) {\n log(`\u2713 Auto-start is already configured (systemd user unit)`);\n log(` Path: ${unitPath}`);\n return;\n }\n const backupPath = `${unitPath}.backup-${Date.now()}`;\n copyFileSync(unitPath, backupPath);\n log(` Backed up existing unit to: ${backupPath}`);\n }\n\n const logFile = join(home, '.claude', 'vo-runner.log');\n const errFile = join(home, '.claude', 'vo-runner-error.log');\n mkdirSync(join(home, '.claude'), { recursive: true });\n\n const unit = `[Unit]\nDescription=VO Code Runner (vo-mcp)\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nType=simple\nExecStart=/bin/sh -lc '${runnerCommand}'\nRestart=on-failure\nRestartSec=10\nStandardOutput=append:${logFile}\nStandardError=append:${errFile}\n\n[Install]\nWantedBy=default.target\n`;\n writeFileSync(unitPath, unit, 'utf8');\n log(`\u2713 Installed systemd user unit`);\n log(` Path: ${unitPath}`);\n\n // In tests, write the unit but NEVER actually enable/start a real service.\n if (process.env['VITEST']) {\n log(` (test mode: skipping systemctl enable)`);\n return;\n }\n try {\n const { execSync } = await import('node:child_process');\n execSync('systemctl --user daemon-reload', { stdio: 'ignore' });\n execSync('systemctl --user enable --now vo-runner.service', { stdio: 'ignore' });\n log(`\u2713 Enabled + started vo-runner.service (starts at login)`);\n log(` Logs: ${logFile}`);\n } catch {\n log(`\u26A0 Could not enable via systemctl (enable it manually):`);\n log(` systemctl --user daemon-reload && systemctl --user enable --now vo-runner.service`);\n }\n}\n\n/**\n * Linux: Uninstall the systemd user unit.\n */\nasync function uninstallLinuxAutostart(\n log: (msg: string) => void,\n env: Readonly<Record<string, string | undefined>>,\n): Promise<void> {\n const home = env['HOME']?.trim() || homedir();\n const unitPath = join(home, '.config', 'systemd', 'user', 'vo-runner.service');\n if (!existsSync(unitPath)) {\n log(`\u2713 Auto-start unit not found (already removed)`);\n return;\n }\n if (!process.env['VITEST']) {\n try {\n const { execSync } = await import('node:child_process');\n execSync('systemctl --user disable --now vo-runner.service', { stdio: 'ignore' });\n log(`\u2713 Disabled + stopped vo-runner.service`);\n } catch {\n log(`\u26A0 Could not disable via systemctl (continuing anyway)`);\n }\n }\n unlinkSync(unitPath);\n log(`\u2713 Removed systemd user unit`);\n log(` Path: ${unitPath}`);\n}\n\n/**\n * Install auto-start for the runner daemon. Cross-platform.\n */\nexport async function installAutostart(opts: AutostartOptions = {}): Promise<void> {\n const log = opts.log ?? ((m: string) => console.error(m));\n const env = opts.env ?? process.env;\n const runnerCommand = resolveRunnerCommand(opts.runnerCommand);\n const plat = platform();\n\n if (plat === 'win32') {\n installWindowsAutostart(runnerCommand, log, env);\n } else if (plat === 'darwin') {\n await installMacAutostart(runnerCommand, log);\n } else if (plat === 'linux') {\n await installLinuxAutostart(runnerCommand, log, env);\n } else {\n log(`\u2717 Auto-start is not supported on platform: ${plat}`);\n log(` Supported platforms: win32 (Windows), darwin (macOS), linux (Linux)`);\n }\n}\n\n/**\n * Uninstall auto-start for the runner daemon. Cross-platform.\n */\nexport async function uninstallAutostart(opts: AutostartOptions = {}): Promise<void> {\n const log = opts.log ?? ((m: string) => console.error(m));\n const env = opts.env ?? process.env;\n const plat = platform();\n\n if (plat === 'win32') {\n uninstallWindowsAutostart(log, env);\n } else if (plat === 'darwin') {\n await uninstallMacAutostart(log);\n } else if (plat === 'linux') {\n await uninstallLinuxAutostart(log, env);\n } else {\n log(`\u2717 Auto-start is not supported on platform: ${plat}`);\n log(` Supported platforms: win32 (Windows), darwin (macOS), linux (Linux)`);\n }\n}\n", "#!/usr/bin/env node\n/**\n * `vo-mcp runner --install-autostart` / `--uninstall-autostart` CLI entrypoints.\n *\n * Registers or unregisters the runner daemon to start automatically at user login.\n */\nimport { installAutostart, uninstallAutostart } from './autostart.js';\n\nexport async function installAutostartCli(): Promise<void> {\n const log = (m: string): void => console.error(m);\n\n log('\u2501\u2501\u2501 vo-mcp runner auto-start installer \u2501\u2501\u2501\\n');\n\n await installAutostart({ log });\n\n log('\\nAuto-start is now configured. The runner will launch automatically at your next login.');\n log('To remove: vo-mcp runner --uninstall-autostart');\n}\n\nexport async function uninstallAutostartCli(): Promise<void> {\n const log = (m: string): void => console.error(m);\n\n log('\u2501\u2501\u2501 vo-mcp runner auto-start uninstaller \u2501\u2501\u2501\\n');\n\n await uninstallAutostart({ log });\n\n log('\\nAuto-start has been removed. The runner will no longer launch automatically.');\n log('To reinstall: vo-mcp runner --install-autostart');\n}\n"],
5
- "mappings": ";;;;AAeA,SAAS,SAAS,gBAAgB;AAClC,SAAS,YAAY;AACrB,SAAS,YAAY,WAAW,eAAe,cAAc,YAAY,oBAAoB;AAY7F,SAAS,qBAAqB,UAA2B;AACvD,SAAO,YAAY;AACrB;AAQA,SAAS,wBAAwB,eAAuB,KAA4B,KAAyD;AAC3I,QAAM,UAAU,IAAI,SAAS,KAAK,KAAK,QAAQ,GAAG,WAAW,SAAS;AACtE,QAAM,aAAa,KAAK,SAAS,aAAa,WAAW,cAAc,YAAY,SAAS;AAC5F,YAAU,YAAY,EAAE,WAAW,KAAK,CAAC;AAEzC,QAAM,eAAe,KAAK,YAAY,eAAe;AAGrD,MAAI,WAAW,YAAY,GAAG;AAC5B,UAAM,WAAW,aAAa,cAAc,MAAM;AAClD,QAAI,SAAS,SAAS,eAAe,GAAG;AACtC,UAAI,kEAA6D;AACjE,UAAI,WAAW,YAAY,EAAE;AAC7B;AAAA,IACF;AAEA,UAAM,aAAa,GAAG,YAAY,WAAW,KAAK,IAAI,CAAC;AACvD,iBAAa,cAAc,UAAU;AACrC,QAAI,qCAAqC,UAAU,EAAE;AAAA,EACvD;AAGA,Q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