/**
 * sdk-client.ts — thin wrapper over `@anthropic-ai/claude-agent-sdk`'s
 * `query()` for `olam ask`.
 *
 * Auth model (per repo CLAUDE.md, Decision D15): the Claude Agent SDK consumes
 * the operator's LOCAL Claude Code subscription via stdio/IPC. It is NOT an
 * `api.anthropic.com` HTTPS caller, so it is EXEMPT from `audit:auth-callers`
 * and the `withCredential` helper-or-die rule. Nothing in this file references
 * `api.anthropic.com`; the operator pays $0 incremental on top of their
 * existing Claude Code login.
 *
 * The SDK is imported via dynamic `import()` so a missing / unbuilt SDK (or a
 * Claude Code that isn't logged in) degrades to a clear, actionable error
 * rather than a hard module-load crash (Rule 12 — fail loud, not cryptic).
 *
 * The model is pinned to `claude-sonnet-4-6` — the locked decision for this
 * feature. `olam ask` is a fast Q&A surface, not a deep-reasoning loop.
 */
/** Pinned model for `olam ask`. Locked decision — do not change without sign-off. */
export declare const ASK_MODEL = "claude-sonnet-4-6";
/** Error thrown when the Agent SDK / local Claude Code is unavailable. */
export declare class AskSdkUnavailableError extends Error {
    readonly cause?: unknown | undefined;
    constructor(message: string, cause?: unknown | undefined);
}
/**
 * Minimal shape of an SDK message this client reacts to. The real SDKMessage
 * union is wider; we narrow to assistant text + the terminal result so the
 * client is testable with synthetic iterables (no real API calls in tests).
 */
export interface AskSdkMessage {
    readonly type: string;
    readonly message?: {
        readonly content?: ReadonlyArray<{
            readonly type: string;
            readonly text?: string;
        }>;
    };
    readonly is_error?: boolean;
    readonly subtype?: string;
}
/** A `query()`-shaped function. Injected in tests; resolved from the SDK live. */
export type AskQueryFn = (input: {
    prompt: string;
    options: Record<string, unknown>;
}) => AsyncIterable<AskSdkMessage>;
export interface AskSdkOptions {
    /** Full system-prompt append text (preamble + knowledge pack). */
    readonly systemPromptAppend: string;
    /**
     * When set, the SDK is allowed to read repo files (Read/Grep/Glob) with the
     * given dir as cwd. Omit to run with zero tools (no local-file access).
     */
    readonly repoRoot?: string;
    /**
     * Injected `query` for tests. When absent, resolved at call time via dynamic
     * import of `@anthropic-ai/claude-agent-sdk`.
     */
    readonly queryFn?: AskQueryFn;
}
/**
 * Resolve the SDK's `query` function, mapping any import failure to a
 * domain error with an actionable message. Exported for the degradation test.
 */
export declare function resolveQueryFn(injected?: AskQueryFn): Promise<AskQueryFn>;
/**
 * Build the `query()` options object. Pinned model + the system-prompt append
 * on the Claude Code preset. Read-only tools enabled only inside a checkout;
 * otherwise an empty allowlist (no filesystem access). Exported so the
 * options shape is snapshot-testable (Rule 9 — a regression that unpinned the
 * model or dropped the system prompt would slip past behaviour tests).
 */
export declare function buildAskQueryOptions(opts: AskSdkOptions): Record<string, unknown>;
/**
 * Extract the assistant's visible text from an SDK message. Returns '' for
 * non-text messages (system / result / tool-use). Exported for the unit test
 * that asserts text aggregation across content blocks.
 */
export declare function extractAssistantText(msg: AskSdkMessage): string;
/**
 * Run one prompt through the SDK and return the aggregated assistant text.
 * Streams via the optional `onText` callback so the REPL/one-shot can print
 * incrementally. Throws {@link AskSdkUnavailableError} when the SDK can't be
 * resolved, or the underlying error if the SDK itself fails mid-stream.
 */
export declare function askOnce(prompt: string, opts: AskSdkOptions, onText?: (chunk: string) => void): Promise<string>;
//# sourceMappingURL=sdk-client.d.ts.map