import { type AgentTestRequest, type ConnectionTestResponse, type ProviderTestRequest } from '@open-design/contracts/api/connectionTest';
export { validateBaseUrl } from '@open-design/contracts/api/connectionTest';
export declare function resolveConnectionTestTimeoutMs(key: 'OD_CONNECTION_TEST_PROVIDER_TIMEOUT_MS' | 'OD_CONNECTION_TEST_AGENT_TIMEOUT_MS', fallback: number, env?: NodeJS.ProcessEnv): number;
export declare function redactSecrets(text: string, exactSecrets?: Array<string | undefined | null>): string;
type ProviderConnectionInput = ProviderTestRequest & {
    signal?: AbortSignal;
};
type AgentConnectionInput = AgentTestRequest & {
    signal?: AbortSignal;
};
export declare function isSmokeOkReply(text: unknown): boolean;
export declare function testProviderConnection(input: ProviderConnectionInput): Promise<ConnectionTestResponse>;
type AgentSinkResult = {
    kind: 'text';
    text: string;
} | {
    kind: 'streamError';
    error: Error;
};
interface AgentSink {
    send: (event: string, payload: unknown) => void;
    result: Promise<AgentSinkResult>;
    streamError: Promise<Error>;
    getText: () => string;
    getStderrTail: () => string;
    appendRawStdout: (chunk: string) => void;
    getRawStdoutTail: () => string;
    dispose: () => void;
}
export declare function createAgentSink(): AgentSink;
export declare function testAgentConnection(input: AgentConnectionInput): Promise<ConnectionTestResponse>;
