Lines 1-21javascript
1import { execSync } from 'node:child_process';
2import { chmodSync, existsSync, mkdirSync, promises as fs, writeFileSync } from 'node:fs';
3import { homedir, platform } from 'node:os';
4import { dirname, join } from 'node:path';
5import { resolveExecutablePath } from './executable.js';
6import { logger } from './logger.js';
7const SERVICE_LABEL = 'run.agentteams.runner';
8const TASK_NAME = 'AgentRunner';
10const getLaunchdPlistPath = () => join(homedir(), 'Library', 'LaunchAgents', `${SERVICE_LABEL}.plist`);
11const getSystemdServicePath = () => join(homedir(), '.config', 'systemd', 'user', 'agentrunner.service');
12const getWindowsBatPath = () => join(homedir(), '.agentteams', 'agentrunner-start.bat');
13const getWindowsVbsPath = () => join(homedir(), '.agentteams', 'agentrunner-start.vbs');
14const getWindowsRestartVbsPath = () => join(homedir(), '.agentteams', 'agentrunner-restart.vbs');
15const getWindowsStartupVbsPath = () => join(homedir(), 'AppData', 'Roaming', 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'Startup', 'agentrunner-start.vbs');
16// --- plist (macOS) ---
17export const buildPlistContent = (config) => {
18 const nodePath = resolveExecutablePath('node');
19 const daemonPath = resolveExecutablePath('agentrunner');
20 const currentPath = process.env.PATH ?? '/usr/local/bin:/usr/bin:/bin';
21 const envEntries = [
MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/autostart.jsView on unpkg · L1