/******************************************************************************** * Copyright (c) 2026 CrossBreeze, EclipseSource and others. * * This program and the accompanying materials are made available under the * terms of the MIT License which is available in the project root. * * SPDX-License-Identifier: MIT ********************************************************************************/ import { type DumpHostStateArgs, type HostDiagnosticsProtocol, type WriteHostHeapSnapshotArgs } from '@hydranium/protocol'; import { ContainerModule } from '@theia/core/shared/inversify'; /** What the host grants {@link HostDiagnosticsServer} beyond memory figures. */ export interface HostDiagnosticsOptions { /** Allow heap snapshots of the backend, which hold every client's data. Off by default. */ readonly heapSnapshots?: boolean; /** A directory the host owns for snapshots. Omitted creates a private temporary one on first use. A client's directory is ignored. */ readonly directory?: string; } /** The injection token for {@link HostDiagnosticsOptions}. */ export declare const HostDiagnosticsOptions: unique symbol; /** * Host-process diagnostics, computed IN the Theia backend process this service * runs in (the parent / host, distinct from the data-server child that holds the * model store). Its memory figures are universal — `process.memoryUsage()` * always works — so the framework wires it by default. Heap snapshots wait for * {@link HostDiagnosticsOptions.heapSnapshots}. Each result is also written to the backend's * stdout so it reaches the pod log (`kubectl logs`), not only the RPC caller. */ export declare class HostDiagnosticsServer implements HostDiagnosticsProtocol { protected outputDirectory: string | undefined; protected readonly options: HostDiagnosticsOptions; dumpHostState(args: DumpHostStateArgs): Promise; writeHostHeapSnapshot(args: WriteHostHeapSnapshotArgs): Promise; protected directory(): string; } /** * Theia backend module that exposes {@link HostDiagnosticsServer} as an ordinary * in-process RPC service at {@link HOST_DIAGNOSTICS_PATH} (not the socket- * forwarded data-server transport). The frontend reaches it with * `bindHostDiagnostics` (see `../browser`). Adopters * `export default createHostDiagnosticsBackendModule()` from a backend-module * entry point, passing `{ heapSnapshots: true }` only where every client may * inspect the backend process. */ export declare function createHostDiagnosticsBackendModule(options?: HostDiagnosticsOptions): ContainerModule; //# sourceMappingURL=host-diagnostics-server.d.ts.map