import { InstructionAssistanceConfig, TagsChatAppOverridableFeature, AgentInstructionChatAppOverridableFeature, TagDefinition, TagDefinitionWidget } from '../types/chatbot/chatbot-types.mjs'; import '@aws-sdk/client-bedrock-agent-runtime'; import '@aws-sdk/client-bedrock-agentcore'; /** * IMPORTANT!!!!!!!!!!!!!!!!!!!!!! * * The functions in this utility are used both by the front end svelte kit web client in the browser * and in the backend lambda converse functions. So, that means it needs to be able * to run in a browser. Do not add additional imports beyond anodine types. * * To be super clear: this is just logic to generate instruction assistance content given * the right inputs. It does not collect up those inputs, it is given them. * */ /** * IMPORTANT!!!!!!!!!!!!!!!!!!!!!! * * See header at top of file for important notes. * * Generate instruction assistance content based on enabled features * * @param instructionAssistanceConfig - The instruction assistance configuration from SSM * @param tags - The tags configuration from the chat app * @param agentInstructionFeature - The agent instruction feature configuration from the chat app * @returns The instruction assistance content */ declare function generateInstructionAssistanceContent(instructionAssistanceConfig: InstructionAssistanceConfig | undefined, tags: TagsChatAppOverridableFeature | undefined, agentInstructionFeature: AgentInstructionChatAppOverridableFeature | undefined, tagDefinitions: TagDefinition[]): InstructionAssistanceConfig; /** * IMPORTANT!!!!!!!!!!!!!!!!!!!!!! * * See header at top of file for important notes. * * Apply instruction assistance to the base prompt using placeholder replacement */ declare function applyInstructionAssistance(basePrompt: string, instructionContent: InstructionAssistanceConfig): string; /** * IMPORTANT!!!!!!!!!!!!!!!!!!!!!! * * See header at top of file for important notes. * * Generate component-specific instruction content for direct component invocations * * @param tagDefinition - The tag definition with component invocation instructions * @param componentAgentInstructionName - The name of the instruction set to use * @param instructionAssistanceConfig - Optional instruction assistance config for placeholder replacement * @param agentInstructionFeature - Optional agent instruction feature to control which placeholders are replaced * @returns The component instruction content or undefined if not found */ declare function generateComponentInstructionContent(tagDefinition: TagDefinition, componentAgentInstructionName: string, instructionAssistanceConfig?: InstructionAssistanceConfig, agentInstructionFeature?: AgentInstructionChatAppOverridableFeature): string | undefined; /** * IMPORTANT!!!!!!!!!!!!!!!!!!!!!! * * See header at top of file for important notes. * * Apply instruction assistance placeholder replacement to component instructions * * @param componentInstructions - The raw component instructions with placeholders * @param instructionConfig - The instruction assistance configuration * @param agentInstructionFeature - The agent instruction feature configuration * @returns The component instructions with placeholders replaced */ declare function applyComponentInstructionAssistance(componentInstructions: string, instructionConfig: InstructionAssistanceConfig, agentInstructionFeature: AgentInstructionChatAppOverridableFeature): string; /** * IMPORTANT!!!!!!!!!!!!!!!!!!!!!! * * See header at top of file for important notes. * * Get the instruction assistance configuration from raw SSM parameters * * @param params - The raw SSM parameters * @returns The instruction assistance configuration */ declare function getInstructionsAssistanceConfigFromRawSsmParams(params: Record): InstructionAssistanceConfig; export { applyComponentInstructionAssistance, applyInstructionAssistance, generateComponentInstructionContent, generateInstructionAssistanceContent, getInstructionsAssistanceConfigFromRawSsmParams };