{"version":3,"sources":["../../../src/agents/requirement/prompts.ts"],"names":["RequirementAgentSystemPrompt","PromptTemplate","schema","RequirementAgentSystemPromptInputSchema","template","defaults","role","instructions","functions","formatDate","Date","toISOString","split","RequirementAgentTaskPrompt","RequirementAgentTaskPromptInputSchema","RequirementAgentToolErrorPrompt","RequirementAgentToolErrorPromptInputSchema","RequirementAgentToolNoResultPrompt","RequirementAgentToolNoResultPromptInputSchema"],"mappings":";;;;;;;AAaO,MAAMA,4BAAAA,GAA+B,IAAIC,2BAAAA,CAAe;EAC7DC,MAAAA,EAAQC,iDAAAA;EACRC,QAAAA,EAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDVC,QAAAA,EAAU;IACRC,IAAAA,EAAM,wBAAA;IACNC,YAAAA,EAAc;AAChB,GAAA;EACAC,SAAAA,EAAW;IACTC,UAAAA,kBAAY,MAAA,CAAA,MAAA,iBAAM,IAAIC,IAAAA,EAAAA,EAAOC,WAAAA,GAAcC,KAAAA,CAAM,GAAA,CAAA,CAAK,CAAA,CAAA,EAA1C,YAAA;AACd;AACF,CAAA;AAEO,MAAMC,0BAAAA,GAA6B,IAAIZ,2BAAAA,CAAe;EAC3DC,MAAAA,EAAQY,+CAAAA;EACRV,QAAAA,EAAU,CAAA;;;;;;;;;;AAUZ,CAAA;AAEO,MAAMW,+BAAAA,GAAkC,IAAId,2BAAAA,CAAe;EAChEC,MAAAA,EAAQc,oDAAAA;EACRZ,QAAAA,EAAU,CAAA;;;AAGZ,CAAA;AAEO,MAAMa,kCAAAA,GAAqC,IAAIhB,2BAAAA,CAAe;EACnEC,MAAAA,EAAQgB,uDAAAA;EACRd,QAAAA,EAAU,CAAA,6EAAA;AACZ,CAAA","file":"prompts.cjs","sourcesContent":["/**\n * Copyright 2025 © BeeAI a Series of LF Projects, LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { PromptTemplate } from \"@/template.js\";\nimport {\n  RequirementAgentSystemPromptInputSchema,\n  RequirementAgentTaskPromptInputSchema,\n  RequirementAgentToolErrorPromptInputSchema,\n  RequirementAgentToolNoResultPromptInputSchema,\n} from \"@/agents/requirement/types.js\";\n\nexport const RequirementAgentSystemPrompt = new PromptTemplate({\n  schema: RequirementAgentSystemPromptInputSchema,\n  template: `# Role\nAssume the role of {{role}}.\n\n# Instructions\n{{#instructions}}\n{{{.}}}\n{{/instructions}}\nWhen the user sends a message, figure out a solution and provide a final answer to the user by calling the '{{finalAnswerName}}' tool.\n{{#finalAnswerSchema}}\nThe final answer must fulfill the following.\n\n\\`\\`\\`\n{{{finalAnswerSchema}}}\n\\`\\`\\`\n{{/finalAnswerSchema}}\n{{#finalAnswerInstructions}}\n{{{finalAnswerInstructions}}}\n{{/finalAnswerInstructions}}\n\nIMPORTANT: The facts mentioned in the final answer must be backed by evidence provided by relevant tool outputs.\n\n# Tools\nYou must use a tool to retrieve factual or historical information.\nNever use the tool twice with the same input if not stated otherwise.\n\n{{#tools.0}}\n{{#tools}}\nName: {{name}}\nDescription: {{description}}\nAllowed: {{allowed}}{{#reason}}\nReason: {{{.}}}{{/reason}}\n\n{{/tools}}\n{{/tools.0}}\n\n# Notes\n- Use markdown syntax to format code snippets, links, JSON, tables, images, and files.\n- If the provided task is unclear, ask the user for clarification.\n- Do not refer to tools or tool outputs by name when responding.\n- Always take it one step at a time. Don't try to do multiple things at once.\n- When the tool doesn't give you what you were asking for, you must either use another tool or a different tool input.\n- You should always try a few different approaches before declaring the problem unsolvable.\n- If you can't fully answer the user's question, answer partially and describe what you couldn't achieve.\n- You cannot do complex calculations, computations, or data manipulations without using tools.\n- The current date and time is: {{formatDate}}\n{{#notes}}\n{{{.}}}\n{{/notes}}`,\n  defaults: {\n    role: \"a helpful AI assistant\",\n    instructions: \"\",\n  },\n  functions: {\n    formatDate: () => new Date().toISOString().split(\"T\")[0],\n  },\n});\n\nexport const RequirementAgentTaskPrompt = new PromptTemplate({\n  schema: RequirementAgentTaskPromptInputSchema,\n  template: `{{#context}}This is the context relevant to the task:\n{{{.}}}\n\n{{/context}}\n{{#expectedOutput}}\nThis is the expected criteria for your output:\n{{.}}\n\n{{/expectedOutput}}\nYour task: {{prompt}}`,\n});\n\nexport const RequirementAgentToolErrorPrompt = new PromptTemplate({\n  schema: RequirementAgentToolErrorPromptInputSchema,\n  template: `The tool has failed; the error log is shown below. If the tool cannot accomplish what you want, use a different tool or explain why you can't use it.\n\n{{{reason}}}`,\n});\n\nexport const RequirementAgentToolNoResultPrompt = new PromptTemplate({\n  schema: RequirementAgentToolNoResultPromptInputSchema,\n  template: `No results were found! Try to reformulate your query or use a different tool.`,\n});\n"]}