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

Function stop

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

Source from the content-addressed store, hash-verified

152 }
153
154 async function stop(): Promise<LifecycleResult> {
155 const target = `${deps.guiDomain()}/${KIMI_SERVER_LABEL}`;
156 const result = await deps.execLaunchctl(['kill', 'SIGTERM', target]);
157 if (result.code !== 0) {
158
159 const bootout = await deps.execLaunchctl(['bootout', target]);
160 if (bootout.code !== 0) {
161 return {
162 ok: false,
163 message: `launchctl kill + bootout both failed: ${detail(result) ?? 'unknown'} / ${detail(bootout) ?? 'unknown'}`,
164 };
165 }
166 }
167 return { ok: true, message: `Kimi server stopped (${KIMI_SERVER_LABEL}).` };
168 }
169
170 async function restart(): Promise<LifecycleResult> {
171 const target = `${deps.guiDomain()}/${KIMI_SERVER_LABEL}`;

Callers

nothing calls this directly

Calls 3

guiDomainMethod · 0.80
execLaunchctlMethod · 0.80
detailFunction · 0.70

Tested by

no test coverage detected