UNPKG

@wonderwhy-er/desktop-commander

Version:

MCP server for terminal operations and file editing

24 lines (23 loc) • 1.49 kB
/** This is the hosted MCP API, not a value learned from /api/mcp-info. */ export declare const DEFAULT_REMOTE_SERVER_URL = "https://mcp.desktopcommander.app"; /** Trusted project endpoints; never learned from /api/mcp-info. */ export declare const SUPABASE1_ORIGIN = "https://olvbkozcufcbptfogatw.supabase.co"; export declare const SUPABASE2_ORIGIN = "https://xnalhwxchxhthlmzkhal.supabase.co"; export declare const SUPABASE3_ORIGIN = "https://example.supabase.co"; export interface RemoteAuthContext { serverOrigin: string; supabaseUrl: string; } export declare function isBackendLocal(url: URL): boolean; /** Validate before requesting configuration or sending any device credentials. */ export declare function validateRemoteServerUrl(value: string): URL; /** * Validate the Supabase endpoint BEFORE setSession() can send persisted tokens. * Accept only the explicitly listed project endpoints. Saved sessions are * separately bound to their exact MCP and Supabase endpoints before restoration. */ export declare function validateRemoteAuthContext(serverUrl: string, supabaseUrl: unknown): RemoteAuthContext; /** Legacy unbound sessions may be restored ONLY against the original default MCP/supabase1 pair. */ export declare function savedSessionMatchesContext(saved: unknown, expected: RemoteAuthContext): boolean; export declare function getRemoteDeviceConfigDirectory(home?: string): string; export declare function getRemoteDeviceConfigPath(home?: string): string;