@elizaos/core 1.0.0-beta.20 → 1.0.0-beta.22
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.d.ts +0 -1
- package/dist/index.js +0 -46
- package/package.json +2 -2
- package/dist/import.d.ts +0 -15
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1119,40 +1119,6 @@ Data: ${JSON.stringify(entity.metadata)}
|
|
|
1119
1119
|
return entityStrings.join("\n");
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
-
// src/import.ts
|
|
1123
|
-
var registrations = /* @__PURE__ */ new Map();
|
|
1124
|
-
var dynamicImport = async (specifier) => {
|
|
1125
|
-
const module = registrations.get(specifier);
|
|
1126
|
-
if (module !== void 0) {
|
|
1127
|
-
return module;
|
|
1128
|
-
}
|
|
1129
|
-
return await import(specifier);
|
|
1130
|
-
};
|
|
1131
|
-
var registerDynamicImport = (specifier, module) => {
|
|
1132
|
-
registrations.set(specifier, module);
|
|
1133
|
-
};
|
|
1134
|
-
async function handlePluginImporting(plugins) {
|
|
1135
|
-
if (plugins.length > 0) {
|
|
1136
|
-
const importedPlugins = await Promise.all(
|
|
1137
|
-
plugins.map(async (plugin) => {
|
|
1138
|
-
try {
|
|
1139
|
-
const importedPlugin = await import(plugin);
|
|
1140
|
-
const functionName = `${plugin.replace("@elizaos/plugin-", "").replace("@elizaos-plugins/", "").replace(/-./g, (x) => x[1].toUpperCase())}Plugin`;
|
|
1141
|
-
if (functionName === "localAiPlugin") {
|
|
1142
|
-
return importedPlugin["localAIPlugin"];
|
|
1143
|
-
}
|
|
1144
|
-
return importedPlugin.default || importedPlugin[functionName];
|
|
1145
|
-
} catch (importError) {
|
|
1146
|
-
logger_default.error(`Failed to import plugin: ${plugin} during runtime dynamic import`);
|
|
1147
|
-
return [];
|
|
1148
|
-
}
|
|
1149
|
-
})
|
|
1150
|
-
);
|
|
1151
|
-
return importedPlugins;
|
|
1152
|
-
}
|
|
1153
|
-
return [];
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
1122
|
// src/roles.ts
|
|
1157
1123
|
async function getUserServerRole(runtime, entityId, serverId) {
|
|
1158
1124
|
try {
|
|
@@ -1395,15 +1361,6 @@ var AgentRuntime = class {
|
|
|
1395
1361
|
async initialize() {
|
|
1396
1362
|
const registeredPluginNames = /* @__PURE__ */ new Set();
|
|
1397
1363
|
const pluginRegistrationPromises = [];
|
|
1398
|
-
if (this.character.plugins) {
|
|
1399
|
-
const characterPlugins = await handlePluginImporting(this.character.plugins);
|
|
1400
|
-
for (const plugin of characterPlugins) {
|
|
1401
|
-
if (plugin && !registeredPluginNames.has(plugin.name)) {
|
|
1402
|
-
registeredPluginNames.add(plugin.name);
|
|
1403
|
-
pluginRegistrationPromises.push(await this.registerPlugin(plugin));
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
1364
|
for (const plugin of [...this.plugins]) {
|
|
1408
1365
|
if (plugin && !registeredPluginNames.has(plugin.name)) {
|
|
1409
1366
|
registeredPluginNames.add(plugin.name);
|
|
@@ -2787,7 +2744,6 @@ export {
|
|
|
2787
2744
|
decryptStringValue as decryptSecret,
|
|
2788
2745
|
decryptStringValue,
|
|
2789
2746
|
decryptedCharacter,
|
|
2790
|
-
dynamicImport,
|
|
2791
2747
|
elizaLogger,
|
|
2792
2748
|
encryptObjectValues,
|
|
2793
2749
|
encryptStringValue,
|
|
@@ -2812,7 +2768,6 @@ export {
|
|
|
2812
2768
|
getVideoService,
|
|
2813
2769
|
getWavHeader,
|
|
2814
2770
|
getWorldSettings,
|
|
2815
|
-
handlePluginImporting,
|
|
2816
2771
|
initializeOnboarding,
|
|
2817
2772
|
isCustomMetadata,
|
|
2818
2773
|
isDescriptionMetadata,
|
|
@@ -2831,7 +2786,6 @@ export {
|
|
|
2831
2786
|
postActionResponseFooter,
|
|
2832
2787
|
postCreationTemplate,
|
|
2833
2788
|
prependWavHeader,
|
|
2834
|
-
registerDynamicImport,
|
|
2835
2789
|
saltSettingValue,
|
|
2836
2790
|
saltWorldSettings,
|
|
2837
2791
|
shouldRespondTemplate,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "5844a4f224bef099c84e9165e46552cdf5f28652"
|
|
80
80
|
}
|
package/dist/import.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const dynamicImport: (specifier: string) => Promise<any>;
|
|
2
|
-
export declare const registerDynamicImport: (specifier: string, module: any) => void;
|
|
3
|
-
/**
|
|
4
|
-
* Handles importing of plugins asynchronously.
|
|
5
|
-
*
|
|
6
|
-
* @param {string[]} plugins - An array of strings representing the plugins to import.
|
|
7
|
-
* @returns {Promise<Function[]>} - A Promise that resolves to an array of imported plugins functions.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Handles the importing of plugins based on the provided array of plugin names.
|
|
11
|
-
*
|
|
12
|
-
* @param {string[]} plugins - An array of plugin names to import
|
|
13
|
-
* @returns {Promise<any[]>} - A Promise that resolves to an array of imported plugins
|
|
14
|
-
*/
|
|
15
|
-
export declare function handlePluginImporting(plugins: string[]): Promise<any[]>;
|