import { type ContainerRuntime } from './containerRelayLifecycle.js'; type Runner = (file: string, args: string[]) => Promise<{ stdout: string; }>; export interface RelayAutostartOptions { home: string; userHome?: string; platform?: NodeJS.Platform; uid?: number; run?: Runner; containerRuntime?: ContainerRuntime; pinnedControllerRollback?: boolean; /** Non-secret native profile location, never its contents or credentials. */ codexHome?: string; /** Set only from the verified runtime-upgrade journal during rollback. */ restoreCodexHome?: string | null; } interface RegistrationFields { backend: 'systemd-user' | 'windows-task' | 'launchd-user' | 'container-entrypoint'; launcher: string; workspace: string; version: string; taskName: string | null; } export type RelayAutostartRegistration = RegistrationFields & ({ schema: 'dharma.relay-autostart/v1'; policy: string; } | { schema: 'dharma.relay-autostart/v2'; mode: 'demo-only'; policy: null; } | { schema: 'dharma.relay-autostart/v3'; policy: string; } | { schema: 'dharma.relay-autostart/v4'; backend: 'systemd-user'; policy: string; codexHome: string; }); type Registration = RelayAutostartRegistration; export type RelayAutostartState = { state: 'enabled' | 'disabled' | 'unavailable' | 'unsupported'; backend: Registration['backend'] | null; version?: string; reason?: string; lifecycle?: 'configured' | 'unconfigured' | 'paused' | 'blocked' | 'starting' | 'running'; restartCoverage?: 'container-entrypoint-only'; }; export declare function macRelayLaunchAgent(launcher: string, policy: string | null, workspace: string, home: string): string; export declare function linuxRelayUnit(launcher: string, policy: string | null, workspace: string, home?: string, codexHome?: string): string; export declare function windowsRelayStartupScript(launcher: string, policy: string | null, home?: string): string; export declare function assertRelayStartupOwnership(options: RelayAutostartOptions & { version?: string; }): Promise; export declare function relayAutostartStatus(options: RelayAutostartOptions): Promise; export declare function enableRelayAutostart(options: RelayAutostartOptions & { workspace: string; launcher: string; policy: string | null; version: string; preserveStandardAnchor?: boolean; }): Promise; export declare function disableRelayAutostart(options: RelayAutostartOptions): Promise; export declare function startRelayAutostart(options: RelayAutostartOptions): Promise<{ state: "start_requested"; backend: "container-entrypoint" | "systemd-user" | "windows-task" | "launchd-user"; version: string; }>; export declare function inspectOwnedRelayAutostart(options: RelayAutostartOptions, inspection?: { allowLegacy?: boolean; }): Promise; export declare function stopRelayAutostart(options: RelayAutostartOptions): Promise<{ state: "stop_requested"; backend: "container-entrypoint" | "systemd-user" | "windows-task" | "launchd-user"; version: string; }>; export {}; //# sourceMappingURL=relayAutostart.d.ts.map