/**
 * The Composio adapter — the *single* place `@composio/core` leaks into the SaaS
 * connector bridge.
 *
 * Everything else in `src/connectors-saas/` talks to the {@link SaasBackend} port
 * (see `../core/port`). This file is the lone implementation that satisfies that
 * port by delegating to the real `Composio` SDK client and translating the
 * vendor's richer, snake-/camel-cased catalog shapes down into our small, frozen
 * vocabulary. Because the vendor's response types are sprawling (deeply-nested
 * zod-inferred unions) and not worth re-deriving here, `any` is deliberately
 * permitted at this boundary — and *only* here. The mapping helpers
 * (`normalizeStatus`, `pickAuthUrl`, the `to*` projectors) re-narrow every value
 * back to a typed port shape before it crosses out, so nothing untyped escapes.
 *
 * Method-by-method delegation:
 *   listToolkits        → composio.toolkits.get({})
 *   listTools           → composio.tools.getRawComposioTools({ toolkits: [slug] })
 *   execute             → composio.tools.execute(slug, { userId, arguments, connectedAccountId })
 *   listConnectedAccounts → composio.connectedAccounts.list()
 *   initiateConnection  → composio.toolkits.authorize(userId, slug, authConfigId?)
 *   checkConnection     → composio.connectedAccounts.get(id)
 *
 * The Composio SDK is user-scoped: nearly every call wants a `userId`. The bridge
 * port is single-user by design, so we thread a fixed default user through the
 * adapter; callers that need multi-tenancy construct one backend per user.
 */
import type { SaasBackend } from "../core/port";
/** Options for standing up the Composio-backed {@link SaasBackend}. */
export interface ComposioBackendOptions {
    /** The Composio API key the SDK client authenticates with. */
    readonly apiKey: string;
    /**
     * The user scope to act under. The Composio catalog is user-scoped; the bridge
     * port is single-user, so one fixed id is threaded through every call. Defaults
     * to `"default"` when omitted.
     */
    readonly userId?: string;
}
/**
 * Thrown when a backend operation cannot be satisfied through the Composio SDK in
 * a way that maps cleanly onto the port — i.e. a genuinely unsupported request,
 * not a transient API failure. Carries the offending method name for tracing.
 */
export declare class ComposioBackendError extends Error {
    /** The port method that could not be satisfied (e.g. `"checkConnection"`). */
    readonly method: string;
    constructor(method: string, message: string, options?: {
        cause?: unknown;
    });
}
/**
 * Build the Composio-backed {@link SaasBackend}.
 *
 * This is the bridge's single seam onto `@composio/core`: hand it an API key and
 * it returns an object that speaks only the port. Nothing the caller touches
 * references a vendor type.
 */
export declare function createComposioBackend(opts: {
    apiKey: string;
}): SaasBackend;
