@elizaos/core 2.0.0-alpha.113 → 2.0.0-alpha.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/actions.d.ts +4 -4
  2. package/dist/actions.d.ts.map +1 -1
  3. package/dist/advanced-capabilities/actions/followRoom.d.ts.map +1 -1
  4. package/dist/advanced-capabilities/actions/muteRoom.d.ts.map +1 -1
  5. package/dist/advanced-capabilities/actions/roles.d.ts.map +1 -1
  6. package/dist/advanced-capabilities/actions/sendMessage.d.ts.map +1 -1
  7. package/dist/advanced-capabilities/actions/settings.d.ts.map +1 -1
  8. package/dist/advanced-capabilities/actions/unfollowRoom.d.ts.map +1 -1
  9. package/dist/advanced-capabilities/actions/unmuteRoom.d.ts.map +1 -1
  10. package/dist/advanced-capabilities/actions/updateEntity.d.ts.map +1 -1
  11. package/dist/advanced-capabilities/evaluators/reflection.d.ts.map +1 -1
  12. package/dist/advanced-memory/evaluators/long-term-extraction.d.ts.map +1 -1
  13. package/dist/advanced-memory/evaluators/summarization.d.ts.map +1 -1
  14. package/dist/advanced-memory/prompts.d.ts +3 -3
  15. package/dist/advanced-memory/prompts.d.ts.map +1 -1
  16. package/dist/advanced-planning/services/planning-service.d.ts.map +1 -1
  17. package/dist/basic-capabilities/providers/actions.d.ts.map +1 -1
  18. package/dist/basic-capabilities/providers/character.d.ts.map +1 -1
  19. package/dist/basic-capabilities/providers/providers.d.ts.map +1 -1
  20. package/dist/basic-capabilities/providers/recentMessages.d.ts.map +1 -1
  21. package/dist/browser/index.browser.js +1356 -2128
  22. package/dist/browser/index.browser.js.map +39 -35
  23. package/dist/edge/index.edge.js +3971 -2004
  24. package/dist/edge/index.edge.js.map +40 -35
  25. package/dist/entities.d.ts +1 -1
  26. package/dist/entities.d.ts.map +1 -1
  27. package/dist/generated/action-docs.d.ts +6 -6
  28. package/dist/index.d.ts +12 -3
  29. package/dist/node/index.node.js +3956 -1989
  30. package/dist/node/index.node.js.map +42 -37
  31. package/dist/plugin-lifecycle.d.ts.map +1 -1
  32. package/dist/prompts.d.ts +65 -83
  33. package/dist/prompts.d.ts.map +1 -1
  34. package/dist/runtime.d.ts +17 -3
  35. package/dist/runtime.d.ts.map +1 -1
  36. package/dist/services/message.d.ts +2 -2
  37. package/dist/services/message.d.ts.map +1 -1
  38. package/dist/types/components.d.ts +22 -0
  39. package/dist/types/components.d.ts.map +1 -1
  40. package/dist/types/message-service.d.ts +16 -2
  41. package/dist/types/message-service.d.ts.map +1 -1
  42. package/dist/types/model.d.ts +84 -2
  43. package/dist/types/model.d.ts.map +1 -1
  44. package/dist/types/plugin.d.ts +7 -1
  45. package/dist/types/plugin.d.ts.map +1 -1
  46. package/dist/types/runtime.d.ts +7 -5
  47. package/dist/types/runtime.d.ts.map +1 -1
  48. package/dist/utils/context-routing.d.ts +25 -0
  49. package/dist/utils/context-routing.d.ts.map +1 -0
  50. package/dist/utils/deterministic.d.ts +9 -0
  51. package/dist/utils/deterministic.d.ts.map +1 -0
  52. package/dist/utils/toon.d.ts +6 -0
  53. package/dist/utils/toon.d.ts.map +1 -0
  54. package/dist/utils.d.ts +6 -5
  55. package/dist/utils.d.ts.map +1 -1
  56. package/dist/validation/index.d.ts +1 -0
  57. package/dist/validation/index.d.ts.map +1 -1
  58. package/dist/validation/keywords.d.ts +26 -0
  59. package/dist/validation/keywords.d.ts.map +1 -0
  60. package/package.json +4 -3
  61. package/dist/browser/index.d.ts +0 -2
  62. package/dist/edge/index.d.ts +0 -2
  63. package/dist/index.browser.js +0 -2
  64. package/dist/index.js +0 -2
  65. package/dist/index.node.js +0 -2
  66. package/dist/node/index.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-lifecycle.d.ts","sourceRoot":"","sources":["../src/plugin-lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,MAAM,EAGN,eAAe,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA6DrD,KAAK,0BAA0B,GAAG,aAAa,GAAG;IACjD,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACtD,uBAAuB,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IACvE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,CACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC1B,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,eAAe,GAAG,IAAI,CAAC;IACpE,qBAAqB,CAAC,EAAE,MAAM,eAAe,EAAE,CAAC;CAChD,CAAC;AAsbF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAmR1E;AAED,wBAAgB,8BAA8B,CAC7C,OAAO,EAAE,aAAa,GAAG,IAAI,GAC3B,OAAO,IAAI,0BAA0B,CAUvC"}
