MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / uninstall

Function uninstall

packages/server/src/svc/launchd.ts:99–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97 }
98
99 async function uninstall(): Promise<LifecycleResult> {
100 const plistPath = deps.plistPath();
101 const installed = existsSync(plistPath);
102 if (!installed) {
103 deleteInstallPlan();
104 return { ok: true, message: 'LaunchAgent was not installed; nothing to remove.' };
105 }
106 const bootout = await deps.execLaunchctl([
107 'bootout',
108 `${deps.guiDomain()}/${KIMI_SERVER_LABEL}`,
109 ]);
110
111 void bootout;
112 try {
113 rmSync(plistPath, { force: true });
114 } catch (error) {
115 throw new Error(
116 `failed to remove plist ${plistPath}: ${error instanceof Error ? error.message : String(error)}`,
117 );
118 }
119 deleteInstallPlan();
120 return { ok: true, message: `LaunchAgent removed (${plistPath}).` };
121 }
122
123 async function start(): Promise<LifecycleResult> {
124 const plistPath = deps.plistPath();

Callers

nothing calls this directly

Calls 4

deleteInstallPlanFunction · 0.90
plistPathMethod · 0.80
execLaunchctlMethod · 0.80
guiDomainMethod · 0.80

Tested by

no test coverage detected