import type { EngineIdentity } from "./local-api/engine-server.js"; import { type LocalIpcEndpoint } from "./platform/ipc.js"; import { type EngineProcessState } from "./process-state.js"; export interface RunningEngine { state: EngineProcessState; identity: EngineIdentity; } export interface LaunchEngineOptions { niubotHome: string; engineEntry: string; runtimePath: string; logFile: string; version: string; nodePath?: string; runtimeMode?: string; env?: NodeJS.ProcessEnv; beforeLaunch?: () => void; } export interface LaunchedEngine { state: EngineProcessState; endpoint: LocalIpcEndpoint; } export interface StopEngineOptions { /** Keep the caller alive when it is a Windows descendant of the Engine. */ preserveDescendants?: boolean; } export declare function inspectRunningEngine(niubotHome: string): Promise; export declare function launchDetachedEngine(options: LaunchEngineOptions): LaunchedEngine; export declare function stopEngine(niubotHome: string, options?: StopEngineOptions): Promise<{ stopped: boolean; pid?: number; }>; export declare function verifyLegacyEngineProcess(pid: number, niubotHome: string): string;