import type { IFileSystem } from '@breadstone-infrastructure/utilities'; import type { IResourceInfo, IResourceModel } from '@breadstone-tools/localizator-core'; import { EventEmitter } from 'events'; import type { IResourceGeneratorStrategy, IResourceGeneratorStrategyEventMap } from '../Interfaces/IResourceGeneratorStrategy.js'; import type { IResourceGeneratorStrategyConfig } from '../Interfaces/IResourceGeneratorStrategyConfig.js'; /** * Abstract base class for AI-based resource generation strategies. * * @public */ export declare abstract class BaseResourceGeneratorStrategy extends EventEmitter implements IResourceGeneratorStrategy { private readonly _fileSystem; private readonly _config; /** * Constructs a new instance of the `BaseResourceGeneratorStrategy` class. * * @protected * @param fileSystem The service to handle file operations. * @param config The configuration for the strategy. */ protected constructor(fileSystem: IFileSystem, config: IResourceGeneratorStrategyConfig); /** * Returns the `config` property. * * @public * @readonly */ get config(): IResourceGeneratorStrategyConfig; /** * Transcribes a resource to the specified locale. * * @public * @abstract * @param data The resource and models to transcribe. * @param locale The target locale. * @returns The transcribed resource. */ transcribe(data: { resource: IResourceInfo; models: Array; }, locale: string): Promise>; /** * Processes a resource using the specified strategy. * * @protected * @abstract * @param prompt The prompt to process. * @returns The translated resource models. */ protected abstract processResource(prompt: { system: string; content: string; }): Promise>; /** * Serializes an array of resource models to a TOON-encoded string for token-efficient LLM input. * * Uses the tabular array form (`models[N]{key,value,comment}:`) with tab delimiters, * which yields ~60% fewer tokens than formatted JSON for uniform record arrays while * keeping commas inside i18n values unquoted. * * @private * @param models The array of resource models to serialize. * @returns The serialized TOON string. */ private serializeModels; } //# sourceMappingURL=BaseResourceGeneratorStrategy.d.ts.map