import { type ModelAliasIndex } from "../../agents/model-selection.js";
import type { SkillCommandSpec } from "../../agents/skills.js";
import type { SessionEntry } from "../../config/sessions.js";
import type { DaoCoreConfig } from "../../config/types.daocore.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 { buildCommandContext } from "./commands-context.js";
import { type InlineDirectives } from "./directive-handling.parse.js";
import { applyInlineDirectiveOverrides } from "./get-reply-directives-apply.js";
import { type ReplyExecOverrides } from "./get-reply-exec-overrides.js";
import { defaultGroupActivation, resolveGroupRequireMention } from "./groups.js";
import { createModelSelectionState } from "./model-selection.js";
import type { TypingController } from "./typing.js";
type AgentDefaults = NonNullable<DaoCoreConfig["agents"]>["defaults"];
export type ReplyDirectiveContinuation = {
    commandSource: string;
    command: ReturnType<typeof buildCommandContext>;
    allowTextCommands: boolean;
    skillCommands?: SkillCommandSpec[];
    directives: InlineDirectives;
    cleanedBody: string;
    messageProviderKey: string;
    elevatedEnabled: boolean;
    elevatedAllowed: boolean;
    elevatedFailures: Array<{
        gate: string;
        key: string;
    }>;
    defaultActivation: ReturnType<typeof defaultGroupActivation>;
    resolvedThinkLevel: ThinkLevel | undefined;
    resolvedFastMode: boolean;
    resolvedVerboseLevel: VerboseLevel | undefined;
    resolvedReasoningLevel: ReasoningLevel;
    resolvedElevatedLevel: ElevatedLevel;
    execOverrides?: ReplyExecOverrides;
    blockStreamingEnabled: boolean;
    blockReplyChunking?: {
        minChars: number;
        maxChars: number;
        breakPreference: "paragraph" | "newline" | "sentence";
        flushOnParagraph?: boolean;
    };
    resolvedBlockStreamingBreak: "text_end" | "message_end";
    provider: string;
    model: string;
    modelState: Awaited<ReturnType<typeof createModelSelectionState>>;
    contextTokens: number;
    inlineStatusRequested: boolean;
    directiveAck?: ReplyPayload;
    perMessageQueueMode?: InlineDirectives["queueMode"];
    perMessageQueueOptions?: {
        debounceMs?: number;
        cap?: number;
        dropPolicy?: InlineDirectives["dropPolicy"];
    };
};
export type ReplyDirectiveResult = {
    kind: "reply";
    reply: ReplyPayload | ReplyPayload[] | undefined;
} | {
    kind: "continue";
    result: ReplyDirectiveContinuation;
};
export declare function resolveReplyDirectives(params: {
    ctx: MsgContext;
    cfg: DaoCoreConfig;
    agentId: string;
    agentDir: string;
    workspaceDir: string;
    agentCfg: AgentDefaults;
    sessionCtx: TemplateContext;
    sessionEntry: SessionEntry;
    sessionStore: Record<string, SessionEntry>;
    sessionKey: string;
    storePath?: string;
    sessionScope: Parameters<typeof applyInlineDirectiveOverrides>[0]["sessionScope"];
    groupResolution: Parameters<typeof resolveGroupRequireMention>[0]["groupResolution"];
    isGroup: boolean;
    triggerBodyNormalized: string;
    resetTriggered: boolean;
    commandAuthorized: boolean;
    defaultProvider: string;
    defaultModel: string;
    primaryProvider?: string;
    primaryModel?: string;
    aliasIndex: ModelAliasIndex;
    provider: string;
    model: string;
    hasOneTurnModelOverride?: boolean;
    skipStoredModelOverride?: boolean;
    hasResolvedHeartbeatModelOverride: boolean;
    typing: TypingController;
    opts?: GetReplyOptions;
    skillFilter?: string[];
}): Promise<ReplyDirectiveResult>;
export {};
