import type { MainContext, MainDefinition, OpenRequestEvent, QuitReason, SecondInstanceEvent } from '../main/index.js'; /** Raw `diagnostics` config, passed through from `murasaki.config.ts` (dev) or resolved bundle metadata (prod). */ export interface MainRuntimeDiagnosticsOptions { /** Capture uncaught exceptions/rejections as local crash reports. Default true. */ crashReports?: boolean; /** Newest crash reports retained. Default 20, clamped 1-100. */ keepReports?: number; } export interface MainRuntimeOptions { appId: string; productName: string; version?: string; /** murasaki's own version, for crash report `frameworkVersion`. Defaults to '0.0.0'. */ frameworkVersion?: string; projectRoot: string; resourcesPath?: string; isPackaged: boolean; shutdownTimeoutMs?: number; /** Internal/test override; normal apps use platform-standard locations. */ paths?: MainContext['paths']; diagnostics?: MainRuntimeDiagnosticsOptions; /** * Primary cold-start argv + cwd from the native launcher. Omitted in dev, * where it resolves to empty argv and the project root as cwd. */ launch?: { argv?: readonly string[]; cwd?: string; }; } export interface ShutdownOptions { reason: QuitReason; force?: boolean; } export interface ShutdownResult { cancelled: boolean; timedOut: boolean; } type RuntimeState = 'idle' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed'; export declare class MainRuntime { #private; private readonly options; constructor(options: MainRuntimeOptions); get state(): RuntimeState; get context(): MainContext | null; start(load: () => Promise): Promise; shutdown(options: ShutdownOptions): Promise; secondInstance(event: SecondInstanceEvent): Promise; openRequested(event: OpenRequestEvent): Promise; } export declare function unwrapMainDefinition(loaded: unknown): MainDefinition; export declare function resolveAppPaths(appId: string): MainContext['paths']; export {}; //# sourceMappingURL=main-runtime.d.ts.map