import type { IHostnameRegistrarPort, HostnameRegistrarStatus, HostnameChangeResult } from '../../application/ports/outbound/IHostnameRegistrarPort.js'; export interface AvahiHostnameRegistrarOptions { /** * sudo password (the CLI's --sudo-password / MCCTL_SUDO_PASSWORD / prompt, * the API request's sudoPassword). Given: `sudo -S -p '' -v` reads it on * stdin first. Absent or empty (the console sends ''): `sudo -n` relies on * NOPASSWD or cached credentials. */ sudoPassword?: string; /** Default /etc/avahi/hosts (the path the README sudoers lines name). */ hostsFile?: string; } /** Run argv (no shell) with optional stdin; resolves the exit code (-1 when it cannot start). */ /** @internal exported for tests */ export declare function run(cmd: string, args: string[], input?: string): Promise; /** * avahi-daemon (mDNS) on the host OS, independent of the container runtime (ADR-0001). */ export declare class AvahiHostnameRegistrarAdapter implements IHostnameRegistrarPort { private readonly hostsFile; private readonly sudoPassword?; constructor(options?: AvahiHostnameRegistrarOptions); /** * Get avahi-daemon status */ getStatus(): HostnameRegistrarStatus; /** * Append ` ` to the avahi hosts file and restart avahi-daemon, * with exactly the commands the README sudoers lines allow: * `sudo -n tee -a /etc/avahi/hosts`, `sudo -n systemctl restart avahi-daemon`. */ register(hostname: string, ip: string): Promise; /** * Remove the lines that list exactly `hostname` before any comment, then * restart avahi-daemon, with the commands the README sudoers lines allow * (#751): `sudo -n sed -i /etc/avahi/hosts`, `sudo -n systemctl * restart avahi-daemon`. GNU sed -i renames a temp file, so a failure * leaves the file intact; avahi is Linux-only. */ unregister(hostname: string): Promise; /** With a password, `sudo -S -p '' -v` reads it on stdin, so the commands that follow never see it (#682). */ private authenticate; } //# sourceMappingURL=AvahiHostnameRegistrarAdapter.d.ts.map