/** * Thin client over the Photon AI provider for the theme flows. It reuses the * existing `PhotonAIProvider.generate()` seam unchanged — so JSON mode, timeout, * abort and JSON-recovery all come for free — and reads the theme (or * explanation) out of the provider's `{actions, reply}` envelope. All theme * services go through this one client, so provider concerns live in a single * place. * * @packageDocumentation */ import type { PhotonAIProvider } from '../provider/ai-provider.types'; import type { GeneratedTheme } from '../../types/theme-ai.types'; /** The theme is transported as this action type (see ThemePromptBuilder). */ export declare const THEME_ACTION_TYPE = "photonTheme"; /** The explanation is transported as this action type. */ export declare const EXPLAIN_ACTION_TYPE = "photonThemeExplanation"; /** Error thrown by the AI Theme Engine (e.g. no provider, or the model returned nothing usable). */ export declare class PhotonThemeError extends Error { constructor(message: string); } /** Calls the LLM provider and extracts a named action's params. */ export declare class ThemeLlmClient { private readonly provider; constructor(provider: PhotonAIProvider | null); /** Whether an LLM provider is configured. */ hasProvider(): boolean; /** * Runs one provider call and returns the params of the first matching action. * @throws {@link PhotonThemeError} when no provider is configured or the model * returned no usable action. */ requestActionParams(systemInstruction: string, userCommand: string, actionType: string, signal?: AbortSignal): Promise>; } /** Reads a string field from raw params with a fallback. */ export declare function readString(value: unknown, fallback?: string): string; /** Assembles a {@link GeneratedTheme} from raw action params + already-validated variables. */ export declare function assembleTheme(params: Record, variables: Readonly>, fallbackName?: string): GeneratedTheme; //# sourceMappingURL=theme-llm-client.d.ts.map