import type { ConnectionStatus, CallerInfo } from "shared";
/**
 * Load the mcp config dir's .env file into process.env.
 * Called on server startup when local mode is active.
 */
export declare function loadMcpEnvIntoProcess(): void;
/**
 * Ensure a caller config exists for the given alias.
 * If the alias doesn't have an entry in remote.config.json, creates one
 * with the same connections as "default" so the agent has immediate access.
 * No-op if the caller already exists.
 */
export declare function ensureCallerConfigForAlias(callerAlias: string): void;
/**
 * List all configured caller aliases.
 * Always includes "default" as the first entry.
 */
export declare function listCallerAliases(): CallerInfo[];
/**
 * Create a new caller alias.
 * Returns the created caller info.
 */
export declare function createCallerAlias(callerAlias: string, name?: string): CallerInfo;
/**
 * Delete a caller alias.
 * Removes the caller from remote.config.json and cleans up prefixed env vars.
 */
export declare function deleteCallerAlias(callerAlias: string): Promise<void>;
/**
 * List all connection templates with runtime status for a specific caller.
 * For each template: is it enabled for the caller? Which secrets are set?
 */
export declare function listConnectionsWithStatus(callerAlias?: string): ConnectionStatus[];
/**
 * Get status for a single connection template for a specific caller.
 */
export declare function getConnectionStatus(alias: string, callerAlias?: string): ConnectionStatus | null;
/**
 * Enable or disable a connection for a specific caller.
 * Updates remote.config.json and reinitializes the proxy.
 */
export declare function setConnectionEnabled(alias: string, enabled: boolean, callerAlias?: string): Promise<void>;
/**
 * Set secrets for a connection, scoped to a specific caller alias.
 *
 * Delegates to drawlatch's setCallerSecrets() which handles prefixed
 * env var writes and caller env mapping updates in one call.
 *
 * Returns updated secret-is-set status for all provided names.
 */
export declare function setSecrets(secrets: Record<string, string>, callerAlias?: string): Promise<Record<string, boolean>>;
export interface ListenerInstanceInfo {
    instanceId: string;
    disabled?: boolean;
    params?: Record<string, unknown>;
}
/**
 * List all listener instances for a connection and caller.
 * Returns the instances from callers[alias].listenerInstances[connection].
 */
export declare function listListenerInstances(connectionAlias: string, callerAlias?: string): ListenerInstanceInfo[];
/**
 * Add a new listener instance for a connection.
 * Saves to remote.config.json and reinitializes the proxy.
 */
export declare function addListenerInstance(connectionAlias: string, instanceId: string, params: Record<string, unknown>, callerAlias?: string): Promise<ListenerInstanceInfo>;
/**
 * Update a listener instance's parameters.
 * Merges params into the existing instance overrides.
 */
export declare function updateListenerInstance(connectionAlias: string, instanceId: string, params: Record<string, unknown>, disabled?: boolean, callerAlias?: string): Promise<ListenerInstanceInfo>;
/**
 * Delete a listener instance.
 * Removes from remote.config.json and reinitializes the proxy.
 */
export declare function deleteListenerInstance(connectionAlias: string, instanceId: string, callerAlias?: string): Promise<void>;
/**
 * List connections from a remote proxy server.
 *
 * Tries `list_connection_templates` first (new drawlatch tool with full
 * secret status), falling back to `list_routes` for older servers.
 *
 * Returns `remoteConfigManagement: true` when the new tools are available.
 */
export declare function listRemoteConnections(callerAlias?: string): Promise<{
    templates: ConnectionStatus[];
    callers: CallerInfo[];
    remoteConfigManagement: boolean;
}>;
/**
 * Enable or disable a connection on a remote drawlatch server.
 */
export declare function setRemoteConnectionEnabled(alias: string, enabled: boolean, callerAlias?: string): Promise<void>;
/**
 * Set secrets on a remote drawlatch server.
 * Returns boolean status per secret name.
 */
export declare function setRemoteSecrets(secrets: Record<string, string>, callerAlias?: string): Promise<Record<string, boolean>>;
/**
 * Get secret status from a remote drawlatch server.
 */
export declare function getRemoteSecretStatus(connectionAlias: string, callerAlias?: string): Promise<{
    requiredSecretsSet: Record<string, boolean>;
    optionalSecretsSet: Record<string, boolean>;
}>;
//# sourceMappingURL=connection-manager.d.ts.map