import { t } from '../common'; declare type Id = string; declare type Tx = string; declare type Milliseconds = number; declare type Timestamp = number; declare type RuntimeInstanceId = string; export declare type RuntimeNodeInfo = { processes: RuntimeNodeInfoProcess[]; }; export declare type RuntimeNodeInfoProcess = { info: t.RuntimeNodeProcessInfo; startedAt: Timestamp; }; export declare type RuntimeNodeProcessInfo = { tx: Tx; manifest?: RuntimeNodeProcessManifest; }; export declare type RuntimeNodeProcessManifest = { hash: t.ModuleManifestHash; module: t.ModuleManifestInfo; }; export declare type RuntimeNodeEvents = t.Disposable & { runtime: Id; $: t.Observable; is: { base(input: any): boolean; lifecycle(stage: t.RuntimeRunStage): { ok: boolean; ended: boolean; }; }; info: { req$: t.Observable; res$: t.Observable; get(options?: { timeout?: Milliseconds; }): Promise; }; process: { lifecycle: { $: t.Observable; fire(process: t.RuntimeNodeProcessInfo, stage: t.RuntimeRunStage): void; }; kill: { req$: t.Observable; res$: t.Observable; killed$: t.Observable; fire(process: Tx, options?: { timeout?: Milliseconds; }): Promise; }; }; }; export declare type RuntimeNodeEvent = RuntimeNodeInfoReqEvent | RuntimeNodeInfoResEvent | RuntimeNodeProcessLifecycleEvent | RuntimeNodeKillReqEvent | RuntimeNodeKillResEvent | RuntimeNodeKilledEvent; export declare type RuntimeNodeInfoReqEvent = { type: 'cell.runtime.node/info:req'; payload: RuntimeNodeInfoReq; }; export declare type RuntimeNodeInfoReq = { tx?: Tx; runtime: RuntimeInstanceId; }; export declare type RuntimeNodeInfoResEvent = { type: 'cell.runtime.node/info:res'; payload: RuntimeNodeInfoRes; }; export declare type RuntimeNodeInfoRes = { tx: Tx; runtime: RuntimeInstanceId; info?: RuntimeNodeInfo; error?: string; }; export declare type RuntimeNodeProcessLifecycleEvent = { type: 'cell.runtime.node/lifecycle'; payload: RuntimeNodeProcessLifecycle; }; export declare type RuntimeNodeProcessLifecycle = { runtime: RuntimeInstanceId; process: t.RuntimeNodeProcessInfo; stage: t.RuntimeRunStage; }; export declare type RuntimeNodeKillReqEvent = { type: 'cell.runtime.node/kill:req'; payload: RuntimeNodeKillReq; }; export declare type RuntimeNodeKillReq = { tx: Tx; runtime: RuntimeInstanceId; process: Tx; }; export declare type RuntimeNodeKillResEvent = { type: 'cell.runtime.node/kill:res'; payload: RuntimeNodeKillRes; }; export declare type RuntimeNodeKillRes = { tx: Tx; runtime: RuntimeInstanceId; process?: t.RuntimeNodeProcessInfo; elapsed: Milliseconds; error?: string; }; export declare type RuntimeNodeKilledEvent = { type: 'cell.runtime.node/killed'; payload: RuntimeNodeKilled; }; export declare type RuntimeNodeKilled = { tx: Tx; runtime: RuntimeInstanceId; process: t.RuntimeNodeProcessInfo; elapsed: Milliseconds; }; export {};