import type { ClientToolDefinition } from "../../koi/pi-embedded-runner/run/params.js";
import type { ChannelOutboundTargetMode } from "../../channels/plugins/types.js";
/** Image content block for Claude API multimodal messages. */
export type ImageContent = {
    type: "image";
    data: string;
    mimeType: string;
};
export type KoiStreamParams = {
    /** Provider stream params override (best-effort). */
    temperature?: number;
    maxTokens?: number;
};
export type KoiRunContext = {
    messageChannel?: string;
    accountId?: string;
    groupId?: string | null;
    groupChannel?: string | null;
    groupSpace?: string | null;
    currentChannelId?: string;
    currentThreadTs?: string;
    replyToMode?: "off" | "first" | "all";
    hasRepliedRef?: {
        value: boolean;
    };
};
export type KoiCommandOpts = {
    message: string;
    /** Optional image attachments for multimodal messages. */
    images?: ImageContent[];
    /** Optional client-provided tools (OpenResponses hosted tools). */
    clientTools?: ClientToolDefinition[];
    /** Koi id override (must exist in config). */
    koiId?: string;
    /**
     * Internal gateway escape hatch for freshly-applied companions whose
     * in-memory cfg was validated by the gateway but the command's disk-backed
     * loadConfig() snapshot has not caught up yet.
     */
    allowUnlistedKoi?: boolean;
    to?: string;
    sessionId?: string;
    sessionKey?: string;
    thinking?: string;
    thinkingOnce?: string;
    verbose?: string;
    json?: boolean;
    timeout?: string;
    deliver?: boolean;
    /** Override delivery target (separate from session routing). */
    replyTo?: string;
    /** Override delivery channel (separate from session routing). */
    replyChannel?: string;
    /** Override delivery account id (separate from session routing). */
    replyAccountId?: string;
    /** Override delivery thread/topic id (separate from session routing). */
    threadId?: string | number;
    /** Message channel context (webchat|voicewake|whatsapp|...). */
    messageChannel?: string;
    channel?: string;
    /** Account ID for multi-account channel routing (e.g., WhatsApp account). */
    accountId?: string;
    /** Context for embedded run routing (channel/account/thread). */
    runContext?: KoiRunContext;
    /** Group id for channel-level tool policy resolution. */
    groupId?: string | null;
    /** Group channel label for channel-level tool policy resolution. */
    groupChannel?: string | null;
    /** Group space label for channel-level tool policy resolution. */
    groupSpace?: string | null;
    /** Parent session key for subkoi policy inheritance. */
    spawnedBy?: string | null;
    deliveryTargetMode?: ChannelOutboundTargetMode;
    bestEffortDeliver?: boolean;
    abortSignal?: AbortSignal;
    lane?: string;
    runId?: string;
    extraSystemPrompt?: string;
    /** Per-call stream param overrides (best-effort). */
    streamParams?: KoiStreamParams;
};