1
+ {"version":3,"file":"plugin-lifecycle.d.ts","sourceRoot":"","sources":["../src/plugin-lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,MAAM,EAGN,eAAe,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA6DrD,KAAK,0BAA0B,GAAG,aAAa,GAAG;IACjD,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACtD,uBAAuB,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IACvE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,CACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC1B,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,eAAe,GAAG,IAAI,CAAC;IACpE,qBAAqB,CAAC,EAAE,MAAM,eAAe,EAAE,CAAC;CAChD,CAAC;AAqcF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAuR1E;AAED,wBAAgB,8BAA8B,CAC7C,OAAO,EAAE,aAAa,GAAG,IAAI,GAC3B,OAAO,IAAI,0BAA0B,CAUvC"}
package/dist/prompts.d.ts CHANGED
@@ -1,86 +1,68 @@
1
- export declare const shouldRespondTemplate = "task: Decide whether {{agentName}} should respond, ignore, or stop.\n\ncontext:\n{{providers}}\n\nrules[6]:\n- direct mention of {{agentName}} -> RESPOND\n- different assistant name -> IGNORE\n- continuing an active thread with {{agentName}} -> RESPOND\n- request to stop or be quiet -> STOP\n- talking to someone else -> IGNORE\n- if unsure, prefer IGNORE over hallucinating relevance\n\ndecision_note:\n- talking TO {{agentName}} means name mention, reply chain, or direct continuation\n- talking ABOUT {{agentName}} is not enough\n\n<output>\nXML only. Return exactly one <response> block. No prose before or after it. No <think>.\n\nExample:\n<response>\n <name>{{agentName}}</name>\n <reasoning>Direct mention and clear follow-up.</reasoning>\n <action>RESPOND | IGNORE | STOP</action>\n</response>\n</output>";
2
- export declare const messageHandlerTemplate = "task: Generate dialog and actions for {{agentName}}.\n\ncontext:\n{{providers}}\n\nrules[8]:\n- think briefly, then respond\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include a <params> block with the required fields\n- if a required param is unknown, ask for clarification in <text>\n\ncontrol_actions:\n- STOP means the task is done and the agent should end the run without executing more actions\n- STOP is a terminal control action even if it is not listed in available actions\n\nfields[5]{name,meaning}:\n- thought | short plan\n- actions | ordered XML <action> elements\n- providers | comma-separated provider names, or empty\n- text | next message for {{agentName}}\n- simple | true or false\n\nformatting:\n- wrap multi-line code in fenced code blocks\n- use inline backticks for short code identifiers\n\n<output>\nXML only. Return exactly one <response> block. No prose before or after it. No <think>.\n\nExample:\n<response>\n <thought>Reply briefly. No extra providers needed.</thought>\n <actions>\n <action>\n <name>REPLY</name>\n </action>\n </actions>\n <providers></providers>\n <text>Your message here</text>\n <simple>true</simple>\n</response>\n</output>";
3
- export declare const postCreationTemplate = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{xUserName}}.\n\nExample task outputs:\n1. A post about the importance of AI in our lives\n<response>\n <thought>I am thinking about writing a post about the importance of AI in our lives</thought>\n <post>AI is changing the world and it is important to understand how it works</post>\n <imagePrompt>A futuristic cityscape with flying cars and people using AI to do things</imagePrompt>\n</response>\n\n2. A post about dogs\n<response>\n <thought>I am thinking about writing a post about dogs</thought>\n <post>Dogs are man's best friend and they are loyal and loving</post>\n <imagePrompt>A dog playing with a ball in a park</imagePrompt>\n</response>\n\n3. A post about finding a new job\n<response>\n <thought>Getting a job is hard, I bet there's a good post in that</thought>\n <post>Just keep going!</post>\n <imagePrompt>A person looking at a computer screen with a job search website</imagePrompt>\n</response>\n\n{{providers}}\n\nWrite a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.\nYour response should be 1, 2, or 3 sentences (choose the length at random).\nYour response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.\n\nYour output should be formatted in XML like this:\n<response>\n <thought>Your thought here</thought>\n <post>Your post text here</post>\n <imagePrompt>Optional image prompt here</imagePrompt>\n</response>\n\nThe \"post\" field should be the post you want to send. Do not including any thinking or internal reflection in the \"post\" field.\nThe \"imagePrompt\" field is optional and should be a prompt for an image that is relevant to the post. It should be a single sentence that captures the essence of the post. ONLY USE THIS FIELD if it makes sense that the post would benefit from an image.\nThe \"thought\" field should be a short description of what the agent is thinking about before responding, including a brief justification for the response. Includate an explanation how the post is relevant to the topic but unique and different than other posts.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
1
+ /**
2
+ * Auto-generated prompt templates for elizaOS
3
+ * DO NOT EDIT - Generated from packages/prompts/prompts/*.txt
4
+ *
5
+ * These prompts use Handlebars-style template syntax:
6
+ * - {{variableName}} for simple substitution
7
+ * - {{#each items}}...{{/each}} for iteration
8
+ * - {{#if condition}}...{{/if}} for conditionals
9
+ */
10
+ export declare const addContactTemplate = "task: Extract contact information to add to the rolodex.\n\ncontext:\n{{providers}}\n\nrecent_messages:\n{{recentMessages}}\n\ncurrent_message:\n{{message}}\n\ninstructions[5]:\n- identify the contact name being added\n- include entityId only if it is explicitly known from context\n- return categories as a comma-separated list\n- include notes, timezone, and language only when clearly present\n- include a short reason for why this contact should be saved\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\nentityId:\ncategories: vip,colleague\nnotes: Met at the design summit\ntimezone: America/New_York\nlanguage: English\nreason: Important collaborator to remember";
11
+ export declare const ADD_CONTACT_TEMPLATE = "task: Extract contact information to add to the rolodex.\n\ncontext:\n{{providers}}\n\nrecent_messages:\n{{recentMessages}}\n\ncurrent_message:\n{{message}}\n\ninstructions[5]:\n- identify the contact name being added\n- include entityId only if it is explicitly known from context\n- return categories as a comma-separated list\n- include notes, timezone, and language only when clearly present\n- include a short reason for why this contact should be saved\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\nentityId:\ncategories: vip,colleague\nnotes: Met at the design summit\ntimezone: America/New_York\nlanguage: English\nreason: Important collaborator to remember";
12
+ export declare const autonomyContinuousContinueTemplate = "Your job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- Use thinking to think about and plan what you want to do.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n- If you don't need to make a change this round, take no action and output only a <thought>.\n- If you cannot act, explain what is missing inside <thought> and take no action.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue from that note. Output <thought> and take action if needed.";
13
+ export declare const AUTONOMY_CONTINUOUS_CONTINUE_TEMPLATE = "Your job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- Use thinking to think about and plan what you want to do.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n- If you don't need to make a change this round, take no action and output only a <thought>.\n- If you cannot act, explain what is missing inside <thought> and take no action.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue from that note. Output <thought> and take action if needed.";
14
+ export declare const autonomyContinuousFirstTemplate = "Your job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- Use thinking to think about and plan what you want to do.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n- If you don't need to make a change this round, take no action and output only a <thought>.\n- If you cannot act, explain what is missing inside <thought> and take no action.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nThink briefly, then output <thought> and take action if needed.";
15
+ export declare const AUTONOMY_CONTINUOUS_FIRST_TEMPLATE = "Your job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- Use thinking to think about and plan what you want to do.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n- If you don't need to make a change this round, take no action and output only a <thought>.\n- If you cannot act, explain what is missing inside <thought> and take no action.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nThink briefly, then output <thought> and take action if needed.";
16
+ export declare const autonomyTaskContinueTemplate = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- Use thinking to think about and plan what you want to do.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n- If you don't need to make a change this round, take no action and output only a <thought>.\n- If you cannot act, explain what is missing inside <thought> and take no action.\n- Keep the response concise, focused on the next action.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue the task. Output <thought> and take action now.";
17
+ export declare const AUTONOMY_TASK_CONTINUE_TEMPLATE = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- Use thinking to think about and plan what you want to do.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n- If you don't need to make a change this round, take no action and output only a <thought>.\n- If you cannot act, explain what is missing inside <thought> and take no action.\n- Keep the response concise, focused on the next action.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue the task. Output <thought> and take action now.";
18
+ export declare const autonomyTaskFirstTemplate = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- If you need UI control, use ComputerUse actions.\n- In MCP mode, selector-based actions require a process scope (pass process=... or prefix selector with \"process:<name> >> ...\").\n- Prefer safe, incremental steps; if unsure, gather more UI context before acting.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nDecide what to do next. Output <thought>, then take the most useful action.";
19
+ export declare const AUTONOMY_TASK_FIRST_TEMPLATE = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- If you need UI control, use ComputerUse actions.\n- In MCP mode, selector-based actions require a process scope (pass process=... or prefix selector with \"process:<name> >> ...\").\n- Prefer safe, incremental steps; if unsure, gather more UI context before acting.\n- Do NOT speak out loud. This loop is internal-only.\n- Output structure: ONLY a <thought> plus any actions. No other message text.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nDecide what to do next. Output <thought>, then take the most useful action.";
20
+ export declare const chooseOptionTemplate = "# Task: Choose an option from the available choices.\n\n{{providers}}\n\n# Available Options:\n{{options}}\n\n# Instructions: \nAnalyze the options and select the most appropriate one based on the current context.\nProvide your reasoning and the selected option ID.\n\nRespond using TOON like this:\nthought: Your reasoning for the selection\nselected_id: The ID of the selected option\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
21
+ export declare const CHOOSE_OPTION_TEMPLATE = "# Task: Choose an option from the available choices.\n\n{{providers}}\n\n# Available Options:\n{{options}}\n\n# Instructions: \nAnalyze the options and select the most appropriate one based on the current context.\nProvide your reasoning and the selected option ID.\n\nRespond using TOON like this:\nthought: Your reasoning for the selection\nselected_id: The ID of the selected option\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
22
+ export declare const imageDescriptionTemplate = "Task: Analyze the provided image and generate a comprehensive description with multiple levels of detail.\n\nInstructions:\nCarefully examine the image and provide:\n1. A concise, descriptive title that captures the main subject or scene\n2. A brief summary description (1-2 sentences) highlighting the key elements\n3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details\n\nBe objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.\n\nOutput:\n\nRespond using TOON like this:\ntitle: A concise, descriptive title for the image\ndescription: A brief 1-2 sentence summary of the key elements in the image\ntext: An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
23
+ export declare const IMAGE_DESCRIPTION_TEMPLATE = "Task: Analyze the provided image and generate a comprehensive description with multiple levels of detail.\n\nInstructions:\nCarefully examine the image and provide:\n1. A concise, descriptive title that captures the main subject or scene\n2. A brief summary description (1-2 sentences) highlighting the key elements\n3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details\n\nBe objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.\n\nOutput:\n\nRespond using TOON like this:\ntitle: A concise, descriptive title for the image\ndescription: A brief 1-2 sentence summary of the key elements in the image\ntext: An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
24
+ export declare const imageGenerationTemplate = "# Task: Generate an image prompt for {{agentName}}.\n\n{{providers}}\n\n# Instructions:\nBased on the conversation, create a detailed prompt for image generation.\nThe prompt should be specific, descriptive, and suitable for AI image generation.\n\n# Recent conversation:\n{{recentMessages}}\n\nRespond using TOON like this:\nthought: Your reasoning for the image prompt\nprompt: Detailed image generation prompt\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
25
+ export declare const IMAGE_GENERATION_TEMPLATE = "# Task: Generate an image prompt for {{agentName}}.\n\n{{providers}}\n\n# Instructions:\nBased on the conversation, create a detailed prompt for image generation.\nThe prompt should be specific, descriptive, and suitable for AI image generation.\n\n# Recent conversation:\n{{recentMessages}}\n\nRespond using TOON like this:\nthought: Your reasoning for the image prompt\nprompt: Detailed image generation prompt\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
26
+ export declare const messageHandlerTemplate = "task: Generate dialog and actions for {{agentName}}.\n\ncontext:\n{{providers}}\n\nrules[8]:\n- think briefly, then respond\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include them under params keyed by action name\n- if a required param is unknown, ask for clarification in text\n\ncontrol_actions:\n- STOP means the task is done and the agent should end the run without executing more actions\n- STOP is a terminal control action even if it is not listed in available actions\n\nfields[5]{name,meaning}:\n- thought | short plan\n- actions | ordered array of action names\n- providers | array of provider names, or empty\n- text | next message for {{agentName}}\n- simple | true or false\n- params | optional object keyed by action name containing required inputs\n\nformatting:\n- wrap multi-line code in fenced code blocks\n- use inline backticks for short code identifiers\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\nthought: Reply briefly. No extra providers needed.\nactions[1]: REPLY\nproviders[0]:\ntext: Your message here\nsimple: true";
27
+ export declare const MESSAGE_HANDLER_TEMPLATE = "task: Generate dialog and actions for {{agentName}}.\n\ncontext:\n{{providers}}\n\nrules[8]:\n- think briefly, then respond\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include them under params keyed by action name\n- if a required param is unknown, ask for clarification in text\n\ncontrol_actions:\n- STOP means the task is done and the agent should end the run without executing more actions\n- STOP is a terminal control action even if it is not listed in available actions\n\nfields[5]{name,meaning}:\n- thought | short plan\n- actions | ordered array of action names\n- providers | array of provider names, or empty\n- text | next message for {{agentName}}\n- simple | true or false\n- params | optional object keyed by action name containing required inputs\n\nformatting:\n- wrap multi-line code in fenced code blocks\n- use inline backticks for short code identifiers\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\nthought: Reply briefly. No extra providers needed.\nactions[1]: REPLY\nproviders[0]:\ntext: Your message here\nsimple: true";
28
+ export declare const multiStepDecisionTemplate = "Determine the next step the assistant should take in this conversation to help the user reach their goal.\n\n{{recentMessages}}\n\n# Multi-Step Workflow\n\nIn each step, decide:\n\n1. **Which providers (if any)** should be called to gather necessary data.\n2. **Which action (if any)** should be executed after providers return.\n3. Decide whether the task is complete. If so, set `isFinish: true`. Do not select the `REPLY` action; replies are handled separately after task completion.\n\nYou can select **multiple providers** and at most **one action** per step.\n\nIf the task is fully resolved and no further steps are needed, mark the step as `isFinish: true`.\n\n---\n\n{{actionsWithDescriptions}}\n\n{{providersWithDescriptions}}\n\nThese are the actions or data provider calls that have already been used in this run. Use this to avoid redundancy and guide your next move.\n\n{{actionResults}}\n\nkeys:\n\"thought\" Clearly explain your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request.\n\"action\" Name of the action to execute after providers return (can be empty if no action is needed).\n\"providers\" List of provider names to call in this step (can be empty if none are needed).\n\"isFinish\" Set to true only if the task is fully complete.\n\n\u26A0\uFE0F IMPORTANT: Do **not** mark the task as `isFinish: true` immediately after calling an action. Wait for the action to complete before deciding the task is finished.\n\noutput:\nthought: Your thought here\naction: ACTION\nproviders[2]: PROVIDER1,PROVIDER2\nisFinish: false";
29
+ export declare const MULTI_STEP_DECISION_TEMPLATE = "Determine the next step the assistant should take in this conversation to help the user reach their goal.\n\n{{recentMessages}}\n\n# Multi-Step Workflow\n\nIn each step, decide:\n\n1. **Which providers (if any)** should be called to gather necessary data.\n2. **Which action (if any)** should be executed after providers return.\n3. Decide whether the task is complete. If so, set `isFinish: true`. Do not select the `REPLY` action; replies are handled separately after task completion.\n\nYou can select **multiple providers** and at most **one action** per step.\n\nIf the task is fully resolved and no further steps are needed, mark the step as `isFinish: true`.\n\n---\n\n{{actionsWithDescriptions}}\n\n{{providersWithDescriptions}}\n\nThese are the actions or data provider calls that have already been used in this run. Use this to avoid redundancy and guide your next move.\n\n{{actionResults}}\n\nkeys:\n\"thought\" Clearly explain your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request.\n\"action\" Name of the action to execute after providers return (can be empty if no action is needed).\n\"providers\" List of provider names to call in this step (can be empty if none are needed).\n\"isFinish\" Set to true only if the task is fully complete.\n\n\u26A0\uFE0F IMPORTANT: Do **not** mark the task as `isFinish: true` immediately after calling an action. Wait for the action to complete before deciding the task is finished.\n\noutput:\nthought: Your thought here\naction: ACTION\nproviders[2]: PROVIDER1,PROVIDER2\nisFinish: false";
30
+ export declare const multiStepSummaryTemplate = "Summarize what the assistant has done so far and provide a final response to the user based on the completed steps.\n\n# Context Information\n{{bio}}\n\n---\n\n{{system}}\n\n---\n\n{{messageDirections}}\n\n# Conversation Summary\nBelow is the user's original request and conversation so far:\n{{recentMessages}}\n\n# Execution Trace\nHere are the actions taken by the assistant to fulfill the request:\n{{actionResults}}\n\n# Assistant's Last Reasoning Step\n{{recentMessage}}\n\n# Instructions\n\n - Review the execution trace and last reasoning step carefully\n\n - Your final output MUST be TOON in this format:\noutput:\nthought: Your thought here\ntext: Your final message to the user";
31
+ export declare const MULTI_STEP_SUMMARY_TEMPLATE = "Summarize what the assistant has done so far and provide a final response to the user based on the completed steps.\n\n# Context Information\n{{bio}}\n\n---\n\n{{system}}\n\n---\n\n{{messageDirections}}\n\n# Conversation Summary\nBelow is the user's original request and conversation so far:\n{{recentMessages}}\n\n# Execution Trace\nHere are the actions taken by the assistant to fulfill the request:\n{{actionResults}}\n\n# Assistant's Last Reasoning Step\n{{recentMessage}}\n\n# Instructions\n\n - Review the execution trace and last reasoning step carefully\n\n - Your final output MUST be TOON in this format:\noutput:\nthought: Your thought here\ntext: Your final message to the user";
32
+ export declare const optionExtractionTemplate = "# Task: Extract selected task and option from user message\n\n# Available Tasks:\n{{tasks}}\n\n# Recent Messages:\n{{recentMessages}}\n\n# Instructions:\n1. Review the user's message and identify which task and option they are selecting\n2. Match against the available tasks and their options, including ABORT\n3. Return the task ID (shortened UUID) and selected option name exactly as listed above\n4. If no clear selection is made, return null for both fields\n\n\nReturn in TOON format:\ntaskId: string_or_null\nselectedOption: OPTION_NAME_or_null\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
33
+ export declare const OPTION_EXTRACTION_TEMPLATE = "# Task: Extract selected task and option from user message\n\n# Available Tasks:\n{{tasks}}\n\n# Recent Messages:\n{{recentMessages}}\n\n# Instructions:\n1. Review the user's message and identify which task and option they are selecting\n2. Match against the available tasks and their options, including ABORT\n3. Return the task ID (shortened UUID) and selected option name exactly as listed above\n4. If no clear selection is made, return null for both fields\n\n\nReturn in TOON format:\ntaskId: string_or_null\nselectedOption: OPTION_NAME_or_null\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
34
+ export declare const postActionDecisionTemplate = "Continue helping the user after reviewing the latest action results.\n\ncontext:\n{{providers}}\n\nrecent conversation:\n{{recentMessages}}\n\nrecent action results:\n{{actionResults}}\n\nrules[9]:\n- think briefly, then continue the task from the latest action results\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include them under params keyed by action name\n- if a required param is unknown, ask for clarification in text\n- if the task is complete, either reply to the user or use STOP to end the run\n- STOP is a terminal control action even if it is not listed in available actions\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nthought: Your thought here\nactions[1]: ACTION\nproviders[0]:\ntext: Your message here\nsimple: true";
35
+ export declare const POST_ACTION_DECISION_TEMPLATE = "Continue helping the user after reviewing the latest action results.\n\ncontext:\n{{providers}}\n\nrecent conversation:\n{{recentMessages}}\n\nrecent action results:\n{{actionResults}}\n\nrules[9]:\n- think briefly, then continue the task from the latest action results\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include them under params keyed by action name\n- if a required param is unknown, ask for clarification in text\n- if the task is complete, either reply to the user or use STOP to end the run\n- STOP is a terminal control action even if it is not listed in available actions\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nthought: Your thought here\nactions[1]: ACTION\nproviders[0]:\ntext: Your message here\nsimple: true";
36
+ export declare const postCreationTemplate = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{xUserName}}.\n\nExample task outputs:\n1. A post about the importance of AI in our lives\nthought: I am thinking about writing a post about the importance of AI in our lives\npost: AI is changing the world and it is important to understand how it works\nimagePrompt: A futuristic cityscape with flying cars and people using AI to do things\n\n2. A post about dogs\nthought: I am thinking about writing a post about dogs\npost: Dogs are man's best friend and they are loyal and loving\nimagePrompt: A dog playing with a ball in a park\n\n3. A post about finding a new job\nthought: Getting a job is hard, I bet there's a good post in that\npost: Just keep going!\nimagePrompt: A person looking at a computer screen with a job search website\n\n{{providers}}\n\nWrite a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.\nYour response should be 1, 2, or 3 sentences (choose the length at random).\nYour response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.\n\nYour output should be formatted as TOON like this:\nthought: Your thought here\npost: Your post text here\nimagePrompt: Optional image prompt here\n\nThe \"post\" field should be the post you want to send. Do not including any thinking or internal reflection in the \"post\" field.\nThe \"imagePrompt\" field is optional and should be a prompt for an image that is relevant to the post. It should be a single sentence that captures the essence of the post. ONLY USE THIS FIELD if it makes sense that the post would benefit from an image.\nThe \"thought\" field should be a short description of what the agent is thinking about before responding, including a brief justification for the response. Includate an explanation how the post is relevant to the topic but unique and different than other posts.\n\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
37
+ export declare const POST_CREATION_TEMPLATE = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{xUserName}}.\n\nExample task outputs:\n1. A post about the importance of AI in our lives\nthought: I am thinking about writing a post about the importance of AI in our lives\npost: AI is changing the world and it is important to understand how it works\nimagePrompt: A futuristic cityscape with flying cars and people using AI to do things\n\n2. A post about dogs\nthought: I am thinking about writing a post about dogs\npost: Dogs are man's best friend and they are loyal and loving\nimagePrompt: A dog playing with a ball in a park\n\n3. A post about finding a new job\nthought: Getting a job is hard, I bet there's a good post in that\npost: Just keep going!\nimagePrompt: A person looking at a computer screen with a job search website\n\n{{providers}}\n\nWrite a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.\nYour response should be 1, 2, or 3 sentences (choose the length at random).\nYour response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.\n\nYour output should be formatted as TOON like this:\nthought: Your thought here\npost: Your post text here\nimagePrompt: Optional image prompt here\n\nThe \"post\" field should be the post you want to send. Do not including any thinking or internal reflection in the \"post\" field.\nThe \"imagePrompt\" field is optional and should be a prompt for an image that is relevant to the post. It should be a single sentence that captures the essence of the post. ONLY USE THIS FIELD if it makes sense that the post would benefit from an image.\nThe \"thought\" field should be a short description of what the agent is thinking about before responding, including a brief justification for the response. Includate an explanation how the post is relevant to the topic but unique and different than other posts.\n\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
38
+ export declare const reflectionEvaluatorTemplate = "# Task: Generate Agent Reflection, Extract Facts and Relationships\n\n{{providers}}\n\n# Examples:\n{{evaluationExamples}}\n\n# Entities in Room\n{{entitiesInRoom}}\n\n# Existing Relationships\n{{existingRelationships}}\n\n# Current Context:\nAgent Name: {{agentName}}\nRoom Type: {{roomType}}\nMessage Sender: {{senderName}} (ID: {{senderId}})\n\n{{recentMessages}}\n\n# Known Facts:\n{{knownFacts}}\n\n# Instructions:\n1. Generate a self-reflective thought on the conversation about your performance and interaction quality.\n2. Extract new facts from the conversation.\n3. Identify and describe relationships between entities.\n - The sourceEntityId is the UUID of the entity initiating the interaction.\n - The targetEntityId is the UUID of the entity being interacted with.\n - Relationships are one-direction, so a friendship would be two entity relationships where each entity is both the source and the target of the other.\n\n\nGenerate a response in the following TOON format:\nthought: a self-reflective thought on the conversation\nfacts[1]{claim,type,in_bio,already_known}:\n \"factual statement\",fact,false,false\nrelationships[1]{sourceEntityId,targetEntityId,tags}:\n entity_initiating_interaction,entity_being_interacted_with,\"group_interaction,voice_interaction,dm_interaction,additional_tag1,additional_tag2\"\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
39
+ export declare const REFLECTION_EVALUATOR_TEMPLATE = "# Task: Generate Agent Reflection, Extract Facts and Relationships\n\n{{providers}}\n\n# Examples:\n{{evaluationExamples}}\n\n# Entities in Room\n{{entitiesInRoom}}\n\n# Existing Relationships\n{{existingRelationships}}\n\n# Current Context:\nAgent Name: {{agentName}}\nRoom Type: {{roomType}}\nMessage Sender: {{senderName}} (ID: {{senderId}})\n\n{{recentMessages}}\n\n# Known Facts:\n{{knownFacts}}\n\n# Instructions:\n1. Generate a self-reflective thought on the conversation about your performance and interaction quality.\n2. Extract new facts from the conversation.\n3. Identify and describe relationships between entities.\n - The sourceEntityId is the UUID of the entity initiating the interaction.\n - The targetEntityId is the UUID of the entity being interacted with.\n - Relationships are one-direction, so a friendship would be two entity relationships where each entity is both the source and the target of the other.\n\n\nGenerate a response in the following TOON format:\nthought: a self-reflective thought on the conversation\nfacts[1]{claim,type,in_bio,already_known}:\n \"factual statement\",fact,false,false\nrelationships[1]{sourceEntityId,targetEntityId,tags}:\n entity_initiating_interaction,entity_being_interacted_with,\"group_interaction,voice_interaction,dm_interaction,additional_tag1,additional_tag2\"\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
40
+ export declare const reflectionTemplate = "# Task: Reflect on recent agent behavior and interactions.\n\n{{providers}}\n\n# Recent Interactions:\n{{recentInteractions}}\n\n# Instructions:\nAnalyze the agent's recent behavior and interactions. Consider:\n1. Was the communication clear and helpful?\n2. Were responses appropriate for the context?\n3. Were any mistakes made?\n4. What could be improved?\n\nRespond using TOON like this:\nthought: Your detailed analysis\nquality_score: Score 0-100 for overall quality\nstrengths: What went well\nimprovements: What could be improved\nlearnings: Key takeaways for future interactions\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
41
+ export declare const REFLECTION_TEMPLATE = "# Task: Reflect on recent agent behavior and interactions.\n\n{{providers}}\n\n# Recent Interactions:\n{{recentInteractions}}\n\n# Instructions:\nAnalyze the agent's recent behavior and interactions. Consider:\n1. Was the communication clear and helpful?\n2. Were responses appropriate for the context?\n3. Were any mistakes made?\n4. What could be improved?\n\nRespond using TOON like this:\nthought: Your detailed analysis\nquality_score: Score 0-100 for overall quality\nstrengths: What went well\nimprovements: What could be improved\nlearnings: Key takeaways for future interactions\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
42
+ export declare const removeContactTemplate = "task: Extract the contact removal request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[4]:\n- identify the contact name to remove\n- set confirmed to yes only when the user explicitly confirms removal\n- set confirmed to no when confirmation is absent or ambiguous\n- return only the requested contact\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\nconfirmed: yes";
43
+ export declare const REMOVE_CONTACT_TEMPLATE = "task: Extract the contact removal request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[4]:\n- identify the contact name to remove\n- set confirmed to yes only when the user explicitly confirms removal\n- set confirmed to no when confirmation is absent or ambiguous\n- return only the requested contact\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\nconfirmed: yes";
44
+ export declare const replyTemplate = "# Task: Generate dialog for the character {{agentName}}.\n\n{{providers}}\n\n# Instructions: Write the next message for {{agentName}}.\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"text\" should be the next message for {{agentName}} which they will send to the conversation.\n\nIMPORTANT CODE BLOCK FORMATTING RULES:\n- If {{agentName}} includes code examples, snippets, or multi-line code in the response, ALWAYS wrap the code with ``` fenced code blocks (specify the language if known, e.g., ```python).\n- ONLY use fenced code blocks for actual code. Do NOT wrap non-code text, instructions, or single words in fenced code blocks.\n- If including inline code (short single words or function names), use single backticks (`) as appropriate.\n- This ensures the user sees clearly formatted and copyable code when relevant.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the TOON response format without any preamble or explanation.\n\nRespond using TOON like this:\nthought: Your thought here\ntext: Your message here\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
45
+ export declare const REPLY_TEMPLATE = "# Task: Generate dialog for the character {{agentName}}.\n\n{{providers}}\n\n# Instructions: Write the next message for {{agentName}}.\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"text\" should be the next message for {{agentName}} which they will send to the conversation.\n\nIMPORTANT CODE BLOCK FORMATTING RULES:\n- If {{agentName}} includes code examples, snippets, or multi-line code in the response, ALWAYS wrap the code with ``` fenced code blocks (specify the language if known, e.g., ```python).\n- ONLY use fenced code blocks for actual code. Do NOT wrap non-code text, instructions, or single words in fenced code blocks.\n- If including inline code (short single words or function names), use single backticks (`) as appropriate.\n- This ensures the user sees clearly formatted and copyable code when relevant.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the TOON response format without any preamble or explanation.\n\nRespond using TOON like this:\nthought: Your thought here\ntext: Your message here\n\nIMPORTANT: Your response must ONLY contain the TOON document above. Do not include any text, thinking, or reasoning before or after it.";
46
+ export declare const scheduleFollowUpTemplate = "task: Extract follow-up scheduling information from the request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ncurrent_datetime:\n{{currentDateTime}}\n\ninstructions[5]:\n- identify who to follow up with\n- include entityId only when it is explicitly known\n- convert requested timing into an ISO datetime in scheduledAt\n- normalize priority to high, medium, or low\n- include message only when the user asked for a specific note or reminder text\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\nentityId:\nscheduledAt: 2026-04-06T14:00:00.000Z\nreason: Check in on the proposal\npriority: medium\nmessage: Send the latest deck before the call";
47
+ export declare const SCHEDULE_FOLLOW_UP_TEMPLATE = "task: Extract follow-up scheduling information from the request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ncurrent_datetime:\n{{currentDateTime}}\n\ninstructions[5]:\n- identify who to follow up with\n- include entityId only when it is explicitly known\n- convert requested timing into an ISO datetime in scheduledAt\n- normalize priority to high, medium, or low\n- include message only when the user asked for a specific note or reminder text\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\nentityId:\nscheduledAt: 2026-04-06T14:00:00.000Z\nreason: Check in on the proposal\npriority: medium\nmessage: Send the latest deck before the call";
48
+ export declare const searchContactsTemplate = "task: Extract contact search criteria from the request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[5]:\n- return categories as a comma-separated list when the user filters by category\n- return tags as a comma-separated list when the user filters by tags\n- return searchTerm for any name or free-text lookup\n- set intent to count when the user only wants a count, otherwise list\n- omit fields that are not clearly requested\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncategories: vip,colleague\nsearchTerm: Jane\ntags: ai,design\nintent: list";
49
+ export declare const SEARCH_CONTACTS_TEMPLATE = "task: Extract contact search criteria from the request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[5]:\n- return categories as a comma-separated list when the user filters by category\n- return tags as a comma-separated list when the user filters by tags\n- return searchTerm for any name or free-text lookup\n- set intent to count when the user only wants a count, otherwise list\n- omit fields that are not clearly requested\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncategories: vip,colleague\nsearchTerm: Jane\ntags: ai,design\nintent: list";
50
+ export declare const shouldFollowRoomTemplate = "task: Decide whether {{agentName}} should follow this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to follow, join, listen to, or stay engaged in this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
51
+ export declare const SHOULD_FOLLOW_ROOM_TEMPLATE = "task: Decide whether {{agentName}} should follow this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to follow, join, listen to, or stay engaged in this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
52
+ export declare const shouldMuteRoomTemplate = "task: Decide whether {{agentName}} should mute this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to mute, silence, or ignore this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
53
+ export declare const SHOULD_MUTE_ROOM_TEMPLATE = "task: Decide whether {{agentName}} should mute this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to mute, silence, or ignore this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
54
+ export declare const shouldRespondTemplate = "task: Decide whether {{agentName}} should respond, ignore, or stop.\n\ncontext:\n{{providers}}\n\navailable_contexts:\n{{availableContexts}}\n\nrules[6]:\n- direct mention of {{agentName}} -> RESPOND\n- different assistant name -> IGNORE\n- continuing an active thread with {{agentName}} -> RESPOND\n- request to stop or be quiet -> STOP\n- talking to someone else -> IGNORE\n- if unsure, prefer IGNORE over hallucinating relevance\n\ncontext_routing:\n- primaryContext: choose one context from available_contexts, or \"general\" if none apply\n- secondaryContexts: optional comma-separated list of additional relevant contexts\n- evidenceTurnIds: optional comma-separated list of memory IDs supporting the decision\n\ndecision_note:\n- talking TO {{agentName}} means name mention, reply chain, or direct continuation\n- talking ABOUT {{agentName}} is not enough\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\nname: {{agentName}}\nreasoning: Direct mention and clear follow-up.\naction: RESPOND\nprimaryContext: wallet\nsecondaryContexts:\nevidenceTurnIds:\n\nExample:\nname: {{agentName}}\nreasoning: Direct mention but no relevant action.\naction: IGNORE\nprimaryContext: general\nsecondaryContexts:\nevidenceTurnIds:";
55
+ export declare const SHOULD_RESPOND_TEMPLATE = "task: Decide whether {{agentName}} should respond, ignore, or stop.\n\ncontext:\n{{providers}}\n\navailable_contexts:\n{{availableContexts}}\n\nrules[6]:\n- direct mention of {{agentName}} -> RESPOND\n- different assistant name -> IGNORE\n- continuing an active thread with {{agentName}} -> RESPOND\n- request to stop or be quiet -> STOP\n- talking to someone else -> IGNORE\n- if unsure, prefer IGNORE over hallucinating relevance\n\ncontext_routing:\n- primaryContext: choose one context from available_contexts, or \"general\" if none apply\n- secondaryContexts: optional comma-separated list of additional relevant contexts\n- evidenceTurnIds: optional comma-separated list of memory IDs supporting the decision\n\ndecision_note:\n- talking TO {{agentName}} means name mention, reply chain, or direct continuation\n- talking ABOUT {{agentName}} is not enough\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\nname: {{agentName}}\nreasoning: Direct mention and clear follow-up.\naction: RESPOND\nprimaryContext: wallet\nsecondaryContexts:\nevidenceTurnIds:\n\nExample:\nname: {{agentName}}\nreasoning: Direct mention but no relevant action.\naction: IGNORE\nprimaryContext: general\nsecondaryContexts:\nevidenceTurnIds:";
56
+ export declare const shouldUnfollowRoomTemplate = "task: Decide whether {{agentName}} should unfollow this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to stop following or leave this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
57
+ export declare const SHOULD_UNFOLLOW_ROOM_TEMPLATE = "task: Decide whether {{agentName}} should unfollow this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to stop following or leave this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
58
+ export declare const shouldUnmuteRoomTemplate = "task: Decide whether {{agentName}} should unmute this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to unmute or resume listening to this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
59
+ export declare const SHOULD_UNMUTE_ROOM_TEMPLATE = "task: Decide whether {{agentName}} should unmute this room.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[3]:\n- return true only when the user is clearly asking {{agentName}} to unmute or resume listening to this room\n- return false when the request is ambiguous or unrelated\n- prefer false when uncertain\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ndecision: true";
60
+ export declare const updateContactTemplate = "task: Extract contact updates from the request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[6]:\n- identify the contact name to update\n- set operation to replace unless the user clearly says to add_to or remove_from\n- return categories and tags as comma-separated lists\n- return preferences and customFields as comma-separated key:value pairs\n- include notes only when explicitly requested\n- omit fields that are not being changed\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\noperation: add_to\ncategories: vip\ntags: ai,friend\npreferences: timezone:America/New_York,language:English\ncustomFields: company:Acme,title:Designer\nnotes: Prefers async communication";
61
+ export declare const UPDATE_CONTACT_TEMPLATE = "task: Extract contact updates from the request.\n\ncontext:\n{{providers}}\n\ncurrent_message:\n{{message}}\n\ninstructions[6]:\n- identify the contact name to update\n- set operation to replace unless the user clearly says to add_to or remove_from\n- return categories and tags as comma-separated lists\n- return preferences and customFields as comma-separated key:value pairs\n- include notes only when explicitly requested\n- omit fields that are not being changed\n\noutput:\nTOON only. Return exactly one TOON document. No prose before or after it. No <think>.\n\nExample:\ncontactName: Jane Doe\noperation: add_to\ncategories: vip\ntags: ai,friend\npreferences: timezone:America/New_York,language:English\ncustomFields: company:Acme,title:Designer\nnotes: Prefers async communication";
62
+ export declare const updateEntityTemplate = "# Task: Update entity information.\n\n{{providers}}\n\n# Current Entity Information:\n{{entityInfo}}\n\n# Instructions:\nBased on the request, determine what information about the entity should be updated.\nOnly update fields that the user has explicitly requested to change.\n\nRespond using TOON like this:\nthought: Your reasoning for the entity update\nentity_id: The entity ID to update\nupdates[1]{name,value}:\n field_name,new_value\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
63
+ export declare const UPDATE_ENTITY_TEMPLATE = "# Task: Update entity information.\n\n{{providers}}\n\n# Current Entity Information:\n{{entityInfo}}\n\n# Instructions:\nBased on the request, determine what information about the entity should be updated.\nOnly update fields that the user has explicitly requested to change.\n\nRespond using TOON like this:\nthought: Your reasoning for the entity update\nentity_id: The entity ID to update\nupdates[1]{name,value}:\n field_name,new_value\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
64
+ export declare const updateSettingsTemplate = "# Task: Update settings based on the request.\n\n{{providers}}\n\n# Current Settings:\n{{settings}}\n\n# Instructions:\nBased on the request, determine which settings to update.\nOnly update settings that the user has explicitly requested.\n\nRespond using TOON like this:\nthought: Your reasoning for the settings changes\nupdates[1]{key,value}:\n setting_key,new_value\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
65
+ export declare const UPDATE_SETTINGS_TEMPLATE = "# Task: Update settings based on the request.\n\n{{providers}}\n\n# Current Settings:\n{{settings}}\n\n# Instructions:\nBased on the request, determine which settings to update.\nOnly update settings that the user has explicitly requested.\n\nRespond using TOON like this:\nthought: Your reasoning for the settings changes\nupdates[1]{key,value}:\n setting_key,new_value\n\nIMPORTANT: Your response must ONLY contain the TOON document above.";
4
66
  export declare const booleanFooter = "Respond with only a YES or a NO.";
