/**
 * `runAsk(...)` — single source of truth for the `c4s ask` flow.
 *
 * Wolany przez dwa transporty: CLI binarke (`src/bin/c4s/commands/ask.ts`)
 * i in-process MCP server (`src/server/mcp/c4s-tools.ts`). Cztery
 * deterministyczne kroki: resolve project → health-check tozsamosci serwera →
 * create-thread (context-specific) → run-turn.
 *
 *   await runAsk({ message: '...', contextType: 'chat' })
 *   await runAsk({ message: '...', server: 'http://other:4501', threadId: '...' })
 *   await runAsk({ message: '...', contextType: 'brief', briefPath: '...' })
 */
export type AskContextType = 'chat' | 'brief' | 'patch';
export interface AskParams {
    message: string;
    /** Local path do `.claude4spec/` peera; mutex z `server`. */
    project?: string;
    /** Override discovery URL serwera peera; gdy podany razem z `project` — `server` wygrywa. */
    server?: string;
    /** Default `'chat'`. Ignorowany gdy podano `threadId`. */
    contextType?: AskContextType;
    /** Kontynuacja istniejacego watku u peera; pomija create-thread. */
    threadId?: string;
    /** Wymagane dla `contextType='brief'` (gdy brak `threadId`). */
    briefPath?: string;
}
export interface AskResult {
    threadId: string;
    answer: string;
}
export type AskErrorCode = 'PROJECT_NOT_FOUND' | 'SERVER_NOT_RUNNING' | 'SERVER_NOT_RECOGNIZED' | 'NOT_FOUND' | 'STREAM_IN_PROGRESS' | 'AGENT_UNAVAILABLE' | 'AGENT_ERROR' | 'TIMEOUT' | 'ABORTED' | 'INVALID_ARGS';
export declare class AskError extends Error {
    code: AskErrorCode;
    hint?: string | undefined;
    constructor(code: AskErrorCode, message: string, hint?: string | undefined);
}
export declare function runAsk(params: AskParams): Promise<AskResult>;
