import type { ExecToolDefaults } from "../../agents/bash-tools.js";
import type { SymiConfig } from "../../config/config.js";
import { type SessionEntry } from "../../config/sessions.js";
import type { MsgContext, TemplateContext } from "../templating.js";
import { type ElevatedLevel, type ReasoningLevel, type ThinkLevel, type VerboseLevel } from "../thinking.js";
import type { GetReplyOptions, ReplyPayload } from "../types.js";
import type { buildCommandContext } from "./commands.js";
import type { InlineDirectives } from "./directive-handling.js";
import { buildGroupIntro } from "./groups.js";
import type { createModelSelectionState } from "./model-selection.js";
import type { PreparedAgentRunParams } from "./prepared-agent-params.js";
import type { TypingController } from "./typing.js";
type AgentDefaults = NonNullable<SymiConfig["agents"]>["defaults"];
type ExecOverrides = Pick<ExecToolDefaults, "host" | "security" | "ask" | "node">;
export type RunPreparedReplyParams = {
    ctx: MsgContext;
    sessionCtx: TemplateContext;
    cfg: SymiConfig;
    agentId: string;
    agentDir: string;
    agentCfg: AgentDefaults;
    sessionCfg: SymiConfig["session"];
    commandAuthorized: boolean;
    command: ReturnType<typeof buildCommandContext>;
    commandSource: string;
    allowTextCommands: boolean;
    directives: InlineDirectives;
    defaultActivation: Parameters<typeof buildGroupIntro>[0]["defaultActivation"];
    resolvedThinkLevel: ThinkLevel | undefined;
    resolvedVerboseLevel: VerboseLevel | undefined;
    resolvedReasoningLevel: ReasoningLevel;
    resolvedElevatedLevel: ElevatedLevel;
    execOverrides?: ExecOverrides;
    elevatedEnabled: boolean;
    elevatedAllowed: boolean;
    blockStreamingEnabled: boolean;
    blockReplyChunking?: {
        minChars: number;
        maxChars: number;
        breakPreference: "paragraph" | "newline" | "sentence";
        flushOnParagraph?: boolean;
    };
    resolvedBlockStreamingBreak: "text_end" | "message_end";
    modelState: Awaited<ReturnType<typeof createModelSelectionState>>;
    provider: string;
    model: string;
    perMessageQueueMode?: InlineDirectives["queueMode"];
    perMessageQueueOptions?: {
        debounceMs?: number;
        cap?: number;
        dropPolicy?: InlineDirectives["dropPolicy"];
    };
    typing: TypingController;
    opts?: GetReplyOptions;
    defaultProvider: string;
    defaultModel: string;
    timeoutMs: number;
    isNewSession: boolean;
    resetTriggered: boolean;
    systemSent: boolean;
    sessionEntry?: SessionEntry;
    sessionStore?: Record<string, SessionEntry>;
    sessionKey: string;
    sessionId?: string;
    storePath?: string;
    workspaceDir: string;
    abortedLastRun: boolean;
};
/**
 * Discriminated result from `prepareAgentRun`. Either an early reply
 * (the prep produced a synthetic reply that bypasses the agent run —
 * e.g. unauthorized commands, empty bodies, xhigh-not-supported) OR
 * the prepared params for `runReplyAgent`. Path A of Phase 13: this
 * shape is what `runGlassUiTurn` consumes to take the prep work and
 * route it through `runUnifiedTurn` instead of `runReplyAgent`.
 */
export type PreparedAgentRun = {
    kind: "early-reply";
    reply: ReplyPayload | undefined;
} | {
    kind: "ready";
    runReplyAgentParams: PreparedAgentRunParams;
};
/**
 * The prep portion of the chain that builds everything needed to invoke
 * `runReplyAgent`. Extracted from `runPreparedReply` (Phase 13 / Path A)
 * so the new pipeline (`runUnifiedTurn`) can consume the same prep
 * without going through the chain's `runReplyAgent` orchestration.
 *
 * Behaviour is identical to the previous inline body of
 * `runPreparedReply`. `runPreparedReply` is now a thin wrapper that
 * calls `prepareAgentRun` and dispatches to `runReplyAgent` on success.
 */
export declare function prepareAgentRun(params: RunPreparedReplyParams): Promise<PreparedAgentRun>;
export {};
