@elizaos/core 1.0.0-alpha.35 → 1.0.0-alpha.37

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/index.js CHANGED
@@ -201,6 +201,11 @@ var PlatformPrefix = /* @__PURE__ */ ((PlatformPrefix2) => {
201
201
  PlatformPrefix2["TWITTER"] = "TWITTER";
202
202
  return PlatformPrefix2;
203
203
  })(PlatformPrefix || {});
204
+ var SOCKET_MESSAGE_TYPE = /* @__PURE__ */ ((SOCKET_MESSAGE_TYPE2) => {
205
+ SOCKET_MESSAGE_TYPE2[SOCKET_MESSAGE_TYPE2["ROOM_JOINING"] = 1] = "ROOM_JOINING";
206
+ SOCKET_MESSAGE_TYPE2[SOCKET_MESSAGE_TYPE2["SEND_MESSAGE"] = 2] = "SEND_MESSAGE";
207
+ return SOCKET_MESSAGE_TYPE2;
208
+ })(SOCKET_MESSAGE_TYPE || {});
204
209
 
205
210
  // src/actions.ts
206
211
  import { names, uniqueNamesGenerator } from "unique-names-generator";
@@ -1335,8 +1340,8 @@ function getErrorMap() {
1335
1340
  return overrideErrorMap;
1336
1341
  }
1337
1342
  var makeIssue = (params) => {
1338
- const { data, path: path3, errorMaps, issueData } = params;
1339
- const fullPath = [...path3, ...issueData.path || []];
1343
+ const { data, path: path2, errorMaps, issueData } = params;
1344
+ const fullPath = [...path2, ...issueData.path || []];
1340
1345
  const fullIssue = {
1341
1346
  ...issueData,
1342
1347
  path: fullPath
@@ -1461,11 +1466,11 @@ var errorUtil;
1461
1466
  var _ZodEnum_cache;
1462
1467
  var _ZodNativeEnum_cache;
1463
1468
  var ParseInputLazyPath = class {
1464
- constructor(parent, value, path3, key) {
1469
+ constructor(parent, value, path2, key) {
1465
1470
  this._cachedPath = [];
1466
1471
  this.parent = parent;
1467
1472
  this.data = value;
1468
- this._path = path3;
1473
+ this._path = path2;
1469
1474
  this._key = key;
1470
1475
  }
1471
1476
  get path() {
@@ -5164,11 +5169,11 @@ function validateCharacterConfig(json) {
5164
5169
  if (error instanceof z.ZodError) {
5165
5170
  const groupedErrors = error.errors.reduce(
5166
5171
  (acc, err) => {
5167
- const path3 = err.path.join(".");
5168
- if (!acc[path3]) {
5169
- acc[path3] = [];
5172
+ const path2 = err.path.join(".");
5173
+ if (!acc[path2]) {
5174
+ acc[path2] = [];
5170
5175
  }
5171
- acc[path3].push(err.message);
5176
+ acc[path2].push(err.message);
5172
5177
  return acc;
5173
5178
  },
5174
5179
  {}
@@ -5187,8 +5192,6 @@ function validateCharacterConfig(json) {
5187
5192
  }
5188
5193
 
5189
5194
  // src/import.ts
5190
- import path2 from "node:path";
5191
- import fs2 from "node:fs";
5192
5195
  var registrations = /* @__PURE__ */ new Map();
5193
5196
  var dynamicImport = async (specifier) => {
5194
5197
  const module = registrations.get(specifier);
@@ -5205,24 +5208,11 @@ async function handlePluginImporting(plugins) {
5205
5208
  logger_default.debug("Imported are: ", plugins);
5206
5209
  const importedPlugins = await Promise.all(
5207
5210
  plugins.map(async (plugin) => {
5208
- const functionName = `${plugin.replace("@elizaos/plugin-", "").replace("@elizaos-plugins/", "").replace(/-./g, (x) => x[1].toUpperCase())}Plugin`;
5209
5211
  try {
5210
5212
  const importedPlugin = await import(plugin);
5213
+ const functionName = `${plugin.replace("@elizaos/plugin-", "").replace("@elizaos-plugins/", "").replace(/-./g, (x) => x[1].toUpperCase())}Plugin`;
5211
5214
  return importedPlugin.default || importedPlugin[functionName];
5212
5215
  } catch (importError) {
5213
- const nodeModulesPath = path2.join(process.cwd(), "node_modules");
5214
- if (fs2.existsSync(nodeModulesPath)) {
5215
- const pluginPath = path2.join(nodeModulesPath, plugin);
5216
- if (fs2.existsSync(pluginPath)) {
5217
- try {
5218
- const importedPlugin = await import(pluginPath);
5219
- return importedPlugin.default || importedPlugin[functionName];
5220
- } catch (importError2) {
5221
- logger_default.error(`Failed to import plugin: ${plugin}`, importError2);
5222
- return [];
5223
- }
5224
- }
5225
- }
5226
5216
  logger_default.error(`Failed to import plugin: ${plugin}`, importError);
5227
5217
  return [];
5228
5218
  }
@@ -12535,6 +12525,7 @@ export {
12535
12525
  PlatformPrefix,
12536
12526
  PluginSchema,
12537
12527
  Role,
12528
+ SOCKET_MESSAGE_TYPE,
12538
12529
  Service,
12539
12530
  ServiceTypes,
12540
12531
  TEEMode,