export declare const AGENTS_URL_SCHEME = "agents";
export declare const MAC_BUNDLE_ID = "dev.agents.urlhandler";
export interface SchemeStatus {
    registered: boolean;
    platform: NodeJS.Platform;
    /** One human line: where the handler is, or why it is not registered. */
    detail: string;
}
/**
 * POSIX single-quote a path so a space or metacharacter in it can never break
 * out of the handler command.
 */
export declare function shQuote(p: string): string;
/**
 * Resolve how the OS handler should invoke this CLI, as an already-quoted
 * command prefix (without the `open <url>` suffix).
 *
 * A macOS GUI app does NOT inherit the shell PATH, so the handler must use an
 * absolute path. Prefer the `agents` shim on PATH (directly executable); fall
 * back to `<node> <entry>` for a bare JS install.
 */
export declare function resolveAgentsInvocation(platform?: NodeJS.Platform): string;
/** The freedesktop `.desktop` entry that claims `x-scheme-handler/agents`. */
export declare function linuxDesktopEntry(invocation: string): string;
/**
 * AppleScript whose `on open location` handler fires when macOS routes an
 * `agents://` URL to the app. `quoted form of` makes the URL a single safe
 * shell argument — the URL is never concatenated unquoted.
 */
export declare function macAppleScriptSource(invocation: string): string;
/** PlistBuddy commands that add the `agents` URL type to a compiled app's Info.plist. */
export declare function macPlistBuddyCommands(plistPath: string): string[][];
/** `reg add` argv lists that register the scheme under HKCU on Windows. */
export declare function windowsRegistryCommands(invocation: string): string[][];
export declare function linuxDesktopPath(home?: string): string;
export declare function macAppPath(home?: string): string;
/** Whether the handler artifact exists on disk (a cheap, side-effect-free check). */
export declare function agentsUrlSchemeStatus(platform?: NodeJS.Platform, home?: string): SchemeStatus;
export interface RegisterOptions {
    platform?: NodeJS.Platform;
    home?: string;
    /** Skip if already present (used by best-effort callers like setup). */
    ifMissing?: boolean;
}
export declare function registerAgentsUrlScheme(opts?: RegisterOptions): SchemeStatus;
export declare function unregisterAgentsUrlScheme(opts?: {
    platform?: NodeJS.Platform;
    home?: string;
}): SchemeStatus;
