/**
 * WIZ.4 — channel-test step for the chat-setup wizard.
 *
 * Extracted from `chat_actions.ts` to keep the orchestrator under the
 * 450-LOC file-size cap. Single public entry point: `runChannelTestStep`.
 *
 * Behavior:
 *   - Honors `OPENSQUID_NO_BILLED_CALLS=1` — when set, the offer is
 *     skipped entirely (no confirm prompt, no RPC call). The Telegram
 *     Bot API call isn't an LLM call, but the WIZ.4 spec lumps it under
 *     the same skip flag so CI / `pnpm test` never makes external calls.
 *   - Opt-in via `confirm({ initialValue: false })` — default decline.
 *   - On accept: resolves project UUID via the same chain the chat-bridge
 *     MCP uses (env override → cwd .opensquid/project.json walk).
 *   - Detects the chat-daemon liveness from the WIZ.2 snapshot; if not
 *     running, prints the start-hint and returns without dialing.
 *   - Resolves `project:telegram` → real channel via the on-disk
 *     `~/.opensquid/projects/<uuid>/chat-routing.json` shape. We inline
 *     the read (not import a shared helper) because it is a trivial
 *     read-and-parse and keeps WIZ.4 self-contained — same approach
 *     `test/e2e/telegram-multi-project-routing.test.ts` uses. Threads
 *     `report_topic_id` through as `threadId` so the test lands in the
 *     right forum topic.
 *   - Dials the chat-daemon over its Unix socket with a one-shot
 *     JSON-RPC call (same pattern `src/mcp/chat-bridge-server.ts`
 *     uses for chat_send — keeps WIZ.4 self-contained).
 *   - On success: pretty-prints message_id in green.
 *   - On failure: classifies the error (daemon unreachable / routing
 *     missing / bot token invalid / generic) and prints a specific
 *     recovery hint per WIZ.4 spec.
 *
 * Never throws past the wizard — failures print and return so the wizard
 * still hits its success outro. The write has already happened by the
 * time this step runs (post-write per WIZ.4 spec).
 *
 * Imports from: @clack/prompts, picocolors, node:fs/promises, node:net,
 *   node:path, ../../runtime/paths.
 * Imported by: src/setup/cli/chat_actions.ts.
 */
import type { ChatDaemonState } from './chat_state.js';
export interface ChannelTestDeps {
    /** WIZ.2 daemon snapshot. Avoids re-dialing the pidfile + sock probe. */
    daemonState: ChatDaemonState;
    /** Override for cwd-walk start (test injection). Defaults to process.cwd(). */
    cwd?: string;
    /** Env-var override sink (test injection). Defaults to process.env. */
    env?: NodeJS.ProcessEnv;
    /** Override the send function (test injection). Defaults to the real
     *  Unix-socket JSON-RPC client. Tests substitute a fake here. */
    send?: (params: SendTestParams) => Promise<SendTestResult>;
    /** Override the routing-read function (test injection). Defaults to
     *  reading `~/.opensquid/projects/<uuid>/chat-routing.json`. */
    loadRouting?: (uuid: string) => Promise<ProjectChatRouting | null>;
}
export declare function runChannelTestStep(deps: ChannelTestDeps): Promise<void>;
export interface ProjectChatRouting {
    telegram?: {
        report_channel?: string;
        report_topic_id?: number;
    };
    discord?: {
        report_channel?: string;
    };
    slack?: {
        report_channel?: string;
    };
}
export interface SendTestParams {
    channel: string;
    text: string;
    projectUuid: string;
    threadId?: string;
}
export interface SendTestResult {
    ok: boolean;
    platform: string;
    message_id: string;
    delivered_at: string;
}
export declare class DaemonUnreachableError extends Error {
    constructor(message: string);
}
export declare class RoutingMissingError extends Error {
    constructor(message: string);
}
//# sourceMappingURL=chat_actions_test_step.d.ts.map