{"version":3,"sources":["/Users/shyun/comcom/ain-enterprise/ain-adk/dist/cjs/chunk-3FSMQH6T.cjs","../../src/services/prompts/multi-trigger.ts"],"names":["multiTriggerPrompt"],"mappings":"AAAA;ACEA,MAAA,SAAe,kBAAA,CACd,YAAA,EACA,UAAA,EACC;AACD,EAAA,MAAMA,oBAAAA,EACJ,sBAAM,YAAA,2BAAc,cAAA,mBAAe,CAAA,6BAAG,qBAAA,0BAAA,CAAwB,IAAA,GAC/D,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AA0BD,EAAA,OAAO,CAAA;AAAA,SAAA,EAAA,iBACG,IAAI,IAAA,CAAK,CAAA,CAAA,CAAE,kBAAA,CAAmB,CAAC,CAAA;AAAA;AAAA,EAExCA,mBAAkB,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqBlB,UAAU,CAAA;AAAA,CAAA;AAEZ;AAEA,IAAO,sBAAA,EAAQ,kBAAA;ADPf;AACA;AACE;AACF,sDAAC","file":"/Users/shyun/comcom/ain-enterprise/ain-adk/dist/cjs/chunk-3FSMQH6T.cjs","sourcesContent":[null,"import type { MemoryModule } from \"@/modules\";\n\nasync function multiTriggerPrompt(\n\tmemoryModule: MemoryModule,\n\tintentList: string,\n) {\n\tconst multiTriggerPrompt =\n\t\t(await memoryModule?.getAgentMemory()?.getMultiTriggerPrompt?.()) ||\n\t\t`Instructions:\n1. **First, review the available intent list** to understand what intents are available and what each intent can handle\n2. **Identify which intents from the list are relevant** to the user's question\n3. **Decompose the question based on intent boundaries**:\n   - Prioritize splitting the query where each subquery can map to an intent from the available list\n   - If a portion of the query matches an available intent, create a subquery for it and set the intentName\n   - If a portion of the query does NOT match any available intent, still create a subquery for it but leave intentName empty/null\n   - Each subquery should be the minimal unit that represents a coherent request or action\n   - If the query maps to a single intent (or single action), keep it as one subquery\n4. For each subquery, provide a 2-3 sentence summary of what actions will be performed\n5. Maintain the logical sequence of the original question when splitting into subqueries\n6. **Important**: Use the intent list as a guide for decomposition, but don't force-fit queries into intents that don't match. It's acceptable to have subqueries without matching intents.\n7. Determine if the final response needs aggregation:\n   - Review all decomposed subqueries and their expected results\n   - Set needsAggregation to TRUE if: the results from multiple subqueries should be combined and synthesized into a single, unified response\n   - Set needsAggregation to FALSE if: the aggregation step is not required (e.g., only one subquery exists, OR the subqueries are independent and their individual results can be returned separately without combination)\n\nRequirements:\n- Prioritize using available intents when decomposing queries\n- Use intent boundaries as the primary guide for splitting, but allow subqueries without matching intents when necessary\n- Preserve the original meaning and context when splitting queries\n- Set intentName only when there's a clear match with an available intent; leave it empty/null otherwise\n- Even if the query is simple and maps to a single intent (or action), return it as a single-element array with one subquery object\n- Set needsAggregation based on whether the user expects a unified combined answer or separate responses\n`;\n\n\treturn `\nToday is ${new Date().toLocaleDateString()}.\n\n${multiTriggerPrompt}\n\nOutput Format:\nYou MUST return the output in the following JSON format. Do not include any other text before or after the JSON:\n{\n  \"needsAggregation\": <true or false>,\n  \"subqueries\": [\n    {\n      \"subquery\": \"<subquery_1>\",\n      \"intentName\": \"<intent_name_1>\",\n      \"actionPlan\": \"<2-3 sentence description of what will be done for this subquery>\"\n    },\n    {\n      \"subquery\": \"<subquery_2>\",\n      \"intentName\": \"<intent_name_2>\",\n      \"actionPlan\": \"<2-3 sentence description of what will be done for this subquery>\"\n    }\n  ]\n}\n\nAvailable intent list:\n${intentList}\n`;\n}\n\nexport default multiTriggerPrompt;\n"]}