import { type InteractiveSystemTaskKind } from '../interactiveTaskKinds.js';
export interface SystemTaskSshConnectionConfig {
    target: string;
    port?: number;
    auth: 'agent' | 'keyfile';
    identityFile?: string;
    sshConfigFile?: string;
    knownHostsPath?: string;
    trustedHostKey?: string;
}
export interface RelayRuntimeTaskParams {
    target: Readonly<{
        kind: 'local';
    }> | Readonly<{
        kind: 'ssh';
        ssh: SystemTaskSshConnectionConfig;
    }>;
    channel?: 'stable' | 'preview' | 'dev';
    mode?: 'user' | 'system';
    env?: Record<string, string>;
    selfHostRelayBinaryOverride?: string;
}
export interface RelayRuntimeStatusSnapshot {
    installed: boolean;
    version: string | null;
    service: Readonly<{
        active: boolean | null;
        enabled: boolean | null;
    }>;
    baseUrl: string;
    healthy?: boolean | null;
}
type RelayRuntimeStatusResult = Readonly<{
    installed: boolean;
    version: string | null;
    relayUrl: string;
    healthy: boolean;
    service: RelayRuntimeStatusSnapshot['service'];
}>;
export type RelayRuntimeKindDeps = Readonly<{
    readStatus: (params: RelayRuntimeTaskParams) => Promise<RelayRuntimeStatusSnapshot>;
    checkHealth: (params: Readonly<{
        baseUrl: string;
    }>) => Promise<boolean>;
    installOrUpdate: (params: RelayRuntimeTaskParams) => Promise<Readonly<{
        relayUrl: string;
        mode: 'user' | 'system';
    }>>;
    control: (params: RelayRuntimeTaskParams & Readonly<{
        action: 'start' | 'stop' | 'restart';
    }>) => Promise<void>;
}>;
export declare function createRelayRuntimeStatusTaskKind(deps: Pick<RelayRuntimeKindDeps, 'readStatus' | 'checkHealth'>): InteractiveSystemTaskKind<RelayRuntimeStatusResult>;
export declare function createRelayRuntimeInstallOrUpdateTaskKind(deps: Pick<RelayRuntimeKindDeps, 'installOrUpdate'>): InteractiveSystemTaskKind<Readonly<{
    relayUrl: string;
    mode: 'user' | 'system';
}>>;
export declare function createRelayRuntimeStartTaskKind(deps: Pick<RelayRuntimeKindDeps, 'control' | 'readStatus' | 'checkHealth'>): InteractiveSystemTaskKind<RelayRuntimeStatusResult>;
export declare function createRelayRuntimeStopTaskKind(deps: Pick<RelayRuntimeKindDeps, 'control'>): InteractiveSystemTaskKind<Readonly<{
    stopped: true;
}>>;
export declare function parseRelayRuntimeTaskParams(params: unknown): RelayRuntimeTaskParams;
export declare function parseSystemTaskSshConfig(value: unknown): SystemTaskSshConnectionConfig;
export {};
//# sourceMappingURL=relayRuntimeKinds.d.ts.map