@elizaos/core 1.2.12 → 1.3.0

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.
@@ -5206,20 +5206,22 @@ Agent: {{agentName}} (ID: {{agentId}})
5206
5206
  5. If multiple matches exist, use context to disambiguate
5207
5207
  6. Consider recent interactions and relationship strength when resolving ambiguity
5208
5208
 
5209
- Return a JSON object with:
5210
- \`\`\`json
5211
- {
5212
- "entityId": "exact-id-if-known-otherwise-null",
5213
- "type": "EXACT_MATCH | USERNAME_MATCH | NAME_MATCH | RELATIONSHIP_MATCH | AMBIGUOUS | UNKNOWN",
5214
- "matches": [{
5215
- "name": "matched-name",
5216
- "reason": "why this entity matches"
5217
- }]
5218
- }
5219
- \`\`\`
5209
+ Do NOT include any thinking, reasoning, or <think> sections in your response.
5210
+ Go directly to the XML response format without any preamble or explanation.
5211
+
5212
+ Return an XML response with:
5213
+ <response>
5214
+ <entityId>exact-id-if-known-otherwise-null</entityId>
5215
+ <type>EXACT_MATCH | USERNAME_MATCH | NAME_MATCH | RELATIONSHIP_MATCH | AMBIGUOUS | UNKNOWN</type>
5216
+ <matches>
5217
+ <match>
5218
+ <name>matched-name</name>
5219
+ <reason>why this entity matches</reason>
5220
+ </match>
5221
+ </matches>
5222
+ </response>
5220
5223
 
5221
- Make sure to include the \`\`\`json\`\`\` tags around the JSON object.
5222
- `;
5224
+ IMPORTANT: 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>.`;
5223
5225
  async function getRecentInteractions(runtime, sourceEntityId, candidateEntities, roomId, relationships) {
5224
5226
  const results = [];
5225
5227
  const recentMessages = await runtime.getMemories({
@@ -5310,7 +5312,7 @@ async function findEntityByName(runtime, message, state) {
5310
5312
  prompt,
5311
5313
  stopSequences: []
5312
5314
  });
5313
- const resolution = parseJSONObjectFromText(result);
5315
+ const resolution = parseKeyValueXml(result);
5314
5316
  if (!resolution) {
5315
5317
  logger.warn("Failed to parse entity resolution result");
5316
5318
  return null;
@@ -5333,8 +5335,12 @@ async function findEntityByName(runtime, message, state) {
5333
5335
  return entity;
5334
5336
  }
5335
5337
  }
5336
- if (resolution.matches?.[0]?.name) {
5337
- const matchName = resolution.matches[0].name.toLowerCase();
5338
+ let matchesArray = [];
5339
+ if (resolution.matches?.match) {
5340
+ matchesArray = Array.isArray(resolution.matches.match) ? resolution.matches.match : [resolution.matches.match];
5341
+ }
5342
+ if (matchesArray.length > 0 && matchesArray[0]?.name) {
5343
+ const matchName = matchesArray[0].name.toLowerCase();
5338
5344
  const matchingEntity = allEntities.find((entity) => {
5339
5345
  if (entity.names.some((n) => n.toLowerCase() === matchName)) return true;
5340
5346
  return entity.components?.some(
package/dist/index.js CHANGED
@@ -103,7 +103,7 @@ import {
103
103
  v2_exports,
104
104
  validateCharacter,
105
105
  validateUuid
106
- } from "./chunk-EFASA4CC.js";
106
+ } from "./chunk-P3YTG22Y.js";
107
107
  import "./chunk-2HSL25IJ.js";
108
108
  import "./chunk-WO7Z3GE6.js";
109
109
  import "./chunk-U2ADTLZY.js";
@@ -7,7 +7,7 @@ import {
7
7
  formatTimestamp3 as formatTimestamp,
8
8
  generateUuidFromString,
9
9
  getActorDetails
10
- } from "../../chunk-EFASA4CC.js";
10
+ } from "../../chunk-P3YTG22Y.js";
11
11
  import {
12
12
  createTemplateFunction,
13
13
  getTemplateValues,
@@ -3,7 +3,7 @@ import {
3
3
  formatMessages3 as formatMessages,
4
4
  formatTimestamp3 as formatTimestamp,
5
5
  getActorDetails
6
- } from "../../chunk-EFASA4CC.js";
6
+ } from "../../chunk-P3YTG22Y.js";
7
7
  import "../../chunk-2HSL25IJ.js";
8
8
  import "../../chunk-WO7Z3GE6.js";
9
9
  import "../../chunk-U2ADTLZY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  formatPosts3 as formatPosts
3
- } from "../../chunk-EFASA4CC.js";
3
+ } from "../../chunk-P3YTG22Y.js";
4
4
  import "../../chunk-2HSL25IJ.js";
5
5
  import "../../chunk-WO7Z3GE6.js";
6
6
  import "../../chunk-U2ADTLZY.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentRuntime3 as AgentRuntime
3
- } from "../../chunk-EFASA4CC.js";
3
+ } from "../../chunk-P3YTG22Y.js";
4
4
  import "../../chunk-2HSL25IJ.js";
5
5
  import "../../chunk-WO7Z3GE6.js";
6
6
  import "../../chunk-U2ADTLZY.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  asUUID3 as asUUID,
3
3
  generateUuidFromString
4
- } from "../../chunk-EFASA4CC.js";
4
+ } from "../../chunk-P3YTG22Y.js";
5
5
  import "../../chunk-2HSL25IJ.js";
6
6
  import "../../chunk-WO7Z3GE6.js";
7
7
  import "../../chunk-U2ADTLZY.js";
@@ -78,7 +78,7 @@ import {
78
78
  unsaltWorldSettings2 as unsaltWorldSettings,
79
79
  updateWorldSettings2 as updateWorldSettings,
80
80
  validateUuid2 as validateUuid
81
- } from "../../chunk-EFASA4CC.js";
81
+ } from "../../chunk-P3YTG22Y.js";
82
82
  import "../../chunk-2HSL25IJ.js";
83
83
  import "../../chunk-WO7Z3GE6.js";
84
84
  import "../../chunk-U2ADTLZY.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/core",
3
- "version": "1.2.12",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,6 +55,7 @@
55
55
  "typescript": "5.8.3"
56
56
  },
57
57
  "dependencies": {
58
+ "@langchain/core": ">=0.3.0 <0.4.0",
58
59
  "@sentry/browser": "^9.22.0",
59
60
  "buffer": "^6.0.3",
60
61
  "crypto-browserify": "^3.12.1",
@@ -75,5 +76,5 @@
75
76
  "publishConfig": {
76
77
  "access": "public"
77
78
  },
78
- "gitHead": "991b811b95d08df421efc4f516d0cfb52c4a83b3"
79
+ "gitHead": "64bdc6d3b24236d214f743e3c966993c6f5268f7"
79
80
  }