/** * Variable Substitution Module * * Functions to replace variables in prompt text. * Variables use double curly brace syntax: {{variable_name}} * Values come from the prompt_variables JSON array. */ import type { Logger, PromptVariables } from '../llm_api/types.js'; /** * Substitute variables in prompt text with values from prompt_variables * Variables are identified by double curly braces (e.g., {{location}} becomes "Tokyo") * * @param prompt_text - The prompt text containing variables to replace * @param prompt_variables - Array of key-value objects with variable values * Format: [{ "variable1": "value1", "variable2": "value2" }] * @param logger - Logger instance * @returns The prompt text with all variables substituted */ export declare function substitute_variables(prompt_text: string, prompt_variables: PromptVariables | undefined, logger: Logger): string; /** * Parse prompt_variables from JSON string * @param json_string - JSON string containing prompt variables * @param logger - Logger instance * @returns Parsed prompt variables array, or empty array if parsing fails */ export declare function parse_prompt_variables(json_string: string | undefined | null, logger: Logger): PromptVariables; /** * Validate that all required variables are present * @param prompt_text - The prompt text containing variables * @param prompt_variables - The variables provided for substitution * @param logger - Logger instance * @returns Object with validation result and any missing variables */ export declare function validate_variables(prompt_text: string, prompt_variables: PromptVariables | undefined, logger: Logger): { valid: boolean; missing_variables: string[]; }; //# sourceMappingURL=substitute_variables.d.ts.map