import { type DashboardResult } from '../../cli/dashboard-endpoint.js'; import type { DesktopPaths, DesktopRuntimeState } from '../shared/types.js'; import { type BotmuxCommand } from './node-command.js'; import { type Pm2AppSummary } from './runtime-source.js'; export interface RunResult { code: number; stdout: string; stderr: string; signal?: NodeJS.Signals | null; } interface RunCommandOptions { timeoutMs?: number; maxOutputBytes?: number; } type RunCommand = (cmd: BotmuxCommand, options?: RunCommandOptions) => Promise; type DashboardEndpointCaller = (path: '/__cli/current') => Promise; export interface ExternalRuntimeCandidate { kind: 'external'; root: string; cliPath: string; binPath: string; pathEnv?: string; version: string; runtimeSource?: 'global-cli'; } export interface BundledRuntimeCandidate { kind: 'bundled'; root: string; cliPath: string; nodePath: string; version: string; runtimeSource: 'bundled'; } export type RuntimeLaunchTarget = ExternalRuntimeCandidate | BundledRuntimeCandidate; export interface RuntimeServiceDeps { paths: DesktopPaths; appVersion: string; execPath: string; env: NodeJS.ProcessEnv; fs: { existsSync(path: string): boolean; readFileSync(path: string, encoding: BufferEncoding): string; }; run?: RunCommand; dashboardEndpoint?: DashboardEndpointCaller; commandTimeoutMs?: number; externalRuntime?: ExternalRuntimeCandidate | null; discoverExternalRuntime?: () => ExternalRuntimeCandidate | null; bundledRuntime?: BundledRuntimeCandidate; /** Probed user shell PATH for bundled-runtime spawns (see probeShellPathEnv). */ shellPathEnv?: () => string | undefined; pm2Apps?: (runtime: RuntimeLaunchTarget) => Promise; } export declare function createRuntimeService(deps: RuntimeServiceDeps): { getState(): Promise; start(): Promise; stop(): Promise; restart(): Promise; takeover(): Promise; dashboard(): Promise; currentDashboard(): Promise; getDeviceStatus(): Promise; }; export {}; //# sourceMappingURL=runtime-service.d.ts.map