consortium
Version:
Remote control and session sharing CLI for AI coding agents
68 lines (65 loc) • 1.86 kB
JavaScript
import { existsSync, unlinkSync } from 'fs';
import { execSync } from 'child_process';
import { l as logger } from './types-DETLaopx.mjs';
import { P as PLIST_FILE } from './index-DiNLHtkZ.mjs';
import 'axios';
import 'chalk';
import 'node:fs';
import 'node:os';
import 'node:path';
import 'node:events';
import 'socket.io-client';
import 'zod';
import 'node:crypto';
import 'tweetnacl';
import 'util';
import 'fs/promises';
import 'crypto';
import 'path';
import 'url';
import 'os';
import 'node:child_process';
import 'node:fs/promises';
import 'node:module';
import 'node:util';
import 'expo-server-sdk';
import 'node:readline';
import 'ink';
import 'react';
import 'node:url';
import 'ps-list';
import 'cross-spawn';
import 'tmp';
import 'qrcode-terminal';
import 'open';
import 'fastify';
import 'fastify-type-provider-zod';
import 'http';
import '@modelcontextprotocol/sdk/client/index.js';
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
import 'readline';
import '@modelcontextprotocol/sdk/server/mcp.js';
import 'node:http';
import '@modelcontextprotocol/sdk/server/streamableHttp.js';
const PLIST_LABEL = "com.consortium-cli.daemon";
async function uninstall() {
try {
if (!existsSync(PLIST_FILE)) {
logger.debug("LaunchAgent plist not found. Nothing to uninstall.");
return;
}
try {
const uid = process.getuid?.() ?? parseInt(execSync("id -u").toString().trim(), 10);
execSync(`launchctl bootout gui/${uid}/${PLIST_LABEL}`, { stdio: "ignore" });
logger.debug("LaunchAgent unloaded");
} catch {
logger.debug("LaunchAgent was not loaded (already stopped)");
}
unlinkSync(PLIST_FILE);
logger.debug(`Removed LaunchAgent plist from ${PLIST_FILE}`);
} catch (error) {
logger.debug("Failed to uninstall LaunchAgent:", error);
throw error;
}
}
export { uninstall };