/** * Copyright 2023 Kapeta Inc. * SPDX-License-Identifier: BUSL-1.1 */ import { StormEvent } from './events'; import { BlockDefinitionInfo } from './event-parser'; import { StormStream } from './stream'; export declare class StormCodegen { private readonly userPrompt; private readonly blocks; private readonly out; private readonly events; private tmpDir; private readonly conversationId; private readonly uiSystemId?; constructor(conversationId: string, userPrompt: string, blocks: BlockDefinitionInfo[], events: StormEvent[], uiSystemId?: string); setTmpDir(tmpDir: string): void; process(): Promise; isAborted(): boolean; getStream(): StormStream; private handleTemplateFileOutput; private handleError; private handleUiOutput; private handleFileEvents; private handleFileDoneOutput; private getBasePath; /** * Generates the code for a block and sends it to the AI */ private processBlockCode; private emitBlockStatusDone; private emitBlockStatus; removePrefix(prefix: string, str: string): string; /** * Emits the text-based files to the stream */ private emitStaticFiles; private emitFile; /** * Sends the template to the AI and processes the response */ private processTemplates; /** * Converts the generated files to a format that can be sent to the AI */ private toStormFiles; /** * Generates the code using codegen for a given block. */ private generateBlock; private cloneArchetype; abort(): void; }