export declare function findTailscale(): string | undefined; export declare function which(binary: string, pathVar?: string): string | undefined; export interface ExecResult { code: number; stdout: string; stderr: string; } export declare function run(command: string, args: string[], options?: { timeoutMs?: number; input?: string; }): Promise; export interface TailscaleSelf { backendState: string; hostName: string; /** e.g. `jonathans-mbp.tail56cd97.ts.net` (no trailing dot). */ dnsName: string; online: boolean; tailnet?: string; tailscaleIps: string[]; /** True when the node's capabilities include Funnel. */ funnelCapable?: boolean; } export declare function parseTailscaleStatus(json: unknown): TailscaleSelf | undefined; export declare function tailscaleStatus(binary?: string | undefined): Promise; export type ExposureMode = "funnel" | "serve"; export interface Exposure { /** Public (Funnel) or tailnet-only (Serve) HTTPS URL. */ url: string; target: string; mode: ExposureMode; port: number; path: string; } /** Parses `tailscale serve|funnel status --json` (a ServeConfig) into the HTTPS listeners it describes. */ export declare function parseServeConfig(json: unknown): Exposure[]; export declare function currentExposures(binary?: string | undefined): Promise; export interface ExposeResult { ok: boolean; url?: string; output: string; /** Present when Tailscale asks a human to approve Funnel in the admin console. */ approvalUrl?: string; } /** * `tailscale funnel --bg --yes ` (public internet) or `tailscale serve --bg --yes ` * (tailnet only). Both persist across reboots inside tailscaled's state. */ export declare function enableExposure(mode: ExposureMode, localPort: number, binary?: string | undefined): Promise; export declare function disableExposure(mode: ExposureMode, port?: number, binary?: string | undefined): Promise; export declare function tailnetUrl(self: TailscaleSelf | undefined): string | undefined;