import type { Writable } from "node:stream"; import type { GatewayServiceRestartResult } from "../../daemon/service-types.js"; import type { GatewayServiceStartRepairIssue, GatewayServiceState } from "../../daemon/service.js"; import type { GatewayService } from "../../daemon/service.js"; import { type GatewayRestartIntent } from "../../infra/restart.js"; type DaemonLifecycleOptions = { json?: boolean; force?: boolean; wait?: string; restartIntent?: GatewayRestartIntent; }; type RestartPostCheckContext = { json: boolean; stdout: Writable; warnings: string[]; fail: (message: string, hints?: string[]) => void; }; type ServiceRecoveryResult = { result: "started" | "stopped" | "restarted"; message?: string; warnings?: string[]; loaded?: boolean; }; type ServiceRecoveryContext = { json: boolean; stdout: Writable; fail: (message: string, hints?: string[]) => void; }; type ServiceStartRepairContext = ServiceRecoveryContext & { state: GatewayServiceState; issues: GatewayServiceStartRepairIssue[]; }; export declare function runServiceUninstall(params: { serviceNoun: string; service: GatewayService; opts?: DaemonLifecycleOptions; stopBeforeUninstall: boolean; assertNotLoadedAfterUninstall: boolean; }): Promise; export declare function runServiceStart(params: { serviceNoun: string; service: GatewayService; renderStartHints: () => string[]; opts?: DaemonLifecycleOptions; onNotLoaded?: (ctx: ServiceRecoveryContext) => Promise; repairLoadedService?: (ctx: ServiceStartRepairContext) => Promise; }): Promise; export declare function runServiceStop(params: { serviceNoun: string; service: GatewayService; opts?: DaemonLifecycleOptions; onNotLoaded?: (ctx: ServiceRecoveryContext) => Promise; }): Promise; export declare function runServiceRestart(params: { serviceNoun: string; service: GatewayService; renderStartHints: () => string[]; opts?: DaemonLifecycleOptions; checkTokenDrift?: boolean; postRestartCheck?: (ctx: RestartPostCheckContext) => Promise; onNotLoaded?: (ctx: ServiceRecoveryContext) => Promise; }): Promise; export {};