/** * host-resolver.ts, the ONE truth for daemon bind-address + port resolution. * * Both resolvers carry an explicit `recognized` flag: an unrecognized or * malformed stored value never falls through to undefined behavior. The safe * fallback is always the LOCAL posture ('127.0.0.1' / the server-type default * port), a config typo must never accidentally bind 0.0.0.0 or port NaN. * Consumers that display the binding anchor to this resolver instead of * re-deriving their own defensive copies of the raw stored values. */ export interface ResolvedHostBinding { readonly host: string; readonly port: number; /** * False when the stored hostMode was not one of 'local' | 'network' | * 'custom' (after trimming/lowercasing) and the safe local fallback was * applied. Surfaces show the honest "unrecognized value" state from this. */ readonly recognized: boolean; /** The mode actually applied ('local' when unrecognized). */ readonly effectiveMode: 'local' | 'network' | 'custom'; } export declare function resolveHostBinding(hostMode: string, customHost: string, customPort: number, serverType: 'controlPlane' | 'httpListener' | 'web'): ResolvedHostBinding; export interface ResolvedWebBinding { readonly host: string; readonly port: number; /** False when a stored value was invalid/unrecognized and a fallback applied. */ readonly recognized: boolean; readonly effectiveMode: 'local' | 'network' | 'custom'; } /** * The web endpoint's binding resolver, the same shape and fallback semantics * as {@link resolveHostBinding}, so surface-registry announcements, channel * account links, and the tailscale-serve verb all anchor to one truth instead * of each reading the raw stored values (`Number(raw ?? 3423)` let 0 stay 0 * and non-numeric stay NaN). */ export declare function resolveWebBinding(input: { readonly hostMode?: unknown; readonly host?: unknown; readonly port?: unknown; }): ResolvedWebBinding; /** The validated web port (fallback 3423), a convenience over {@link resolveWebBinding}. */ export declare function resolveWebPort(rawPort: unknown): number; //# sourceMappingURL=host-resolver.d.ts.map