5
- export declare const imageDescriptionTemplate = "<task>Analyze the provided image and generate a comprehensive description with multiple levels of detail.</task>\n\n<instructions>\nCarefully examine the image and provide:\n1. A concise, descriptive title that captures the main subject or scene\n2. A brief summary description (1-2 sentences) highlighting the key elements\n3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details\n\nBe objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.\n</instructions>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <title>A concise, descriptive title for the image</title>\n <description>A brief 1-2 sentence summary of the key elements in the image</description>\n <text>An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
6
- export declare const multiStepDecisionTemplate = "<task>\nDetermine the next step the assistant should take in this conversation to help the user reach their goal.\n</task>\n\n{{recentMessages}}\n\n# Multi-Step Workflow\n\nIn each step, decide:\n\n1. **Which providers (if any)** should be called to gather necessary data.\n2. **Which action (if any)** should be executed after providers return.\n3. Decide whether the task is complete. If so, set `isFinish: true`. Do not select the `REPLY` action; replies are handled separately after task completion.\n\nYou can select **multiple providers** and at most **one action** per step.\n\nIf the task is fully resolved and no further steps are needed, mark the step as `isFinish: true`.\n\n---\n\n{{actionsWithDescriptions}}\n\n{{providersWithDescriptions}}\n\nThese are the actions or data provider calls that have already been used in this run. Use this to avoid redundancy and guide your next move.\n\n{{actionResults}}\n\n<keys>\n\"thought\" Clearly explain your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request.\n\"action\" Name of the action to execute after providers return (can be empty if no action is needed).\n\"providers\" List of provider names to call in this step (can be empty if none are needed).\n\"isFinish\" Set to true only if the task is fully complete.\n</keys>\n\n\u26A0\uFE0F IMPORTANT: Do **not** mark the task as `isFinish: true` immediately after calling an action. Wait for the action to complete before deciding the task is finished.\n\n<output>\n<response>\n <thought>Your thought here</thought>\n <action>ACTION</action>\n <providers>PROVIDER1,PROVIDER2</providers>\n <isFinish>true | false</isFinish>\n</response>\n</output>";
7
- export declare const multiStepSummaryTemplate = "<task>\nSummarize what the assistant has done so far and provide a final response to the user based on the completed steps.\n</task>\n\n# Context Information\n{{bio}}\n\n---\n\n{{system}}\n\n---\n\n{{messageDirections}}\n\n# Conversation Summary\nBelow is the user's original request and conversation so far:\n{{recentMessages}}\n\n# Execution Trace\nHere are the actions taken by the assistant to fulfill the request:\n{{actionResults}}\n\n# Assistant's Last Reasoning Step\n{{recentMessage}}\n\n# Instructions\n\n - Review the execution trace and last reasoning step carefully\n\n - Your final output MUST be in this XML format:\n<output>\n<response>\n <thought>Your thought here</thought>\n <text>Your final message to the user</text>\n</response>\n</output>\n";
8
- export declare const postActionDecisionTemplate = "<task>\nContinue helping the user after reviewing the latest action results.\n</task>\n\ncontext:\n{{providers}}\n\nrecent conversation:\n{{recentMessages}}\n\nrecent action results:\n{{actionResults}}\n\nrules[9]:\n- think briefly, then continue the task from the latest action results\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include a <params> block with the required fields\n- if a required param is unknown, ask for clarification in <text>\n- if the task is complete, either reply to the user or use STOP to end the run\n- STOP is a terminal control action even if it is not listed in available actions\n\n<output>\nXML only. Return exactly one <response> block. No prose before or after it. No <think>.\n\n<response>\n <thought>Your thought here</thought>\n <actions>\n <action>\n <name>ACTION</name>\n </action>\n </actions>\n <providers></providers>\n <text>Your message here</text>\n <simple>true</simple>\n</response>\n</output>";
9
- export declare const replyTemplate = "# Task: Generate dialog for the character {{agentName}}.\n\n{{providers}}\n\n# Instructions: Write the next message for {{agentName}}.\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"text\" should be the next message for {{agentName}} which they will send to the conversation.\n\nIMPORTANT CODE BLOCK FORMATTING RULES:\n- If {{agentName}} includes code examples, snippets, or multi-line code in the response, ALWAYS wrap the code with ``` fenced code blocks (specify the language if known, e.g., ```python).\n- ONLY use fenced code blocks for actual code. Do NOT wrap non-code text, instructions, or single words in fenced code blocks.\n- If including inline code (short single words or function names), use single backticks (`) as appropriate.\n- This ensures the user sees clearly formatted and copyable code when relevant.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <thought>Your thought here</thought>\n <text>Your message here</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
10
- export declare const chooseOptionTemplate = "# Task: Choose an option from the available choices.\n\n{{providers}}\n\n# Available Options:\n{{options}}\n\n# Instructions: \nAnalyze the options and select the most appropriate one based on the current context.\nProvide your reasoning and the selected option ID.\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the selection</thought>\n <selected_id>The ID of the selected option</selected_id>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
11
- export declare const imageGenerationTemplate = "# Task: Generate an image prompt for {{agentName}}.\n\n{{providers}}\n\n# Instructions:\nBased on the conversation, create a detailed prompt for image generation.\nThe prompt should be specific, descriptive, and suitable for AI image generation.\n\n# Recent conversation:\n{{recentMessages}}\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the image prompt</thought>\n <prompt>Detailed image generation prompt</prompt>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
12
- export declare const reflectionTemplate = "# Task: Reflect on recent agent behavior and interactions.\n\n{{providers}}\n\n# Recent Interactions:\n{{recentInteractions}}\n\n# Instructions:\nAnalyze the agent's recent behavior and interactions. Consider:\n1. Was the communication clear and helpful?\n2. Were responses appropriate for the context?\n3. Were any mistakes made?\n4. What could be improved?\n\nRespond using XML format like this:\n<response>\n <thought>Your detailed analysis</thought>\n <quality_score>Score 0-100 for overall quality</quality_score>\n <strengths>What went well</strengths>\n <improvements>What could be improved</improvements>\n <learnings>Key takeaways for future interactions</learnings>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
13
- export declare const updateSettingsTemplate = "# Task: Update settings based on the request.\n\n{{providers}}\n\n# Current Settings:\n{{settings}}\n\n# Instructions:\nBased on the request, determine which settings to update.\nOnly update settings that the user has explicitly requested.\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the settings changes</thought>\n <updates>\n <update>\n <key>setting_key</key>\n <value>new_value</value>\n </update>\n </updates>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
14
- export declare const updateEntityTemplate = "# Task: Update entity information.\n\n{{providers}}\n\n# Current Entity Information:\n{{entityInfo}}\n\n# Instructions:\nBased on the request, determine what information about the entity should be updated.\nOnly update fields that the user has explicitly requested to change.\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the entity update</thought>\n <entity_id>The entity ID to update</entity_id>\n <updates>\n <field>\n <name>field_name</name>\n <value>new_value</value>\n </field>\n </updates>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
15
- export declare const optionExtractionTemplate = "# Task: Extract selected task and option from user message\n\n# Available Tasks:\n{{tasks}}\n\n# Recent Messages:\n{{recentMessages}}\n\n# Instructions:\n1. Review the user's message and identify which task and option they are selecting\n2. Match against the available tasks and their options, including ABORT\n3. Return the task ID (shortened UUID) and selected option name exactly as listed above\n4. If no clear selection is made, return null for both fields\n\n\nReturn in XML format:\n<response>\n <taskId>string_or_null</taskId>\n <selectedOption>OPTION_NAME_or_null</selectedOption>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
16
- export declare const SHOULD_RESPOND_TEMPLATE = "task: Decide whether {{agentName}} should respond, ignore, or stop.\n\ncontext:\n{{providers}}\n\nrules[6]:\n- direct mention of {{agentName}} -> RESPOND\n- different assistant name -> IGNORE\n- continuing an active thread with {{agentName}} -> RESPOND\n- request to stop or be quiet -> STOP\n- talking to someone else -> IGNORE\n- if unsure, prefer IGNORE over hallucinating relevance\n\ndecision_note:\n- talking TO {{agentName}} means name mention, reply chain, or direct continuation\n- talking ABOUT {{agentName}} is not enough\n\n<output>\nXML only. Return exactly one <response> block. No prose before or after it. No <think>.\n\nExample:\n<response>\n <name>{{agentName}}</name>\n <reasoning>Direct mention and clear follow-up.</reasoning>\n <action>RESPOND | IGNORE | STOP</action>\n</response>\n</output>";
17
- export declare const MESSAGE_HANDLER_TEMPLATE = "task: Generate dialog and actions for {{agentName}}.\n\ncontext:\n{{providers}}\n\nrules[8]:\n- think briefly, then respond\n- actions execute in listed order\n- if replying, REPLY goes first\n- use IGNORE or STOP only by themselves\n- include providers only when needed\n- use provider_hints from context when present instead of restating the same rules\n- if an action needs inputs, include a <params> block with the required fields\n- if a required param is unknown, ask for clarification in <text>\n\ncontrol_actions:\n- STOP means the task is done and the agent should end the run without executing more actions\n- STOP is a terminal control action even if it is not listed in available actions\n\nfields[5]{name,meaning}:\n- thought | short plan\n- actions | ordered XML <action> elements\n- providers | comma-separated provider names, or empty\n- text | next message for {{agentName}}\n- simple | true or false\n\nformatting:\n- wrap multi-line code in fenced code blocks\n- use inline backticks for short code identifiers\n\n<output>\nXML only. Return exactly one <response> block. No prose before or after it. No <think>.\n\nExample:\n<response>\n <thought>Reply briefly. No extra providers needed.</thought>\n <actions>\n <action>\n <name>REPLY</name>\n </action>\n </actions>\n <providers></providers>\n <text>Your message here</text>\n <simple>true</simple>\n</response>\n</output>";
18
- export declare const POST_CREATION_TEMPLATE = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{xUserName}}.\n\nExample task outputs:\n1. A post about the importance of AI in our lives\n<response>\n <thought>I am thinking about writing a post about the importance of AI in our lives</thought>\n <post>AI is changing the world and it is important to understand how it works</post>\n <imagePrompt>A futuristic cityscape with flying cars and people using AI to do things</imagePrompt>\n</response>\n\n2. A post about dogs\n<response>\n <thought>I am thinking about writing a post about dogs</thought>\n <post>Dogs are man's best friend and they are loyal and loving</post>\n <imagePrompt>A dog playing with a ball in a park</imagePrompt>\n</response>\n\n3. A post about finding a new job\n<response>\n <thought>Getting a job is hard, I bet there's a good post in that</thought>\n <post>Just keep going!</post>\n <imagePrompt>A person looking at a computer screen with a job search website</imagePrompt>\n</response>\n\n{{providers}}\n\nWrite a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.\nYour response should be 1, 2, or 3 sentences (choose the length at random).\nYour response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.\n\nYour output should be formatted in XML like this:\n<response>\n <thought>Your thought here</thought>\n <post>Your post text here</post>\n <imagePrompt>Optional image prompt here</imagePrompt>\n</response>\n\nThe \"post\" field should be the post you want to send. Do not including any thinking or internal reflection in the \"post\" field.\nThe \"imagePrompt\" field is optional and should be a prompt for an image that is relevant to the post. It should be a single sentence that captures the essence of the post. ONLY USE THIS FIELD if it makes sense that the post would benefit from an image.\nThe \"thought\" field should be a short description of what the agent is thinking about before responding, including a brief justification for the response. Includate an explanation how the post is relevant to the topic but unique and different than other posts.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
19
67
  export declare const BOOLEAN_FOOTER = "Respond with only a YES or a NO.";
