@elizaos/core 1.6.1 → 1.6.2-alpha.2

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.
package/dist/prompts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const shouldRespondTemplate = "<task>Decide on behalf of {{agentName}} whether they should respond to the message, ignore it or stop the conversation.</task>\n\n<providers>\n{{providers}}\n</providers>\n\n<instructions>Decide if {{agentName}} should respond to or interact with the conversation.\nIf the message is directed at or relevant to {{agentName}}, respond with RESPOND action.\nIf a user asks {{agentName}} to be quiet, respond with STOP action.\nIf {{agentName}} should ignore the message, respond with IGNORE action.</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 <name>{{agentName}}</name>\n <reasoning>Your reasoning here</reasoning>\n <action>RESPOND | IGNORE | STOP</action>\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>";
1
+ export declare const shouldRespondTemplate = "<task>Decide on behalf of {{agentName}} whether they should respond to the message, ignore it or stop the conversation.</task>\n\n<providers>\n{{providers}}\n</providers>\n\n<instructions>Decide if {{agentName}} should respond to or interact with the conversation.\n\nIMPORTANT RULES FOR RESPONDING:\n- If YOUR name ({{agentName}}) is directly mentioned \u2192 RESPOND\n- If someone uses a DIFFERENT name (not {{agentName}}) \u2192 IGNORE (they're talking to someone else)\n- If you're actively participating in a conversation and the message continues that thread \u2192 RESPOND\n- If someone tells you to stop or be quiet \u2192 STOP\n- Otherwise \u2192 IGNORE\n\nThe key distinction is:\n- \"Talking TO {{agentName}}\" (your name mentioned, replies to you, continuing your conversation) \u2192 RESPOND\n- \"Talking ABOUT {{agentName}}\" or to someone else \u2192 IGNORE\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 <name>{{agentName}}</name>\n <reasoning>Your reasoning here</reasoning>\n <action>RESPOND | IGNORE | STOP</action>\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>";
2
2
  export declare const messageHandlerTemplate = "<task>Generate dialog and actions for the character {{agentName}}.</task>\n\n<providers>\n{{providers}}\n</providers>\n\n<instructions>\nWrite a thought and plan for {{agentName}} and decide what actions to take. Also include the providers that {{agentName}} will use to have the right context for responding and acting, if any.\n\nIMPORTANT ACTION ORDERING RULES:\n- Actions are executed in the ORDER you list them - the order MATTERS!\n- REPLY should come FIRST to acknowledge the user's request before executing other actions\n- Common patterns:\n - For requests requiring tool use: REPLY,CALL_MCP_TOOL (acknowledge first, then gather info)\n - For task execution: REPLY,SEND_MESSAGE or REPLY,EVM_SWAP_TOKENS (acknowledge first, then do the task)\n - For multi-step operations: REPLY,ACTION1,ACTION2 (acknowledge first, then complete all steps)\n- REPLY is used to acknowledge and inform the user about what you're going to do\n- Follow-up actions execute the actual tasks after acknowledgment\n- Use IGNORE only when you should not respond at all\n- If you use IGNORE, do not include any other actions. IGNORE should be used alone when you should not respond or take any actions.\n\nIMPORTANT PROVIDER SELECTION RULES:\n- Only include providers if they are needed to respond accurately.\n- If the message mentions images, photos, pictures, attachments, or visual content, OR if you see \"(Attachments:\" in the conversation, you MUST include \"ATTACHMENTS\" in your providers list\n- If the message asks about or references specific people, include \"ENTITIES\" in your providers list \n- If the message asks about relationships or connections between people, include \"RELATIONSHIPS\" in your providers list\n- If the message asks about facts or specific information, include \"FACTS\" in your providers list\n- If the message asks about the environment or world context, include \"WORLD\" in your providers list\n- If no additional context is needed, you may leave the providers list empty.\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\nFirst, think about what you want to do next and plan your actions. Then, write the next message and include the actions you plan to take.\n</instructions>\n\n<keys>\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"actions\" should be a comma-separated list of the actions {{agentName}} plans to take based on the thought, IN THE ORDER THEY SHOULD BE EXECUTED (if none, use IGNORE, if simply responding with text, use REPLY)\n\"providers\" should be a comma-separated list of the providers that {{agentName}} will use to have the right context for responding and acting (NEVER use \"IGNORE\" as a provider - use specific provider names like ATTACHMENTS, ENTITIES, FACTS, KNOWLEDGE, etc.)\n\"text\" should be the text of the next message for {{agentName}} which they will send to the conversation.\n</keys>\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 <thought>Your thought here</thought>\n <actions>ACTION1,ACTION2</actions>\n <providers>PROVIDER1,PROVIDER2</providers>\n <text>Your response text 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>.\n</output>";
3
3
  export declare const postCreationTemplate = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{twitterUserName}}.\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 tweet 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>.";
4
4
  export declare const booleanFooter = "Respond with only a YES or a NO.";
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,mmCAuBxB,CAAC;AAEX,eAAO,MAAM,sBAAsB,o+HA2DzB,CAAC;AAEX,eAAO,MAAM,oBAAoB,wwFA4C+M,CAAC;AAEjP,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAEhE,eAAO,MAAM,wBAAwB,y8CAuB3B,CAAC;AAEX,eAAO,MAAM,yBAAyB,qsDA4C5B,CAAC;AAEX,eAAO,MAAM,wBAAwB,4wBAqCpC,CAAC"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,49CAgCxB,CAAC;AAEX,eAAO,MAAM,sBAAsB,o+HA2DzB,CAAC;AAEX,eAAO,MAAM,oBAAoB,wwFA4C+M,CAAC;AAEjP,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAEhE,eAAO,MAAM,wBAAwB,y8CAuB3B,CAAC;AAEX,eAAO,MAAM,yBAAyB,qsDA4C5B,CAAC;AAEX,eAAO,MAAM,wBAAwB,4wBAqCpC,CAAC"}
@@ -33,12 +33,30 @@ export interface Content {
33
33
  attachments?: Media[];
34
34
  /** room type */
35
35
  channelType?: ChannelType;
36
+ /** Platform-provided metadata about mentions */
37
+ mentionContext?: MentionContext;
36
38
  /**
37
39
  * Additional dynamic properties
38
40
  * Use specific properties above instead of this when possible
39
41
  */
40
42
  [key: string]: unknown;
41
43
  }
44
+ /**
45
+ * Platform-provided metadata about mentions.
46
+ * Contains ONLY technical facts from the platform API.
47
+ * This allows bootstrap to make intelligent decisions about responding
48
+ * while keeping platform-specific logic isolated.
49
+ */
50
+ export interface MentionContext {
51
+ /** Platform native mention (@Discord, @Telegram, etc.) */
52
+ isMention: boolean;
53
+ /** Reply to agent's message */
54
+ isReply: boolean;
55
+ /** In a thread with agent */
56
+ isThread: boolean;
57
+ /** Platform-specific mention type for debugging/logging */
58
+ mentionType?: 'platform_mention' | 'reply' | 'thread' | 'none';
59
+ }
42
60
  /**
43
61
  * Represents a media attachment
44
62
  */
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/types/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAEvE;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAKvC;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,EAAE,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IAEX,gBAAgB;IAChB,GAAG,EAAE,MAAM,CAAC;IAEZ,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/core",
3
- "version": "1.6.1",
3
+ "version": "1.6.2-alpha.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "8102dbfd77658de611604bf496b23063fbf5e406"
83
+ "gitHead": "72880e8dab2e3bbe2640f2ca09764b84a80cebd5"
84
84
  }