#!/usr/bin/env node export declare const SERVER_NAME = "ga4"; /** Runs a program with an argv array (no shell); returns stdout. Throws on non-zero exit. */ export type Exec = (file: string, args: string[]) => string; export interface ServerEntry { command: string; args: string[]; env: Record; } export interface EntryInput { propertyId: string; credentialsFile?: string; oauth?: { clientId: string; clientSecret: string; refreshToken: string; }; } export type Only = "desktop" | "code"; export declare function buildServerEntry(input: EntryInput): ServerEntry; export declare function resolveDesktopConfigPath(platform?: NodeJS.Platform, home?: string, env?: NodeJS.ProcessEnv): string; /** Desktop counts as installed when its config file OR its Claude dir exists. */ export declare function detectDesktop(configPath: string): boolean; export declare function detectClaudeCli(exec: Exec): boolean; export declare function writeDesktopConfig(configPath: string, entry: ServerEntry): { path: string; existed: boolean; }; export declare function registerClaudeCode(entry: ServerEntry, exec: Exec): void; export interface CliArgs { help: boolean; only?: Only; propertyId?: string; credentialsFile?: string; desktopConfigPath?: string; } export declare function parseArgs(argv: string[]): CliArgs; export declare function planTargets(detected: { desktopDetected: boolean; cliDetected: boolean; }, only: Only | undefined): { desktop: boolean; code: boolean; }; export type TargetResult = "written" | "skipped"; export declare function runRegistration(opts: { entry: ServerEntry; desktopConfigPath: string; exec: Exec; only?: Only; }): { desktop: TargetResult; code: TargetResult; }; export declare function main(argv?: string[]): Promise; /** Run the CLI and exit the process. Entry point for the mcp-ga4-setup wrapper package. */ export declare function runCli(argv?: string[]): Promise;