/**
 * Pure CLI dispatch resolution for `mailpouch`.
 *
 * The bare `mailpouch` (no positional subcommand) is the MCP stdio server that
 * Claude Desktop spawns — it must keep booting the full server. But a human
 * inspecting the install types `mailpouch status` / `mailpouch --help` and used
 * to get a *second* full server booted in the foreground (it hung until SIGTERM
 * and spawned a transient instance beside the real daemon), because anything
 * unrecognized fell through to the server start.
 *
 * This resolver makes the surface explicit: known subcommands and --help/--version
 * are handled and exit; an UNKNOWN positional command is an error (never the
 * server); only a bare or flag-only invocation reaches the server. Kept pure and
 * dependency-free so it's unit-tested directly; main() switches on the result.
 */
export declare const KNOWN_SUBCOMMANDS: readonly ["setup", "doctor", "status", "agent", "daemon"];
export type KnownSubcommand = (typeof KNOWN_SUBCOMMANDS)[number];
export type Invocation = {
    kind: "help";
} | {
    kind: "version";
} | {
    kind: "subcommand";
    name: KnownSubcommand;
} | {
    kind: "server";
} | {
    kind: "unknown";
    arg: string;
};
/**
 * Resolve a full `process.argv` (argv[0]=node, argv[1]=script, argv[2..]=args)
 * into the intended action. --help/--version win over everything (mirrors the
 * pre-existing --version short-circuit).
 */
export declare function resolveInvocation(argv: string[]): Invocation;
export declare const USAGE = "mailpouch \u2014 MCP server for Proton Mail / IMAP via Proton Bridge.\n\nFor one-off commands, the PATH-proof form (no global install needed) is:\n  npx -y mailpouch <command>\n\nCommands:\n  (no command)        Run the MCP server on stdio. This is what an MCP client\n                      (e.g. Claude Desktop) spawns; not meant to run by hand.\n  setup               Configure Bridge credentials non-interactively\n                        --username <addr> (--password-stdin | --password-file <p> | --password <pw>)\n                        [--imap-host/--imap-port/--smtp-host/--smtp-port] [--bridge-cert <p> | --insecure]\n  doctor [--json]     Diagnose the install/connection; prints the next step, exits\n  status [--json]     Show whether mailpouch is running, its ports, connection, and\n                      approved agents \u2014 read-only, exits (does not start a server)\n  agent <issue|list|revoke \u2026>   Manage headless service accounts\n  daemon [--host H] [--port P]  Run the shared HTTP daemon (forces HTTP transport)\n\nFlags:\n  -h, --help          Show this help and exit\n  -v, --version       Print the version and exit\n  --settings-only     Run only the settings UI + tray (no MCP transport)\n  --no-tray           Don't start the system tray icon\n  --no-settings-ui    Don't start the settings UI server";
//# sourceMappingURL=invocation.d.ts.map