20
- export declare const IMAGE_DESCRIPTION_TEMPLATE = "<task>Analyze the provided image and generate a comprehensive description with multiple levels of detail.</task>\n\n<instructions>\nCarefully examine the image and provide:\n1. A concise, descriptive title that captures the main subject or scene\n2. A brief summary description (1-2 sentences) highlighting the key elements\n3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details\n\nBe objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.\n</instructions>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <title>A concise, descriptive title for the image</title>\n <description>A brief 1-2 sentence summary of the key elements in the image</description>\n <text>An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
21
- export declare const MULTI_STEP_DECISION_TEMPLATE = "<task>\nDetermine the next step the assistant should take in this conversation to help the user reach their goal.\n</task>\n\n{{recentMessages}}\n\n# Multi-Step Workflow\n\nIn each step, decide:\n\n1. **Which providers (if any)** should be called to gather necessary data.\n2. **Which action (if any)** should be executed after providers return.\n3. Decide whether the task is complete. If so, set `isFinish: true`. Do not select the `REPLY` action; replies are handled separately after task completion.\n\nYou can select **multiple providers** and at most **one action** per step.\n\nIf the task is fully resolved and no further steps are needed, mark the step as `isFinish: true`.\n\n---\n\n{{actionsWithDescriptions}}\n\n{{providersWithDescriptions}}\n\nThese are the actions or data provider calls that have already been used in this run. Use this to avoid redundancy and guide your next move.\n\n{{actionResults}}\n\n<keys>\n\"thought\" Clearly explain your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request.\n\"action\" Name of the action to execute after providers return (can be empty if no action is needed).\n\"providers\" List of provider names to call in this step (can be empty if none are needed).\n\"isFinish\" Set to true only if the task is fully complete.\n</keys>\n\n\u26A0\uFE0F IMPORTANT: Do **not** mark the task as `isFinish: true` immediately after calling an action. Wait for the action to complete before deciding the task is finished.\n\n<output>\n<response>\n <thought>Your thought here</thought>\n <action>ACTION</action>\n <providers>PROVIDER1,PROVIDER2</providers>\n <isFinish>true | false</isFinish>\n</response>\n</output>";
22
- export declare const MULTI_STEP_SUMMARY_TEMPLATE = "<task>\nSummarize what the assistant has done so far and provide a final response to the user based on the completed steps.\n</task>\n\n# Context Information\n{{bio}}\n\n---\n\n{{system}}\n\n---\n\n{{messageDirections}}\n\n# Conversation Summary\nBelow is the user's original request and conversation so far:\n{{recentMessages}}\n\n# Execution Trace\nHere are the actions taken by the assistant to fulfill the request:\n{{actionResults}}\n\n# Assistant's Last Reasoning Step\n{{recentMessage}}\n\n# Instructions\n\n - Review the execution trace and last reasoning step carefully\n\n - Your final output MUST be in this XML format:\n<output>\n<response>\n <thought>Your thought here</thought>\n <text>Your final message to the user</text>\n</response>\n</output>\n";
23
- export declare const REPLY_TEMPLATE = "# Task: Generate dialog for the character {{agentName}}.\n\n{{providers}}\n\n# Instructions: Write the next message for {{agentName}}.\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"text\" should be the next message for {{agentName}} which they will send to the conversation.\n\nIMPORTANT CODE BLOCK FORMATTING RULES:\n- If {{agentName}} includes code examples, snippets, or multi-line code in the response, ALWAYS wrap the code with ``` fenced code blocks (specify the language if known, e.g., ```python).\n- ONLY use fenced code blocks for actual code. Do NOT wrap non-code text, instructions, or single words in fenced code blocks.\n- If including inline code (short single words or function names), use single backticks (`) as appropriate.\n- This ensures the user sees clearly formatted and copyable code when relevant.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <thought>Your thought here</thought>\n <text>Your message here</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
24
- export declare const CHOOSE_OPTION_TEMPLATE = "# Task: Choose an option from the available choices.\n\n{{providers}}\n\n# Available Options:\n{{options}}\n\n# Instructions: \nAnalyze the options and select the most appropriate one based on the current context.\nProvide your reasoning and the selected option ID.\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the selection</thought>\n <selected_id>The ID of the selected option</selected_id>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
25
- export declare const IMAGE_GENERATION_TEMPLATE = "# Task: Generate an image prompt for {{agentName}}.\n\n{{providers}}\n\n# Instructions:\nBased on the conversation, create a detailed prompt for image generation.\nThe prompt should be specific, descriptive, and suitable for AI image generation.\n\n# Recent conversation:\n{{recentMessages}}\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the image prompt</thought>\n <prompt>Detailed image generation prompt</prompt>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
26
- export declare const REFLECTION_TEMPLATE = "# Task: Reflect on recent agent behavior and interactions.\n\n{{providers}}\n\n# Recent Interactions:\n{{recentInteractions}}\n\n# Instructions:\nAnalyze the agent's recent behavior and interactions. Consider:\n1. Was the communication clear and helpful?\n2. Were responses appropriate for the context?\n3. Were any mistakes made?\n4. What could be improved?\n\nRespond using XML format like this:\n<response>\n <thought>Your detailed analysis</thought>\n <quality_score>Score 0-100 for overall quality</quality_score>\n <strengths>What went well</strengths>\n <improvements>What could be improved</improvements>\n <learnings>Key takeaways for future interactions</learnings>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
27
- export declare const UPDATE_SETTINGS_TEMPLATE = "# Task: Update settings based on the request.\n\n{{providers}}\n\n# Current Settings:\n{{settings}}\n\n# Instructions:\nBased on the request, determine which settings to update.\nOnly update settings that the user has explicitly requested.\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the settings changes</thought>\n <updates>\n <update>\n <key>setting_key</key>\n <value>new_value</value>\n </update>\n </updates>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
28
- export declare const UPDATE_ENTITY_TEMPLATE = "# Task: Update entity information.\n\n{{providers}}\n\n# Current Entity Information:\n{{entityInfo}}\n\n# Instructions:\nBased on the request, determine what information about the entity should be updated.\nOnly update fields that the user has explicitly requested to change.\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the entity update</thought>\n <entity_id>The entity ID to update</entity_id>\n <updates>\n <field>\n <name>field_name</name>\n <value>new_value</value>\n </field>\n </updates>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
29
- export declare const OPTION_EXTRACTION_TEMPLATE = "# Task: Extract selected task and option from user message\n\n# Available Tasks:\n{{tasks}}\n\n# Recent Messages:\n{{recentMessages}}\n\n# Instructions:\n1. Review the user's message and identify which task and option they are selecting\n2. Match against the available tasks and their options, including ABORT\n3. Return the task ID (shortened UUID) and selected option name exactly as listed above\n4. If no clear selection is made, return null for both fields\n\n\nReturn in XML format:\n<response>\n <taskId>string_or_null</taskId>\n <selectedOption>OPTION_NAME_or_null</selectedOption>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
30
- export declare const scheduleFollowUpTemplate = "# Schedule Follow-up\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the follow-up scheduling information from the message:\n1. Who to follow up with (name or entity reference)\n2. When to follow up (date/time or relative time like \"tomorrow\", \"next week\")\n3. Reason for the follow-up\n4. Priority (high, medium, low)\n5. Any specific message or notes\n\n## Current Date/Time\n{{currentDateTime}}\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to follow up with</contactName>\n<entityId>ID if known, otherwise leave empty</entityId>\n<scheduledAt>ISO datetime for the follow-up</scheduledAt>\n<reason>Reason for the follow-up</reason>\n<priority>high, medium, or low</priority>\n<message>Optional message or notes for the follow-up</message>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
31
- export declare const addContactTemplate = "# Add Contact to Rolodex\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the contact information from the message and determine:\n1. Who should be added as a contact (name or entity reference)\n2. What category they belong to (friend, family, colleague, acquaintance, vip, business)\n3. Any preferences or notes mentioned\n\nRespond with the extracted information in XML format.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to add</contactName>\n<entityId>ID if known, otherwise leave empty</entityId>\n<categories>comma-separated categories</categories>\n<notes>Any additional notes or preferences</notes>\n<timezone>Timezone if mentioned</timezone>\n<language>Language preference if mentioned</language>\n<reason>Reason for adding this contact</reason>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
32
- export declare const searchContactsTemplate = "# Search Contacts\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the search criteria from the message:\n1. Categories to filter by (friend, family, colleague, acquaintance, vip, business)\n2. Search terms (names or keywords)\n3. Tags to filter by\n4. Any other filters mentioned\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<categories>comma-separated list of categories to filter by</categories>\n<searchTerm>search term for names</searchTerm>\n<tags>comma-separated list of tags</tags>\n<intent>list, search, or count</intent>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
33
- export declare const removeContactTemplate = "# Remove Contact from Rolodex\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the contact removal information from the message:\n1. Who to remove (name or entity reference)\n2. Confirmation of the intent to remove\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to remove</contactName>\n<confirmed>yes or no</confirmed>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
34
- export declare const updateContactTemplate = "# Update Contact Information\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the contact update information from the message:\n1. Who to update (name or entity reference)\n2. What fields to update (categories, tags, preferences, notes, custom fields)\n3. Whether to add to or replace existing values\n\n## Current Date/Time\n{{currentDateTime}}\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to update</contactName>\n<operation>add_to or replace</operation>\n<categories>comma-separated list of categories</categories>\n<tags>comma-separated list of tags</tags>\n<preferences>key1:value1,key2:value2</preferences>\n<customFields>field1:value1,field2:value2</customFields>\n<notes>Any additional notes</notes>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
35
- export declare const shouldFollowRoomTemplate = "# Task: Decide if {{agentName}} should start following this room, i.e. eagerly participating without explicit mentions.\n\n{{recentMessages}}\n\nShould {{agentName}} start following this room, eagerly participating without explicit mentions?\nRespond with YES if:\n- The user has directly asked {{agentName}} to follow the conversation or participate more actively\n- The conversation topic is highly engaging and {{agentName}}'s input would add significant value\n- {{agentName}} has unique insights to contribute and the users seem receptive\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
36
- export declare const shouldUnfollowRoomTemplate = "# Task: Decide if {{agentName}} should stop closely following this previously followed room and only respond when mentioned.\n\n{{recentMessages}}\n\nShould {{agentName}} stop closely following this previously followed room and only respond when mentioned?\nRespond with YES if:\n- The user has suggested that {{agentName}} is over-participating or being disruptive\n- {{agentName}}'s eagerness to contribute is not well-received by the users\n- The conversation has shifted to a topic where {{agentName}} has less to add\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
37
- export declare const shouldMuteRoomTemplate = "# Task: Decide if {{agentName}} should mute this room and stop responding unless explicitly mentioned.\n\n{{recentMessages}}\n\nShould {{agentName}} mute this room and stop responding unless explicitly mentioned?\n\nRespond with YES if:\n- The user is being aggressive, rude, or inappropriate\n- The user has directly asked {{agentName}} to stop responding or be quiet\n- {{agentName}}'s responses are not well-received or are annoying the user(s)\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
38
- export declare const shouldUnmuteRoomTemplate = "# Task: Decide if {{agentName}} should unmute this previously muted room and start considering it for responses again.\n\n{{recentMessages}}\n\nShould {{agentName}} unmute this previously muted room and start considering it for responses again?\nRespond with YES if:\n- The user has explicitly asked {{agentName}} to start responding again\n- The user seems to want to re-engage with {{agentName}} in a respectful manner\n- The tone of the conversation has improved and {{agentName}}'s input would be welcome\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
39
- export declare const targetExtractionTemplate = "# Task: Extract Target and Source Information\n\n# Recent Messages:\n{{recentMessages}}\n\n# Instructions:\nAnalyze the conversation to identify:\n1. The target type (user or room)\n2. The target platform/source (e.g. telegram, discord, etc)\n3. Any identifying information about the target\n4. The message text to send\n\nReturn an XML response with:\n<response>\n <targetType>user|room</targetType>\n <source>platform-name</source>\n <messageText>text_to_send</messageText>\n <identifiers>\n <username>username_if_applicable</username>\n <roomName>room_name_if_applicable</roomName>\n </identifiers>\n</response>";
40
- export declare const updateRoleTemplate = "# Task: Update entity role in the world.\n\n{{providers}}\n\n# Current Role Assignments:\n{{roles}}\n\n# Instructions:\nBased on the request, determine the role assignment to make.\nValid roles are: OWNER, ADMIN, MEMBER, GUEST, NONE\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the role change</thought>\n <entity_id>The entity ID to update</entity_id>\n <new_role>The new role to assign (OWNER, ADMIN, MEMBER, GUEST, or NONE)</new_role>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
41
- export declare const initialSummarizationTemplate = "# Task: Summarize Conversation\n\nYou are analyzing a conversation to create a concise summary that captures the key points, topics, and important details.\n\n# Recent Messages\n{{recentMessages}}\n\n# Instructions\nGenerate a summary that:\n1. Captures the main topics discussed\n2. Highlights key information shared\n3. Notes any decisions made or questions asked\n4. Maintains context for future reference\n5. Is concise but comprehensive\n\n**IMPORTANT**: Keep the summary under 2500 tokens. Be comprehensive but concise.\n\nAlso extract:\n- **Topics**: List of main topics discussed (comma-separated)\n- **Key Points**: Important facts or decisions (bullet points)\n\nRespond in this XML format:\n<summary>\n <text>Your comprehensive summary here</text>\n <topics>topic1, topic2, topic3</topics>\n <keyPoints>\n <point>First key point</point>\n <point>Second key point</point>\n </keyPoints>\n</summary>";
42
- export declare const updateSummarizationTemplate = "# Task: Update and Condense Conversation Summary\n\nYou are updating an existing conversation summary with new messages, while keeping the total summary concise.\n\n# Existing Summary\n{{existingSummary}}\n\n# Existing Topics\n{{existingTopics}}\n\n# New Messages Since Last Summary\n{{newMessages}}\n\n# Instructions\nUpdate the summary by:\n1. Merging the existing summary with insights from the new messages\n2. Removing redundant or less important details to stay under the token limit\n3. Keeping the most important context and decisions\n4. Adding new topics if they emerge\n5. **CRITICAL**: Keep the ENTIRE updated summary under 2500 tokens\n\nThe goal is a rolling summary that captures the essence of the conversation without growing indefinitely.\n\nRespond in this XML format:\n<summary>\n <text>Your updated and condensed summary here</text>\n <topics>topic1, topic2, topic3</topics>\n <keyPoints>\n <point>First key point</point>\n <point>Second key point</point>\n </keyPoints>\n</summary>";
43
- export declare const longTermExtractionTemplate = "# Task: Extract Long-Term Memory (Strict Criteria)\n\nYou are analyzing a conversation to extract ONLY the most critical, persistent information about the user using cognitive science memory categories.\n\n# Recent Messages\n{{recentMessages}}\n\n# Current Long-Term Memories\n{{existingMemories}}\n\n# ULTRA-STRICT EXTRACTION CRITERIA\n\nDefault to NOT extracting. Confidence must be >= 0.85.\nIf there are no qualifying facts, respond with <memories></memories>\n\n# Response Format\n\n<memories>\n <memory>\n <category>semantic</category>\n <content>User is a senior TypeScript developer with 8 years of backend experience</content>\n <confidence>0.95</confidence>\n </memory>\n</memories>";
44
- export declare const messageClassifierTemplate = "Analyze this user request and classify it for planning purposes:\n\n\"{{text}}\"\n\nClassify the request across these dimensions:\n\n1. COMPLEXITY LEVEL:\n- simple: Direct actions that don't require planning\n- medium: Multi-step tasks requiring coordination\n- complex: Strategic initiatives with multiple stakeholders\n- enterprise: Large-scale transformations with full complexity\n\n2. PLANNING TYPE:\n- direct_action: Single action, no planning needed\n- sequential_planning: Multiple steps in sequence\n- strategic_planning: Complex coordination with stakeholders\n\n3. REQUIRED CAPABILITIES:\n- List specific capabilities needed (analysis, communication, project_management, etc.)\n\n4. STAKEHOLDERS:\n- List types of people/groups involved\n\n5. CONSTRAINTS:\n- List limitations or requirements mentioned\n\n6. DEPENDENCIES:\n- List dependencies between tasks or external factors\n\nRespond in this exact format:\nCOMPLEXITY: [simple|medium|complex|enterprise]\nPLANNING: [direct_action|sequential_planning|strategic_planning]\nCAPABILITIES: [comma-separated list]\nSTAKEHOLDERS: [comma-separated list]\nCONSTRAINTS: [comma-separated list]\nDEPENDENCIES: [comma-separated list]\nCONFIDENCE: [0.0-1.0]";
45
- export declare const SCHEDULE_FOLLOW_UP_TEMPLATE = "# Schedule Follow-up\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the follow-up scheduling information from the message:\n1. Who to follow up with (name or entity reference)\n2. When to follow up (date/time or relative time like \"tomorrow\", \"next week\")\n3. Reason for the follow-up\n4. Priority (high, medium, low)\n5. Any specific message or notes\n\n## Current Date/Time\n{{currentDateTime}}\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to follow up with</contactName>\n<entityId>ID if known, otherwise leave empty</entityId>\n<scheduledAt>ISO datetime for the follow-up</scheduledAt>\n<reason>Reason for the follow-up</reason>\n<priority>high, medium, or low</priority>\n<message>Optional message or notes for the follow-up</message>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
46
- export declare const ADD_CONTACT_TEMPLATE = "# Add Contact to Rolodex\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the contact information from the message and determine:\n1. Who should be added as a contact (name or entity reference)\n2. What category they belong to (friend, family, colleague, acquaintance, vip, business)\n3. Any preferences or notes mentioned\n\nRespond with the extracted information in XML format.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to add</contactName>\n<entityId>ID if known, otherwise leave empty</entityId>\n<categories>comma-separated categories</categories>\n<notes>Any additional notes or preferences</notes>\n<timezone>Timezone if mentioned</timezone>\n<language>Language preference if mentioned</language>\n<reason>Reason for adding this contact</reason>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
47
- export declare const SEARCH_CONTACTS_TEMPLATE = "# Search Contacts\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the search criteria from the message:\n1. Categories to filter by (friend, family, colleague, acquaintance, vip, business)\n2. Search terms (names or keywords)\n3. Tags to filter by\n4. Any other filters mentioned\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<categories>comma-separated list of categories to filter by</categories>\n<searchTerm>search term for names</searchTerm>\n<tags>comma-separated list of tags</tags>\n<intent>list, search, or count</intent>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
48
- export declare const REMOVE_CONTACT_TEMPLATE = "# Remove Contact from Rolodex\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the contact removal information from the message:\n1. Who to remove (name or entity reference)\n2. Confirmation of the intent to remove\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to remove</contactName>\n<confirmed>yes or no</confirmed>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
49
- export declare const UPDATE_CONTACT_TEMPLATE = "# Update Contact Information\n\nCurrent message: {{message}}\nSender: {{senderName}} (ID: {{senderId}})\n\n## Instructions\nExtract the contact update information from the message:\n1. Who to update (name or entity reference)\n2. What fields to update (categories, tags, preferences, notes, custom fields)\n3. Whether to add to or replace existing values\n\n## Current Date/Time\n{{currentDateTime}}\n\nDo NOT include any thinking, reasoning, or <think> sections in your response.\nGo directly to the XML response format without any preamble or explanation.\n\n## Response Format\n<response>\n<contactName>Name of the contact to update</contactName>\n<operation>add_to or replace</operation>\n<categories>comma-separated list of categories</categories>\n<tags>comma-separated list of tags</tags>\n<preferences>key1:value1,key2:value2</preferences>\n<customFields>field1:value1,field2:value2</customFields>\n<notes>Any additional notes</notes>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
50
- export declare const SHOULD_FOLLOW_ROOM_TEMPLATE = "# Task: Decide if {{agentName}} should start following this room, i.e. eagerly participating without explicit mentions.\n\n{{recentMessages}}\n\nShould {{agentName}} start following this room, eagerly participating without explicit mentions?\nRespond with YES if:\n- The user has directly asked {{agentName}} to follow the conversation or participate more actively\n- The conversation topic is highly engaging and {{agentName}}'s input would add significant value\n- {{agentName}} has unique insights to contribute and the users seem receptive\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
51
- export declare const SHOULD_UNFOLLOW_ROOM_TEMPLATE = "# Task: Decide if {{agentName}} should stop closely following this previously followed room and only respond when mentioned.\n\n{{recentMessages}}\n\nShould {{agentName}} stop closely following this previously followed room and only respond when mentioned?\nRespond with YES if:\n- The user has suggested that {{agentName}} is over-participating or being disruptive\n- {{agentName}}'s eagerness to contribute is not well-received by the users\n- The conversation has shifted to a topic where {{agentName}} has less to add\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
52
- export declare const SHOULD_MUTE_ROOM_TEMPLATE = "# Task: Decide if {{agentName}} should mute this room and stop responding unless explicitly mentioned.\n\n{{recentMessages}}\n\nShould {{agentName}} mute this room and stop responding unless explicitly mentioned?\n\nRespond with YES if:\n- The user is being aggressive, rude, or inappropriate\n- The user has directly asked {{agentName}} to stop responding or be quiet\n- {{agentName}}'s responses are not well-received or are annoying the user(s)\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
53
- export declare const SHOULD_UNMUTE_ROOM_TEMPLATE = "# Task: Decide if {{agentName}} should unmute this previously muted room and start considering it for responses again.\n\n{{recentMessages}}\n\nShould {{agentName}} unmute this previously muted room and start considering it for responses again?\nRespond with YES if:\n- The user has explicitly asked {{agentName}} to start responding again\n- The user seems to want to re-engage with {{agentName}} in a respectful manner\n- The tone of the conversation has improved and {{agentName}}'s input would be welcome\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
54
- export declare const shouldFollowTemplate = "# Task: Decide if {{agentName}} should start following this room, i.e. eagerly participating without explicit mentions.\n\n{{recentMessages}}\n\nShould {{agentName}} start following this room, eagerly participating without explicit mentions?\nRespond with YES if:\n- The user has directly asked {{agentName}} to follow the conversation or participate more actively\n- The conversation topic is highly engaging and {{agentName}}'s input would add significant value\n- {{agentName}} has unique insights to contribute and the users seem receptive\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
55
- export declare const shouldUnfollowTemplate = "# Task: Decide if {{agentName}} should stop closely following this previously followed room and only respond when mentioned.\n\n{{recentMessages}}\n\nShould {{agentName}} stop closely following this previously followed room and only respond when mentioned?\nRespond with YES if:\n- The user has suggested that {{agentName}} is over-participating or being disruptive\n- {{agentName}}'s eagerness to contribute is not well-received by the users\n- The conversation has shifted to a topic where {{agentName}} has less to add\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
56
- export declare const shouldMuteTemplate = "# Task: Decide if {{agentName}} should mute this room and stop responding unless explicitly mentioned.\n\n{{recentMessages}}\n\nShould {{agentName}} mute this room and stop responding unless explicitly mentioned?\n\nRespond with YES if:\n- The user is being aggressive, rude, or inappropriate\n- The user has directly asked {{agentName}} to stop responding or be quiet\n- {{agentName}}'s responses are not well-received or are annoying the user(s)\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
57
- export declare const shouldUnmuteTemplate = "# Task: Decide if {{agentName}} should unmute this previously muted room and start considering it for responses again.\n\n{{recentMessages}}\n\nShould {{agentName}} unmute this previously muted room and start considering it for responses again?\nRespond with YES if:\n- The user has explicitly asked {{agentName}} to start responding again\n- The user seems to want to re-engage with {{agentName}} in a respectful manner\n- The tone of the conversation has improved and {{agentName}}'s input would be welcome\n\nOtherwise, respond with NO.\nRespond with only a YES or a NO.";
58
- export declare const TARGET_EXTRACTION_TEMPLATE = "# Task: Extract Target and Source Information\n\n# Recent Messages:\n{{recentMessages}}\n\n# Instructions:\nAnalyze the conversation to identify:\n1. The target type (user or room)\n2. The target platform/source (e.g. telegram, discord, etc)\n3. Any identifying information about the target\n4. The message text to send\n\nReturn an XML response with:\n<response>\n <targetType>user|room</targetType>\n <source>platform-name</source>\n <messageText>text_to_send</messageText>\n <identifiers>\n <username>username_if_applicable</username>\n <roomName>room_name_if_applicable</roomName>\n </identifiers>\n</response>";
59
- export declare const UPDATE_ROLE_TEMPLATE = "# Task: Update entity role in the world.\n\n{{providers}}\n\n# Current Role Assignments:\n{{roles}}\n\n# Instructions:\nBased on the request, determine the role assignment to make.\nValid roles are: OWNER, ADMIN, MEMBER, GUEST, NONE\n\nRespond using XML format like this:\n<response>\n <thought>Your reasoning for the role change</thought>\n <entity_id>The entity ID to update</entity_id>\n <new_role>The new role to assign (OWNER, ADMIN, MEMBER, GUEST, or NONE)</new_role>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
60
- export declare const INITIAL_SUMMARIZATION_TEMPLATE = "# Task: Summarize Conversation\n\nYou are analyzing a conversation to create a concise summary that captures the key points, topics, and important details.\n\n# Recent Messages\n{{recentMessages}}\n\n# Instructions\nGenerate a summary that:\n1. Captures the main topics discussed\n2. Highlights key information shared\n3. Notes any decisions made or questions asked\n4. Maintains context for future reference\n5. Is concise but comprehensive\n\n**IMPORTANT**: Keep the summary under 2500 tokens. Be comprehensive but concise.\n\nAlso extract:\n- **Topics**: List of main topics discussed (comma-separated)\n- **Key Points**: Important facts or decisions (bullet points)\n\nRespond in this XML format:\n<summary>\n <text>Your comprehensive summary here</text>\n <topics>topic1, topic2, topic3</topics>\n <keyPoints>\n <point>First key point</point>\n <point>Second key point</point>\n </keyPoints>\n</summary>";
61
- export declare const UPDATE_SUMMARIZATION_TEMPLATE = "# Task: Update and Condense Conversation Summary\n\nYou are updating an existing conversation summary with new messages, while keeping the total summary concise.\n\n# Existing Summary\n{{existingSummary}}\n\n# Existing Topics\n{{existingTopics}}\n\n# New Messages Since Last Summary\n{{newMessages}}\n\n# Instructions\nUpdate the summary by:\n1. Merging the existing summary with insights from the new messages\n2. Removing redundant or less important details to stay under the token limit\n3. Keeping the most important context and decisions\n4. Adding new topics if they emerge\n5. **CRITICAL**: Keep the ENTIRE updated summary under 2500 tokens\n\nThe goal is a rolling summary that captures the essence of the conversation without growing indefinitely.\n\nRespond in this XML format:\n<summary>\n <text>Your updated and condensed summary here</text>\n <topics>topic1, topic2, topic3</topics>\n <keyPoints>\n <point>First key point</point>\n <point>Second key point</point>\n </keyPoints>\n</summary>";
62
- export declare const LONG_TERM_EXTRACTION_TEMPLATE = "# Task: Extract Long-Term Memory (Strict Criteria)\n\nYou are analyzing a conversation to extract ONLY the most critical, persistent information about the user using cognitive science memory categories.\n\n# Recent Messages\n{{recentMessages}}\n\n# Current Long-Term Memories\n{{existingMemories}}\n\n# ULTRA-STRICT EXTRACTION CRITERIA\n\nDefault to NOT extracting. Confidence must be >= 0.85.\nIf there are no qualifying facts, respond with <memories></memories>\n\n# Response Format\n\n<memories>\n <memory>\n <category>semantic</category>\n <content>User is a senior TypeScript developer with 8 years of backend experience</content>\n <confidence>0.95</confidence>\n </memory>\n</memories>";
63
- export declare const MESSAGE_CLASSIFIER_TEMPLATE = "Analyze this user request and classify it for planning purposes:\n\n\"{{text}}\"\n\nClassify the request across these dimensions:\n\n1. COMPLEXITY LEVEL:\n- simple: Direct actions that don't require planning\n- medium: Multi-step tasks requiring coordination\n- complex: Strategic initiatives with multiple stakeholders\n- enterprise: Large-scale transformations with full complexity\n\n2. PLANNING TYPE:\n- direct_action: Single action, no planning needed\n- sequential_planning: Multiple steps in sequence\n- strategic_planning: Complex coordination with stakeholders\n\n3. REQUIRED CAPABILITIES:\n- List specific capabilities needed (analysis, communication, project_management, etc.)\n\n4. STAKEHOLDERS:\n- List types of people/groups involved\n\n5. CONSTRAINTS:\n- List limitations or requirements mentioned\n\n6. DEPENDENCIES:\n- List dependencies between tasks or external factors\n\nRespond in this exact format:\nCOMPLEXITY: [simple|medium|complex|enterprise]\nPLANNING: [direct_action|sequential_planning|strategic_planning]\nCAPABILITIES: [comma-separated list]\nSTAKEHOLDERS: [comma-separated list]\nCONSTRAINTS: [comma-separated list]\nDEPENDENCIES: [comma-separated list]\nCONFIDENCE: [0.0-1.0]";
64
- export declare const reflectionEvaluatorTemplate = "# Task: Generate Agent Reflection, Extract Facts and Relationships\n\n{{providers}}\n\n# Examples:\n{{evaluationExamples}}\n\n# Entities in Room\n{{entitiesInRoom}}\n\n# Existing Relationships\n{{existingRelationships}}\n\n# Current Context:\nAgent Name: {{agentName}}\nRoom Type: {{roomType}}\nMessage Sender: {{senderName}} (ID: {{senderId}})\n\n{{recentMessages}}\n\n# Known Facts:\n{{knownFacts}}\n\n# Instructions:\n1. Generate a self-reflective thought on the conversation about your performance and interaction quality.\n2. Extract new facts from the conversation.\n3. Identify and describe relationships between entities.\n - The sourceEntityId is the UUID of the entity initiating the interaction.\n - The targetEntityId is the UUID of the entity being interacted with.\n - Relationships are one-direction, so a friendship would be two entity relationships where each entity is both the source and the target of the other.\n\n\nGenerate a response in the following format:\n<response>\n <thought>a self-reflective thought on the conversation</thought>\n <facts>\n <fact>\n <claim>factual statement</claim>\n <type>fact|opinion|status</type>\n <in_bio>false</in_bio>\n <already_known>false</already_known>\n </fact>\n <!-- Add more facts as needed -->\n </facts>\n <relationships>\n <relationship>\n <sourceEntityId>entity_initiating_interaction</sourceEntityId>\n <targetEntityId>entity_being_interacted_with</targetEntityId>\n <tags>group_interaction,voice_interaction,dm_interaction,additional_tag1,additional_tag2</tags>\n </relationship>\n <!-- Add more relationships as needed -->\n </relationships>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
65
- export declare const REFLECTION_EVALUATOR_TEMPLATE = "# Task: Generate Agent Reflection, Extract Facts and Relationships\n\n{{providers}}\n\n# Examples:\n{{evaluationExamples}}\n\n# Entities in Room\n{{entitiesInRoom}}\n\n# Existing Relationships\n{{existingRelationships}}\n\n# Current Context:\nAgent Name: {{agentName}}\nRoom Type: {{roomType}}\nMessage Sender: {{senderName}} (ID: {{senderId}})\n\n{{recentMessages}}\n\n# Known Facts:\n{{knownFacts}}\n\n# Instructions:\n1. Generate a self-reflective thought on the conversation about your performance and interaction quality.\n2. Extract new facts from the conversation.\n3. Identify and describe relationships between entities.\n - The sourceEntityId is the UUID of the entity initiating the interaction.\n - The targetEntityId is the UUID of the entity being interacted with.\n - Relationships are one-direction, so a friendship would be two entity relationships where each entity is both the source and the target of the other.\n\n\nGenerate a response in the following format:\n<response>\n <thought>a self-reflective thought on the conversation</thought>\n <facts>\n <fact>\n <claim>factual statement</claim>\n <type>fact|opinion|status</type>\n <in_bio>false</in_bio>\n <already_known>false</already_known>\n </fact>\n <!-- Add more facts as needed -->\n </facts>\n <relationships>\n <relationship>\n <sourceEntityId>entity_initiating_interaction</sourceEntityId>\n <targetEntityId>entity_being_interacted_with</targetEntityId>\n <tags>group_interaction,voice_interaction,dm_interaction,additional_tag1,additional_tag2</tags>\n </relationship>\n <!-- Add more relationships as needed -->\n </relationships>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
66
- export declare const entityResolutionTemplate = "# Task: Resolve Entity Name\nMessage Sender: {{senderName}} (ID: {{senderId}})\nAgent: {{agentName}} (ID: {{agentId}})\n\n# Entities in Room:\n{{#if entitiesInRoom}}\n{{entitiesInRoom}}\n{{/if}}\n\n{{recentMessages}}\n\n# Instructions:\n1. Analyze the context to identify which entity is being referenced\n2. Consider special references like \"me\" (the message sender) or \"you\" (agent the message is directed to)\n3. Look for usernames/handles in standard formats (e.g. @username, user#1234)\n4. Consider context from recent messages for pronouns and references\n5. If multiple matches exist, use context to disambiguate\n6. Consider recent interactions and relationship strength when resolving ambiguity\n\n\nReturn an XML response with:\n<response>\n <entityId>exact-id-if-known-otherwise-null</entityId>\n <type>EXACT_MATCH | USERNAME_MATCH | NAME_MATCH | RELATIONSHIP_MATCH | AMBIGUOUS | UNKNOWN</type>\n <matches>\n <match>\n <name>matched-name</name>\n <reason>why this entity matches</reason>\n </match>\n </matches>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
67
- export declare const componentTemplate = "# Task: Extract Source and Update Component Data\n\n{{recentMessages}}\n\n{{#if existingData}}\n# Existing Component Data:\n{{existingData}}\n{{/if}}\n\n# Instructions:\n1. Analyze the conversation to identify:\n - The source/platform being referenced (e.g. telegram, x, discord)\n - Any specific component data being shared\n\n2. Generate updated component data that:\n - Is specific to the identified platform/source\n - Preserves existing data when appropriate\n - Includes the new information from the conversation\n - Contains only valid data for this component type\n\n\nReturn an XML response with the following structure:\n<response>\n <source>platform-name</source>\n <data>\n <username>username_value</username>\n <displayName>display_name_value</displayName>\n </data>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
68
- export declare const settingsSuccessTemplate = "# Task: Generate a response for successful setting updates\n{{providers}}\n\n# Update Information:\n- Updated Settings: {{updateMessages}}\n- Next Required Setting: {{nextSetting.name}}\n- Remaining Required Settings: {{remainingRequired}}\n\n# Instructions:\n1. Acknowledge the successful update of settings\n2. Maintain {{agentName}}'s personality and tone\n3. Provide clear guidance on the next setting that needs to be configured\n4. Explain what the next setting is for and how to set it\n5. If appropriate, mention how many required settings remain\n\nWrite a natural, conversational response that {{agentName}} would send about the successful update and next steps.\nInclude the actions array [\"SETTING_UPDATED\"] in your response.";
69
- export declare const settingsFailureTemplate = "# Task: Generate a response for failed setting updates\n\n# About {{agentName}}:\n{{bio}}\n\n# Current Settings Status:\n{{settingsStatus}}\n\n# Next Required Setting:\n- Name: {{nextSetting.name}}\n- Description: {{nextSetting.description}}\n- Required: Yes\n- Remaining Required Settings: {{remainingRequired}}\n\n# Recent Conversation:\n{{recentMessages}}\n\n# Instructions:\n1. Express that you couldn't understand or process the setting update\n2. Maintain {{agentName}}'s personality and tone\n3. Provide clear guidance on what setting needs to be configured next\n4. Explain what the setting is for and how to set it properly\n5. Use a helpful, patient tone\n\nWrite a natural, conversational response that {{agentName}} would send about the failed update and how to proceed.\nInclude the actions array [\"SETTING_UPDATE_FAILED\"] in your response.";
70
- export declare const settingsErrorTemplate = "# Task: Generate a response for an error during setting updates\n\n# About {{agentName}}:\n{{bio}}\n\n# Recent Conversation:\n{{recentMessages}}\n\n# Instructions:\n1. Apologize for the technical difficulty\n2. Maintain {{agentName}}'s personality and tone\n3. Suggest trying again or contacting support if the issue persists\n4. Keep the message concise and helpful\n\nWrite a natural, conversational response that {{agentName}} would send about the error.\nInclude the actions array [\"SETTING_UPDATE_ERROR\"] in your response.";
71
- export declare const settingsCompletionTemplate = "# Task: Generate a response for settings completion\n\n# About {{agentName}}:\n{{bio}}\n\n# Settings Status:\n{{settingsStatus}}\n\n# Recent Conversation:\n{{recentMessages}}\n\n# Instructions:\n1. Congratulate the user on completing the settings process\n2. Maintain {{agentName}}'s personality and tone\n3. Summarize the key settings that have been configured\n4. Explain what functionality is now available\n5. Provide guidance on what the user can do next\n6. Express enthusiasm about working together\n\nWrite a natural, conversational response that {{agentName}} would send about the successful completion of settings.\nInclude the actions array [\"ONBOARDING_COMPLETE\"] in your response.";
72
- export declare const ENTITY_RESOLUTION_TEMPLATE = "# Task: Resolve Entity Name\nMessage Sender: {{senderName}} (ID: {{senderId}})\nAgent: {{agentName}} (ID: {{agentId}})\n\n# Entities in Room:\n{{#if entitiesInRoom}}\n{{entitiesInRoom}}\n{{/if}}\n\n{{recentMessages}}\n\n# Instructions:\n1. Analyze the context to identify which entity is being referenced\n2. Consider special references like \"me\" (the message sender) or \"you\" (agent the message is directed to)\n3. Look for usernames/handles in standard formats (e.g. @username, user#1234)\n4. Consider context from recent messages for pronouns and references\n5. If multiple matches exist, use context to disambiguate\n6. Consider recent interactions and relationship strength when resolving ambiguity\n\n\nReturn an XML response with:\n<response>\n <entityId>exact-id-if-known-otherwise-null</entityId>\n <type>EXACT_MATCH | USERNAME_MATCH | NAME_MATCH | RELATIONSHIP_MATCH | AMBIGUOUS | UNKNOWN</type>\n <matches>\n <match>\n <name>matched-name</name>\n <reason>why this entity matches</reason>\n </match>\n </matches>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
73
- export declare const COMPONENT_TEMPLATE = "# Task: Extract Source and Update Component Data\n\n{{recentMessages}}\n\n{{#if existingData}}\n# Existing Component Data:\n{{existingData}}\n{{/if}}\n\n# Instructions:\n1. Analyze the conversation to identify:\n - The source/platform being referenced (e.g. telegram, x, discord)\n - Any specific component data being shared\n\n2. Generate updated component data that:\n - Is specific to the identified platform/source\n - Preserves existing data when appropriate\n - Includes the new information from the conversation\n - Contains only valid data for this component type\n\n\nReturn an XML response with the following structure:\n<response>\n <source>platform-name</source>\n <data>\n <username>username_value</username>\n <displayName>display_name_value</displayName>\n </data>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above.";
74
- export declare const SETTINGS_SUCCESS_TEMPLATE = "# Task: Generate a response for successful setting updates\n{{providers}}\n\n# Update Information:\n- Updated Settings: {{updateMessages}}\n- Next Required Setting: {{nextSetting.name}}\n- Remaining Required Settings: {{remainingRequired}}\n\n# Instructions:\n1. Acknowledge the successful update of settings\n2. Maintain {{agentName}}'s personality and tone\n3. Provide clear guidance on the next setting that needs to be configured\n4. Explain what the next setting is for and how to set it\n5. If appropriate, mention how many required settings remain\n\nWrite a natural, conversational response that {{agentName}} would send about the successful update and next steps.\nInclude the actions array [\"SETTING_UPDATED\"] in your response.";
75
- export declare const SETTINGS_FAILURE_TEMPLATE = "# Task: Generate a response for failed setting updates\n\n# About {{agentName}}:\n{{bio}}\n\n# Current Settings Status:\n{{settingsStatus}}\n\n# Next Required Setting:\n- Name: {{nextSetting.name}}\n- Description: {{nextSetting.description}}\n- Required: Yes\n- Remaining Required Settings: {{remainingRequired}}\n\n# Recent Conversation:\n{{recentMessages}}\n\n# Instructions:\n1. Express that you couldn't understand or process the setting update\n2. Maintain {{agentName}}'s personality and tone\n3. Provide clear guidance on what setting needs to be configured next\n4. Explain what the setting is for and how to set it properly\n5. Use a helpful, patient tone\n\nWrite a natural, conversational response that {{agentName}} would send about the failed update and how to proceed.\nInclude the actions array [\"SETTING_UPDATE_FAILED\"] in your response.";
76
- export declare const SETTINGS_ERROR_TEMPLATE = "# Task: Generate a response for an error during setting updates\n\n# About {{agentName}}:\n{{bio}}\n\n# Recent Conversation:\n{{recentMessages}}\n\n# Instructions:\n1. Apologize for the technical difficulty\n2. Maintain {{agentName}}'s personality and tone\n3. Suggest trying again or contacting support if the issue persists\n4. Keep the message concise and helpful\n\nWrite a natural, conversational response that {{agentName}} would send about the error.\nInclude the actions array [\"SETTING_UPDATE_ERROR\"] in your response.";
77
- export declare const SETTINGS_COMPLETION_TEMPLATE = "# Task: Generate a response for settings completion\n\n# About {{agentName}}:\n{{bio}}\n\n# Settings Status:\n{{settingsStatus}}\n\n# Recent Conversation:\n{{recentMessages}}\n\n# Instructions:\n1. Congratulate the user on completing the settings process\n2. Maintain {{agentName}}'s personality and tone\n3. Summarize the key settings that have been configured\n4. Explain what functionality is now available\n5. Provide guidance on what the user can do next\n6. Express enthusiasm about working together\n\nWrite a natural, conversational response that {{agentName}} would send about the successful completion of settings.\nInclude the actions array [\"ONBOARDING_COMPLETE\"] in your response.";
78
- export declare const autonomyContinuousFirstTemplate = "You are running in AUTONOMOUS CONTINUOUS MODE.\n\nYour job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- If you cannot act, state the missing info and the safest next step to obtain it.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nThink briefly, then state what you want to do next and take action if needed.";
79
- export declare const autonomyContinuousContinueTemplate = "You are running in AUTONOMOUS CONTINUOUS MODE.\n\nYour job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- If you cannot act, state the missing info and the safest next step to obtain it.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue from that note. Decide the next step and act if needed.";
80
- export declare const autonomyTaskFirstTemplate = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- If you need UI control, use ComputerUse actions.\n- In MCP mode, selector-based actions require a process scope (pass process=... or prefix selector with \"process:<name> >> ...\").\n- Prefer safe, incremental steps; if unsure, gather more UI context before acting.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nDecide what to do next. Think briefly, then take the most useful action.";
81
- export declare const autonomyTaskContinueTemplate = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- If you need UI control, use ComputerUse actions.\n- In MCP mode, selector-based actions require a process scope (pass process=... or prefix selector with \"process:<name> >> ...\").\n- Prefer safe, incremental steps; if unsure, gather more UI context before acting.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue the task. Decide the next step and take action now.";
82
- export declare const AUTONOMY_CONTINUOUS_FIRST_TEMPLATE = "You are running in AUTONOMOUS CONTINUOUS MODE.\n\nYour job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- If you cannot act, state the missing info and the safest next step to obtain it.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nThink briefly, then state what you want to do next and take action if needed.";
83
- export declare const AUTONOMY_CONTINUOUS_CONTINUE_TEMPLATE = "You are running in AUTONOMOUS CONTINUOUS MODE.\n\nYour job: reflect on context, decide what you want to do next, and act if appropriate.\n- Use available actions/tools when they can advance the goal.\n- If you cannot act, state the missing info and the safest next step to obtain it.\n- Keep the response concise, focused on the next action.\n\nUSER CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue from that note. Decide the next step and act if needed.";
84
- export declare const AUTONOMY_TASK_FIRST_TEMPLATE = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- If you need UI control, use ComputerUse actions.\n- In MCP mode, selector-based actions require a process scope (pass process=... or prefix selector with \"process:<name> >> ...\").\n- Prefer safe, incremental steps; if unsure, gather more UI context before acting.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nDecide what to do next. Think briefly, then take the most useful action.";
85
- export declare const AUTONOMY_TASK_CONTINUE_TEMPLATE = "You are running in AUTONOMOUS TASK MODE.\n\nYour job: continue helping the user and make progress toward the task.\n- Use available actions/tools to gather information or execute steps.\n- If you need UI control, use ComputerUse actions.\n- In MCP mode, selector-based actions require a process scope (pass process=... or prefix selector with \"process:<name> >> ...\").\n- Prefer safe, incremental steps; if unsure, gather more UI context before acting.\n\nUSER CHAT CONTEXT (most recent last):\n{{targetRoomContext}}\n\nYour last autonomous note: \"{{lastThought}}\"\n\nContinue the task. Decide the next step and take action now.";
86
68
  //# sourceMappingURL=prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,szBA0BxB,CAAC;AAEX,eAAO,MAAM,sBAAsB,u4CA6CzB,CAAC;AAEX,eAAO,MAAM,oBAAoB,gwFA4C+M,CAAC;AAEjP,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAEhE,eAAO,MAAM,wBAAwB,w8CAuB3B,CAAC;AAEX,eAAO,MAAM,yBAAyB,isDA4C5B,CAAC;AAEX,eAAO,MAAM,wBAAwB,kwBAqCpC,CAAC;AAEF,eAAO,MAAM,0BAA0B,4pCAuC7B,CAAC;AAGX,eAAO,MAAM,aAAa,64CAuBsN,CAAC;AAEjP,eAAO,MAAM,oBAAoB,8hBAiBqD,CAAC;AAEvF,eAAO,MAAM,uBAAuB,ojBAiBkD,CAAC;AAEvF,eAAO,MAAM,kBAAkB,6xBAuBuD,CAAC;AAEvF,eAAO,MAAM,sBAAsB,2lBAsBmD,CAAC;AAEvF,eAAO,MAAM,oBAAoB,+qBAuBqD,CAAC;AAEvF,eAAO,MAAM,wBAAwB,o1BAqB2M,CAAC;AAGjP,eAAO,MAAM,uBAAuB,szBAAwB,CAAC;AAC7D,eAAO,MAAM,wBAAwB,u4CAAyB,CAAC;AAC/D,eAAO,MAAM,sBAAsB,gwFAAuB,CAAC;AAC3D,eAAO,MAAM,cAAc,qCAAgB,CAAC;AAC5C,eAAO,MAAM,0BAA0B,w8CAA2B,CAAC;AACnE,eAAO,MAAM,4BAA4B,isDAA4B,CAAC;AACtE,eAAO,MAAM,2BAA2B,kwBAA2B,CAAC;AACpE,eAAO,MAAM,cAAc,64CAAgB,CAAC;AAC5C,eAAO,MAAM,sBAAsB,8hBAAuB,CAAC;AAC3D,eAAO,MAAM,yBAAyB,ojBAA0B,CAAC;AACjE,eAAO,MAAM,mBAAmB,6xBAAqB,CAAC;AACtD,eAAO,MAAM,wBAAwB,2lBAAyB,CAAC;AAC/D,eAAO,MAAM,sBAAsB,+qBAAuB,CAAC;AAC3D,eAAO,MAAM,0BAA0B,o1BAA2B,CAAC;AAGnE,eAAO,MAAM,wBAAwB,ytCA6B2M,CAAC;AAEjP,eAAO,MAAM,kBAAkB,muCA2BiN,CAAC;AAEjP,eAAO,MAAM,sBAAsB,i+BAuB6M,CAAC;AAEjP,eAAO,MAAM,qBAAqB,6yBAmB8M,CAAC;AAEjP,eAAO,MAAM,qBAAqB,mrCA4B8M,CAAC;AAGjP,eAAO,MAAM,wBAAwB,qmBAWJ,CAAC;AAElC,eAAO,MAAM,0BAA0B,+kBAWN,CAAC;AAElC,eAAO,MAAM,sBAAsB,qgBAYF,CAAC;AAElC,eAAO,MAAM,wBAAwB,kkBAWJ,CAAC;AAGlC,eAAO,MAAM,wBAAwB,snBAqBzB,CAAC;AAGb,eAAO,MAAM,kBAAkB,6kBAkBuD,CAAC;AAGvF,eAAO,MAAM,4BAA4B,25BA6B9B,CAAC;AAEZ,eAAO,MAAM,2BAA2B,0/BA+B7B,CAAC;AAEZ,eAAO,MAAM,0BAA0B,osBAuB3B,CAAC;AAEb,eAAO,MAAM,yBAAyB,6rCAoChB,CAAC;AAGvB,eAAO,MAAM,2BAA2B,ytCAA2B,CAAC;AACpE,eAAO,MAAM,oBAAoB,muCAAqB,CAAC;AACvD,eAAO,MAAM,wBAAwB,i+BAAyB,CAAC;AAC/D,eAAO,MAAM,uBAAuB,6yBAAwB,CAAC;AAC7D,eAAO,MAAM,uBAAuB,mrCAAwB,CAAC;AAC7D,eAAO,MAAM,2BAA2B,qmBAA2B,CAAC;AACpE,eAAO,MAAM,6BAA6B,+kBAA6B,CAAC;AACxE,eAAO,MAAM,yBAAyB,qgBAAyB,CAAC;AAChE,eAAO,MAAM,2BAA2B,kkBAA2B,CAAC;AAEpE,eAAO,MAAM,oBAAoB,qmBAA2B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,+kBAA6B,CAAC;AACjE,eAAO,MAAM,kBAAkB,qgBAAyB,CAAC;AACzD,eAAO,MAAM,oBAAoB,kkBAA2B,CAAC;AAC7D,eAAO,MAAM,0BAA0B,snBAA2B,CAAC;AACnE,eAAO,MAAM,oBAAoB,6kBAAqB,CAAC;AACvD,eAAO,MAAM,8BAA8B,25BAA+B,CAAC;AAC3E,eAAO,MAAM,6BAA6B,0/BAA8B,CAAC;AACzE,eAAO,MAAM,6BAA6B,osBAA6B,CAAC;AACxE,eAAO,MAAM,2BAA2B,6rCAA4B,CAAC;AAErE,eAAO,MAAM,2BAA2B,+4DAsDwM,CAAC;AAEjP,eAAO,MAAM,6BAA6B,+4DAA8B,CAAC;AAGzE,eAAO,MAAM,wBAAwB,ioCAgCiD,CAAC;AAGvF,eAAO,MAAM,iBAAiB,24BA8BwD,CAAC;AAGvF,eAAO,MAAM,uBAAuB,wuBAgB4B,CAAC;AAEjE,eAAO,MAAM,uBAAuB,41BAyBkC,CAAC;AAEvE,eAAO,MAAM,qBAAqB,shBAemC,CAAC;AAEtE,eAAO,MAAM,0BAA0B,4rBAoB6B,CAAC;AAGrE,eAAO,MAAM,0BAA0B,ioCAA2B,CAAC;AACnE,eAAO,MAAM,kBAAkB,24BAAoB,CAAC;AACpD,eAAO,MAAM,yBAAyB,wuBAA0B,CAAC;AACjE,eAAO,MAAM,yBAAyB,41BAA0B,CAAC;AACjE,eAAO,MAAM,uBAAuB,shBAAwB,CAAC;AAC7D,eAAO,MAAM,4BAA4B,4rBAA6B,CAAC;AAGvE,eAAO,MAAM,+BAA+B,seAUkC,CAAC;AAE/E,eAAO,MAAM,kCAAkC,2gBAYkB,CAAC;AAElE,eAAO,MAAM,yBAAyB,ulBAWmC,CAAC;AAE1E,eAAO,MAAM,4BAA4B,6nBAaoB,CAAC;AAG9D,eAAO,MAAM,kCAAkC,seACf,CAAC;AACjC,eAAO,MAAM,qCAAqC,2gBACf,CAAC;AACpC,eAAO,MAAM,4BAA4B,ulBAA4B,CAAC;AACtE,eAAO,MAAM,+BAA+B,6nBAA+B,CAAC"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,kBAAkB,svBA4BY,CAAC;AAE5C,eAAO,MAAM,oBAAoB,svBAAqB,CAAC;AAEvD,eAAO,MAAM,kCAAkC,4vBAcsB,CAAC;AAEtE,eAAO,MAAM,qCAAqC,4vBACf,CAAC;AAEpC,eAAO,MAAM,+BAA+B,qsBAYoB,CAAC;AAEjE,eAAO,MAAM,kCAAkC,qsBACf,CAAC;AAEjC,eAAO,MAAM,4BAA4B,yxBAgBgB,CAAC;AAE1D,eAAO,MAAM,+BAA+B,yxBAA+B,CAAC;AAE5E,eAAO,MAAM,yBAAyB,+tBAasC,CAAC;AAE7E,eAAO,MAAM,4BAA4B,+tBAA4B,CAAC;AAEtE,eAAO,MAAM,oBAAoB,6cAemC,CAAC;AAErE,eAAO,MAAM,sBAAsB,6cAAuB,CAAC;AAE3D,eAAO,MAAM,wBAAwB,6lCAiBmG,CAAC;AAEzI,eAAO,MAAM,0BAA0B,6lCAA2B,CAAC;AAEnE,eAAO,MAAM,uBAAuB,weAegC,CAAC;AAErE,eAAO,MAAM,yBAAyB,weAA0B,CAAC;AAEjE,eAAO,MAAM,sBAAsB,qzCAuCtB,CAAC;AAEd,eAAO,MAAM,wBAAwB,qzCAAyB,CAAC;AAE/D,eAAO,MAAM,yBAAyB,2kDAsCtB,CAAC;AAEjB,eAAO,MAAM,4BAA4B,2kDAA4B,CAAC;AAEtE,eAAO,MAAM,wBAAwB,srBA+BA,CAAC;AAEtC,eAAO,MAAM,2BAA2B,srBAA2B,CAAC;AAEpE,eAAO,MAAM,wBAAwB,srBAmBmG,CAAC;AAEzI,eAAO,MAAM,0BAA0B,srBAA2B,CAAC;AAEnE,eAAO,MAAM,0BAA0B,o/BA8B1B,CAAC;AAEd,eAAO,MAAM,6BAA6B,o/BAA6B,CAAC;AAExE,eAAO,MAAM,oBAAoB,qwEAkCuG,CAAC;AAEzI,eAAO,MAAM,sBAAsB,qwEAAuB,CAAC;AAE3D,eAAO,MAAM,2BAA2B,u8CAuCgG,CAAC;AAEzI,eAAO,MAAM,6BAA6B,u8CAA8B,CAAC;AAEzE,eAAO,MAAM,kBAAkB,upBAqBqC,CAAC;AAErE,eAAO,MAAM,mBAAmB,upBAAqB,CAAC;AAEtD,eAAO,MAAM,qBAAqB,ueAmBnB,CAAC;AAEhB,eAAO,MAAM,uBAAuB,ueAAwB,CAAC;AAE7D,eAAO,MAAM,aAAa,8uCAqB8G,CAAC;AAEzI,eAAO,MAAM,cAAc,8uCAAgB,CAAC;AAE5C,eAAO,MAAM,wBAAwB,+uBA2BS,CAAC;AAE/C,eAAO,MAAM,2BAA2B,+uBAA2B,CAAC;AAEpE,eAAO,MAAM,sBAAsB,0oBAsBtB,CAAC;AAEd,eAAO,MAAM,wBAAwB,0oBAAyB,CAAC;AAE/D,eAAO,MAAM,wBAAwB,meAiBtB,CAAC;AAEhB,eAAO,MAAM,2BAA2B,meAA2B,CAAC;AAEpE,eAAO,MAAM,sBAAsB,8cAiBpB,CAAC;AAEhB,eAAO,MAAM,yBAAyB,8cAAyB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,wwCA0CjB,CAAC;AAElB,eAAO,MAAM,uBAAuB,wwCAAwB,CAAC;AAE7D,eAAO,MAAM,0BAA0B,idAiBxB,CAAC;AAEhB,eAAO,MAAM,6BAA6B,idAA6B,CAAC;AAExE,eAAO,MAAM,wBAAwB,qdAiBtB,CAAC;AAEhB,eAAO,MAAM,2BAA2B,qdAA2B,CAAC;AAEpE,eAAO,MAAM,qBAAqB,0xBA0BC,CAAC;AAEpC,eAAO,MAAM,uBAAuB,0xBAAwB,CAAC;AAE7D,eAAO,MAAM,oBAAoB,ogBAiBmC,CAAC;AAErE,eAAO,MAAM,sBAAsB,ogBAAuB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,+bAgBiC,CAAC;AAErE,eAAO,MAAM,wBAAwB,+bAAyB,CAAC;AAE/D,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAEhE,eAAO,MAAM,cAAc,qCAAgB,CAAC"}
package/dist/runtime.d.ts CHANGED
@@ -330,6 +330,7 @@ export declare class AgentRuntime implements IAgentRuntime {
330
330
  private _createServiceResolver;
331
331
  getServiceLoadPromise(serviceType: ServiceTypeName | string): Promise<Service>;
332
332
  registerModel(modelType: ModelTypeName | string, handler: (runtime: IAgentRuntime, params: Record<string, JsonValue | object>) => Promise<JsonValue | object>, provider: string, priority?: number): void;
333
+ private resolveModelRegistration;
333
334
  getModel(modelType: ModelTypeName | string): ((runtime: IAgentRuntime, params: Record<string, JsonValue | object>) => Promise<JsonValue | object>) | undefined;
334
335
  /**
335
336
  * Retrieves model configuration settings from character settings with support for
@@ -391,10 +392,11 @@ export declare class AgentRuntime implements IAgentRuntime {
391
392
  schema: SchemaRow[];
392
393
  options?: {
393
394
  key?: string;
394
- modelSize?: "small" | "large";
395
+ modelSize?: "nano" | "mini" | "small" | "large" | "mega";
396
+ modelType?: import("./types").TextGenerationModelType;
395
397
  model?: string;
396
- preferredEncapsulation?: "json" | "xml";
397
- forceFormat?: "json" | "xml";
398
+ preferredEncapsulation?: "json" | "xml" | "toon";
399
+ forceFormat?: "json" | "xml" | "toon";
398
400
  requiredFields?: string[];
399
401
  contextCheckLevel?: 0 | 1 | 2 | 3;
400
402
  checkpointCodes?: boolean;
@@ -411,6 +413,7 @@ export declare class AgentRuntime implements IAgentRuntime {
411
413
  private schemaHasNestedStructure;
412
414
  private renderXmlSchemaExample;
413
415
  private renderJsonSchemaExample;
416
+ private renderToonSchemaExample;
414
417
  private buildJsonExampleValue;
415
418
  private buildJsonExampleValueAtDepth;
416
419
  private validateResponseAgainstSchema;
@@ -433,6 +436,17 @@ export declare class AgentRuntime implements IAgentRuntime {
433
436
  * Returns true if aborted, false if sleep completed normally.
434
437
  */
435
438
  private abortableSleep;
439
+ /**
440
+ * Template rendering helpers for prompt caching and deterministic compilation.
441
+ */
442
+ private getCompiledRuntimeTemplate;
443
+ private cleanDynamicPromptTemplateOutput;
444
+ private extractTemplatePlaceholderKeys;
445
+ private isTemplateChunkStable;
446
+ private getPromptProviderSegments;
447
+ private renderPromptTemplateSegments;
448
+ private joinPromptSegmentGroups;
449
+ private mergePromptSegments;
436
450
  /**
437
451
  * Convert double-brace Handlebars bindings to triple-brace (non-escaping).
438
452
  *