/**
 * LiveTestSlackCaller — a credential adapter implementing the `SlackCaller` seam that
 * `SlackLiveSender` consumes (see src/core/SlackLiveSender.ts), built for the
 * live-test harness (docs/specs/live-user-channel-proof-standard.md §5.4).
 *
 * THE PROBLEM IT SOLVES: the only DISTINCT non-Echo Slack senders we have captured in
 * the demo workspace are real test-USER identities authenticated the way a browser is —
 * an `xoxc-…` web-client token PLUS the user's `d` session cookie. Those are NOT Bearer
 * (xoxp/xoxb) tokens, so `SlackApiClient` (which only knows `Authorization: Bearer`)
 * cannot post AS one of those users. Without this adapter the harness's Slack arm could
 * never drive a REAL channel as a REAL member — defeating the whole point of the
 * gold-standard live-test (drive real channels as a real user).
 *
 * THE MECHANISM (mirrors .instar/slack-live-test/post-as.mjs):
 *  - `chat.postMessage` (POST AS THE MEMBER) → Slack web-client auth: the `xoxc` token
 *    goes in the x-www-form-urlencoded BODY (`token=<xoxc>`), and the member's `d`
 *    session cookie goes in a `Cookie: d=<value>` header, against the workspace host
 *    `https://<workspaceHost>/api/chat.postMessage`. This is exactly how the real Slack
 *    web client authenticates a message send, so the bot sees a genuine distinct-principal
 *    message over the live adapter.
 *  - every OTHER method (e.g. `conversations.history`) → the normal bot-token path:
 *    `Authorization: Bearer <botToken>` against `https://slack.com/api/<method>`. Reading
 *    history does not need to be done AS the member, and the bot token is a clean Bearer.
 *
 * Pure transport over an injected `fetch` (defaults to the global) so it is fully
 * unit-testable with a fake fetch. No silent fallbacks: a missing credential for the
 * path a call needs throws loudly (the harness records a real driver-error FAIL), never
 * a fabricated reply.
 */
import type { SlackCaller } from './SlackLiveSender.js';
/** The subset of `fetch` this adapter uses (so tests can inject a fake). */
export type FetchLike = (url: string, init: {
    method: string;
    headers: Record<string, string>;
    body: string;
}) => Promise<{
    json(): Promise<unknown>;
}>;
export interface LiveTestSlackCallerDeps {
    /** Workspace host for web-client posts, e.g. `sagemindlivetest.slack.com` (no scheme). */
    workspaceHost: string;
    /** The member's `xoxc-…` web-client token (goes in the form body for chat.postMessage). */
    xoxcToken: string;
    /** The member's `d` session cookie VALUE (goes in the `Cookie: d=…` header). */
    dCookie: string;
    /** A clean Bearer bot token used for every non-postMessage method (e.g. history reads). */
    botToken: string;
    /** Injected for tests; defaults to global fetch. */
    fetchImpl?: FetchLike;
    logger?: (m: string) => void;
}
/** The shape SlackCaller.call resolves to. */
type SlackCallResult = Awaited<ReturnType<SlackCaller['call']>>;
export declare class LiveTestSlackCaller implements SlackCaller {
    private readonly d;
    constructor(deps: LiveTestSlackCallerDeps);
    private log;
    private fetch;
    call(method: string, params?: Record<string, unknown>): Promise<SlackCallResult>;
    /**
     * POST AS THE MEMBER — Slack web-client auth: xoxc token in the form body + `d` cookie
     * in the Cookie header, against the workspace host.
     */
    private postAsMember;
    /**
     * Every other method goes over the clean Bearer bot-token path at slack.com — a JSON
     * body, `Authorization: Bearer <botToken>`.
     */
    private callAsBot;
}
export {};
//# sourceMappingURL=LiveTestSlackCaller.d.ts.map