#!/usr/bin/env node import { type ServerProfileIdentity } from "./protocol.js"; import type { FastifyInstance } from "fastify"; import { type PostboxTailscaleOptions, type PostboxTailscaleStatus } from "./tailscaleServe.js"; export declare const DEFAULT_POSTBOX_PORT = 32187; export interface CliOptions { command: "serve" | "status"; statusJson: boolean; tailscaleEnabled: boolean; host: string; port: number; uiDistDir?: string; databasePath: string; profile: ServerProfileIdentity; profileStateDir: string; metadataPath: string; version: string; buildId: string; sessionHideOfflineAfterMs?: number; sessionRetentionMs?: number; fcmServiceAccountPath?: string; } export declare function defaultCliDatabasePath(stateDir?: string): string; export declare function parseCliOptions(argv: string[], env: NodeJS.ProcessEnv): CliOptions; export declare function describePostboxPortSelection(requestedPort: number, listenAddress: string): string | undefined; export interface ListenOnConfiguredPortOptions { host: string; port: number; profile: ServerProfileIdentity; metadataPath: string; buildId: string; warn?: (message: string) => void; instanceId?: string; heartbeatIntervalMs?: number; } export declare function listenOnConfiguredPort(app: FastifyInstance, options: ListenOnConfiguredPortOptions): Promise; export interface PostboxServerStatusReport { localUrl?: string; tailnetUrl?: string; profile: ServerProfileIdentity; availability: "running" | "unavailable"; health: "ok" | "unreachable" | "unknown"; tailscale: Pick; remoteConfig?: string; diagnostics: string[]; } export interface CollectPostboxServerStatusOptions { fetch?: typeof fetch; nowMs?: number; healthTimeoutMs?: number; inspectTailscale?: (options: PostboxTailscaleOptions) => Promise; profile?: ServerProfileIdentity; metadataPath?: string; } export declare function collectPostboxServerStatus(env?: NodeJS.ProcessEnv, options?: CollectPostboxServerStatusOptions): Promise; export declare function createCliPostboxApp(options: CliOptions, onShutdownRequest?: () => void): Promise; export declare function main(argv?: string[], env?: NodeJS.ProcessEnv): Promise; export declare function isCliEntrypoint(moduleUrl: string, argv1: string | undefined): boolean; //# sourceMappingURL=cli.d.ts.map