consortium
Version:
Remote control and session sharing CLI for AI coding agents
70 lines (66 loc) • 2.05 kB
JavaScript
;
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');
const PLIST_LABEL = "com.consortium-cli.daemon";
async function uninstall() {
try {
if (!fs.existsSync(index.PLIST_FILE)) {
persistence.logger.debug("LaunchAgent plist not found. Nothing to uninstall.");
return;
}
try {
const uid = process.getuid?.() ?? parseInt(child_process.execSync("id -u").toString().trim(), 10);
child_process.execSync(`launchctl bootout gui/${uid}/${PLIST_LABEL}`, { stdio: "ignore" });
persistence.logger.debug("LaunchAgent unloaded");
} catch {
persistence.logger.debug("LaunchAgent was not loaded (already stopped)");
}
fs.unlinkSync(index.PLIST_FILE);
persistence.logger.debug(`Removed LaunchAgent plist from ${index.PLIST_FILE}`);
} catch (error) {
persistence.logger.debug("Failed to uninstall LaunchAgent:", error);
throw error;
}
}
exports.uninstall = uninstall;