import type { AutomationRouteBinding } from '../automation/routes.js';
import type { RouteBindingManager } from '../channels/index.js';
import type { CompanionChatManager } from '../companion/companion-chat-manager.js';
import type { CompanionChatSession } from '../companion/companion-chat-types.js';
import type { ConfigManager } from '../config/manager.js';
export declare const HOME_ASSISTANT_DEFAULT_REMOTE_SESSION_TTL_MS: number;
type JsonRecord = Record<string, unknown>;
interface RouteBindingsLike {
    readonly start: RouteBindingManager['start'];
    readonly upsertBinding: RouteBindingManager['upsertBinding'];
    readonly patchBinding: RouteBindingManager['patchBinding'];
}
interface ConfigReader {
    get(key: string): unknown;
}
export interface HomeAssistantChatInput {
    readonly text: string;
    readonly messageId: string;
    readonly conversationId: string;
    readonly surfaceId: string;
    readonly channelId: string;
    readonly threadId?: string | undefined;
    readonly userId?: string | undefined;
    readonly displayName?: string | undefined;
    readonly title: string;
    readonly providerId?: string | undefined;
    readonly modelId?: string | undefined;
    readonly tools?: readonly string[] | undefined;
    readonly context?: JsonRecord | undefined;
    readonly remoteSessionTtlMs: number;
}
export interface HomeAssistantChatResolution {
    readonly binding: AutomationRouteBinding;
    readonly session: CompanionChatSession;
    readonly newSession: boolean;
    readonly sessionExpired: boolean;
}
export interface HomeAssistantChatPostResult extends HomeAssistantChatResolution {
    readonly messageId: string;
    readonly assistantMessageId?: string | undefined;
    readonly response?: string | undefined;
    readonly error?: string | undefined;
}
export interface HomeAssistantChatRuntime {
    readonly configManager: Pick<ConfigManager, 'get'> | ConfigReader;
    readonly routeBindings: RouteBindingsLike;
    readonly chatManager: CompanionChatManager;
    readonly resolveDefaultProviderModel?: (() => {
        provider: string;
        model: string;
    } | null) | undefined;
}
export declare function postHomeAssistantChatMessage(runtime: HomeAssistantChatRuntime, input: HomeAssistantChatInput, options?: {
    readonly wait?: boolean;
    readonly timeoutMs?: number | undefined;
    readonly clientId?: string;
}): Promise<HomeAssistantChatPostResult>;
export declare function resolveHomeAssistantChatSession(runtime: HomeAssistantChatRuntime, input: HomeAssistantChatInput): Promise<HomeAssistantChatResolution>;
export declare function readHomeAssistantRemoteSessionTtlMs(configManager: ConfigReader, value: unknown): number;
export {};
//# sourceMappingURL=homeassistant-chat.d.ts.map