UNPKG

consortium

Version:

Remote control and session sharing CLI for AI coding agents

78 lines (74 loc) 2.29 kB
'use strict'; var fs = require('fs'); var child_process = require('child_process'); var persistence = require('./types-B_i6lpTn.cjs'); var index = require('./index-BMIckAk5.cjs'); require('axios'); require('chalk'); require('node:fs'); require('node:os'); require('node:path'); require('node:events'); require('socket.io-client'); require('zod'); require('node:crypto'); require('tweetnacl'); require('util'); require('fs/promises'); require('crypto'); require('path'); require('url'); require('os'); require('node:child_process'); require('node:fs/promises'); require('node:module'); require('node:util'); require('expo-server-sdk'); require('node:readline'); require('ink'); require('react'); require('node:url'); require('ps-list'); require('cross-spawn'); require('tmp'); require('qrcode-terminal'); require('open'); require('fastify'); require('fastify-type-provider-zod'); require('http'); require('@modelcontextprotocol/sdk/client/index.js'); require('@modelcontextprotocol/sdk/client/streamableHttp.js'); require('readline'); require('@modelcontextprotocol/sdk/server/mcp.js'); require('node:http'); require('@modelcontextprotocol/sdk/server/streamableHttp.js'); async function uninstall() { try { if (!fs.existsSync(index.SERVICE_FILE)) { persistence.logger.debug("systemd user service not found. Nothing to uninstall."); return; } try { child_process.execSync(`systemctl --user stop ${index.SERVICE_NAME}.service`, { stdio: "ignore" }); persistence.logger.debug("systemd user service stopped"); } catch { persistence.logger.debug("Service was not running"); } try { child_process.execSync(`systemctl --user disable ${index.SERVICE_NAME}.service`, { stdio: "ignore" }); persistence.logger.debug("systemd user service disabled"); } catch { persistence.logger.debug("Service was not enabled"); } fs.unlinkSync(index.SERVICE_FILE); persistence.logger.debug(`Removed systemd user service from ${index.SERVICE_FILE}`); try { child_process.execSync("systemctl --user daemon-reload", { stdio: "ignore" }); } catch { } } catch (error) { persistence.logger.debug("Failed to uninstall systemd user service:", error); throw error; } } exports.uninstall = uninstall;