@elizaos/cli 1.6.2-alpha.21 → 1.6.2-alpha.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/characters/eliza.d.ts +8 -7
- package/dist/characters/eliza.d.ts.map +1 -1
- package/dist/index.js +64 -74
- package/dist/index.js.map +7 -7
- package/dist/templates/plugin-quick-starter/package.json +2 -2
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/project-starter/package.json +6 -6
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +7 -7
- package/templates/plugin-quick-starter/package.json +2 -2
- package/templates/plugin-starter/package.json +2 -2
- package/templates/project-starter/package.json +6 -6
- package/templates/project-tee-starter/package.json +4 -4
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Character } from '@elizaos/core';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Get the Eliza character with plugins configured based on environment variables.
|
|
4
|
+
* Uses buildCharacterPlugins from @elizaos/core to determine which plugins to load.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @param env - Environment object to check for API keys (defaults to process.env)
|
|
7
|
+
* @returns The Eliza character with appropriate plugins for the current environment
|
|
7
8
|
*/
|
|
8
|
-
export declare function
|
|
9
|
+
export declare function getDefaultCharacter(env?: Record<string, string | undefined>): Character;
|
|
9
10
|
/**
|
|
10
11
|
* Legacy export for backward compatibility.
|
|
11
|
-
* Note: This will
|
|
12
|
-
*
|
|
12
|
+
* Note: This will use plugins based on current process.env.
|
|
13
|
+
* For explicit environment control, use getDefaultCharacter(env) instead.
|
|
13
14
|
*/
|
|
14
15
|
export declare const character: Character;
|
|
15
16
|
//# sourceMappingURL=eliza.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eliza.d.ts","sourceRoot":"","sources":["../../src/characters/eliza.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"eliza.d.ts","sourceRoot":"","sources":["../../src/characters/eliza.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AA0NtE;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,SAAS,CAKX;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,SAAiC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4749,7 +4749,7 @@ __export(exports_version, {
|
|
|
4749
4749
|
BUILD_TIME: () => BUILD_TIME,
|
|
4750
4750
|
BUILD_ENV: () => BUILD_ENV
|
|
4751
4751
|
});
|
|
4752
|
-
var CLI_VERSION = "1.6.2-alpha.
|
|
4752
|
+
var CLI_VERSION = "1.6.2-alpha.22", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-10-17T15:39:34.570Z", BUILD_ENV = "production", version_default;
|
|
4753
4753
|
var init_version = __esm(() => {
|
|
4754
4754
|
version_default = {
|
|
4755
4755
|
version: CLI_VERSION,
|
|
@@ -27589,7 +27589,7 @@ function assembleStyles() {
|
|
|
27589
27589
|
}
|
|
27590
27590
|
let [colorString] = matches;
|
|
27591
27591
|
if (colorString.length === 3) {
|
|
27592
|
-
colorString = [...colorString].map((
|
|
27592
|
+
colorString = [...colorString].map((character2) => character2 + character2).join("");
|
|
27593
27593
|
}
|
|
27594
27594
|
const integer2 = Number.parseInt(colorString, 16);
|
|
27595
27595
|
return [
|
|
@@ -98443,16 +98443,16 @@ var require_dumper = __commonJS((exports, module) => {
|
|
|
98443
98443
|
}
|
|
98444
98444
|
return result;
|
|
98445
98445
|
}
|
|
98446
|
-
function encodeHex(
|
|
98446
|
+
function encodeHex(character2) {
|
|
98447
98447
|
var string4, handle, length;
|
|
98448
|
-
string4 =
|
|
98449
|
-
if (
|
|
98448
|
+
string4 = character2.toString(16).toUpperCase();
|
|
98449
|
+
if (character2 <= 255) {
|
|
98450
98450
|
handle = "x";
|
|
98451
98451
|
length = 2;
|
|
98452
|
-
} else if (
|
|
98452
|
+
} else if (character2 <= 65535) {
|
|
98453
98453
|
handle = "u";
|
|
98454
98454
|
length = 4;
|
|
98455
|
-
} else if (
|
|
98455
|
+
} else if (character2 <= 4294967295) {
|
|
98456
98456
|
handle = "U";
|
|
98457
98457
|
length = 8;
|
|
98458
98458
|
} else {
|
|
@@ -112498,10 +112498,10 @@ ${lanes.join(`
|
|
|
112498
112498
|
result.push(lineStart);
|
|
112499
112499
|
return result;
|
|
112500
112500
|
}
|
|
112501
|
-
function getPositionOfLineAndCharacter(sourceFile, line,
|
|
112502
|
-
return sourceFile.getPositionOfLineAndCharacter ? sourceFile.getPositionOfLineAndCharacter(line,
|
|
112501
|
+
function getPositionOfLineAndCharacter(sourceFile, line, character2, allowEdits) {
|
|
112502
|
+
return sourceFile.getPositionOfLineAndCharacter ? sourceFile.getPositionOfLineAndCharacter(line, character2, allowEdits) : computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character2, sourceFile.text, allowEdits);
|
|
112503
112503
|
}
|
|
112504
|
-
function computePositionOfLineAndCharacter(lineStarts, line,
|
|
112504
|
+
function computePositionOfLineAndCharacter(lineStarts, line, character2, debugText, allowEdits) {
|
|
112505
112505
|
if (line < 0 || line >= lineStarts.length) {
|
|
112506
112506
|
if (allowEdits) {
|
|
112507
112507
|
line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
|
|
@@ -112509,7 +112509,7 @@ ${lanes.join(`
|
|
|
112509
112509
|
Debug2.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== undefined ? arrayIsEqualTo(lineStarts, computeLineStarts(debugText)) : "unknown"}`);
|
|
112510
112510
|
}
|
|
112511
112511
|
}
|
|
112512
|
-
const res = lineStarts[line] +
|
|
112512
|
+
const res = lineStarts[line] + character2;
|
|
112513
112513
|
if (allowEdits) {
|
|
112514
112514
|
return res > lineStarts[line + 1] ? lineStarts[line + 1] : typeof debugText === "string" && res > debugText.length ? debugText.length : res;
|
|
112515
112515
|
}
|
|
@@ -208255,10 +208255,10 @@ ${lanes.join(`
|
|
|
208255
208255
|
function formatDiagnostic(diagnostic, host) {
|
|
208256
208256
|
const errorMessage = `${diagnosticCategoryName(diagnostic)} TS${diagnostic.code}: ${flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())}${host.getNewLine()}`;
|
|
208257
208257
|
if (diagnostic.file) {
|
|
208258
|
-
const { line, character } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
208258
|
+
const { line, character: character2 } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
208259
208259
|
const fileName = diagnostic.file.fileName;
|
|
208260
208260
|
const relativeFileName = convertToRelativePath(fileName, host.getCurrentDirectory(), (fileName2) => host.getCanonicalFileName(fileName2));
|
|
208261
|
-
return `${relativeFileName}(${line + 1},${
|
|
208261
|
+
return `${relativeFileName}(${line + 1},${character2 + 1}): ` + errorMessage;
|
|
208262
208262
|
}
|
|
208263
208263
|
return errorMessage;
|
|
208264
208264
|
}
|
|
@@ -230922,8 +230922,8 @@ ${newComment.split(`
|
|
|
230922
230922
|
getLineStarts() {
|
|
230923
230923
|
return getLineStarts(this);
|
|
230924
230924
|
}
|
|
230925
|
-
getPositionOfLineAndCharacter(line,
|
|
230926
|
-
return computePositionOfLineAndCharacter(getLineStarts(this), line,
|
|
230925
|
+
getPositionOfLineAndCharacter(line, character2, allowEdits) {
|
|
230926
|
+
return computePositionOfLineAndCharacter(getLineStarts(this), line, character2, this.text, allowEdits);
|
|
230927
230927
|
}
|
|
230928
230928
|
getLineEndOfPosition(pos) {
|
|
230929
230929
|
const { line } = this.getLineAndCharacterOfPosition(pos);
|
|
@@ -238962,15 +238962,15 @@ ${newComment.split(`
|
|
|
238962
238962
|
">": ">",
|
|
238963
238963
|
"}": "}"
|
|
238964
238964
|
};
|
|
238965
|
-
function isValidCharacter(
|
|
238966
|
-
return hasProperty(htmlEntity,
|
|
238965
|
+
function isValidCharacter(character2) {
|
|
238966
|
+
return hasProperty(htmlEntity, character2);
|
|
238967
238967
|
}
|
|
238968
238968
|
function doChange26(changes, preferences, sourceFile, start, useHtmlEntity) {
|
|
238969
|
-
const
|
|
238970
|
-
if (!isValidCharacter(
|
|
238969
|
+
const character2 = sourceFile.getText()[start];
|
|
238970
|
+
if (!isValidCharacter(character2)) {
|
|
238971
238971
|
return;
|
|
238972
238972
|
}
|
|
238973
|
-
const replacement = useHtmlEntity ? htmlEntity[
|
|
238973
|
+
const replacement = useHtmlEntity ? htmlEntity[character2] : `{${quote(sourceFile, preferences, character2)}}`;
|
|
238974
238974
|
changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
|
|
238975
238975
|
}
|
|
238976
238976
|
var deleteUnmatchedParameter = "deleteUnmatchedParameter";
|
|
@@ -256683,11 +256683,11 @@ ${options.prefix}` : `
|
|
|
256683
256683
|
return findFirstNonWhitespaceColumn(getStartPositionOfLine(commentStartLine, sourceFile), position, sourceFile, options);
|
|
256684
256684
|
}
|
|
256685
256685
|
const startPositionOfLine = getStartPositionOfLine(previousLine, sourceFile);
|
|
256686
|
-
const { column, character } = findFirstNonWhitespaceCharacterAndColumn(startPositionOfLine, position, sourceFile, options);
|
|
256686
|
+
const { column, character: character2 } = findFirstNonWhitespaceCharacterAndColumn(startPositionOfLine, position, sourceFile, options);
|
|
256687
256687
|
if (column === 0) {
|
|
256688
256688
|
return column;
|
|
256689
256689
|
}
|
|
256690
|
-
const firstNonWhitespaceCharacterCode = sourceFile.text.charCodeAt(startPositionOfLine +
|
|
256690
|
+
const firstNonWhitespaceCharacterCode = sourceFile.text.charCodeAt(startPositionOfLine + character2);
|
|
256691
256691
|
return firstNonWhitespaceCharacterCode === 42 ? column - 1 : column;
|
|
256692
256692
|
}
|
|
256693
256693
|
function getBlockIndent(sourceFile, position, options) {
|
|
@@ -256961,7 +256961,7 @@ ${options.prefix}` : `
|
|
|
256961
256961
|
return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options);
|
|
256962
256962
|
}
|
|
256963
256963
|
function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) {
|
|
256964
|
-
let
|
|
256964
|
+
let character2 = 0;
|
|
256965
256965
|
let column = 0;
|
|
256966
256966
|
for (let pos = startPos;pos < endPos; pos++) {
|
|
256967
256967
|
const ch = sourceFile.text.charCodeAt(pos);
|
|
@@ -256973,9 +256973,9 @@ ${options.prefix}` : `
|
|
|
256973
256973
|
} else {
|
|
256974
256974
|
column++;
|
|
256975
256975
|
}
|
|
256976
|
-
|
|
256976
|
+
character2++;
|
|
256977
256977
|
}
|
|
256978
|
-
return { column, character };
|
|
256978
|
+
return { column, character: character2 };
|
|
256979
256979
|
}
|
|
256980
256980
|
SmartIndenter2.findFirstNonWhitespaceCharacterAndColumn = findFirstNonWhitespaceCharacterAndColumn;
|
|
256981
256981
|
function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) {
|
|
@@ -260539,8 +260539,8 @@ ${options.prefix}` : `
|
|
|
260539
260539
|
const svc = this.tryUseScriptVersionCache();
|
|
260540
260540
|
if (svc)
|
|
260541
260541
|
return svc.positionToLineOffset(position);
|
|
260542
|
-
const { line, character } = computeLineAndCharacterOfPosition(this.getLineMap(), position);
|
|
260543
|
-
return { line: line + 1, offset:
|
|
260542
|
+
const { line, character: character2 } = computeLineAndCharacterOfPosition(this.getLineMap(), position);
|
|
260543
|
+
return { line: line + 1, offset: character2 + 1 };
|
|
260544
260544
|
}
|
|
260545
260545
|
getFileTextAndSize(tempFileName) {
|
|
260546
260546
|
let text;
|
|
@@ -264861,7 +264861,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
264861
264861
|
const lineOffset = info2.positionToLineOffset(pos);
|
|
264862
264862
|
return { line: lineOffset.line - 1, character: lineOffset.offset - 1 };
|
|
264863
264863
|
},
|
|
264864
|
-
getPositionOfLineAndCharacter: (line,
|
|
264864
|
+
getPositionOfLineAndCharacter: (line, character2, allowEdits) => info2.lineOffsetToPosition(line + 1, character2 + 1, allowEdits)
|
|
264865
264865
|
};
|
|
264866
264866
|
}
|
|
264867
264867
|
return info2.sourceFileLike;
|
|
@@ -268911,8 +268911,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
268911
268911
|
}
|
|
268912
268912
|
function getLocationInNewDocument(oldText, renameFilename, renameLocation, edits) {
|
|
268913
268913
|
const newText = applyEdits(oldText, renameFilename, edits);
|
|
268914
|
-
const { line, character } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation);
|
|
268915
|
-
return { line: line + 1, offset:
|
|
268914
|
+
const { line, character: character2 } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation);
|
|
268915
|
+
return { line: line + 1, offset: character2 + 1 };
|
|
268916
268916
|
}
|
|
268917
268917
|
function applyEdits(text, textFilename, edits) {
|
|
268918
268918
|
for (const { fileName, textChanges: textChanges2 } of edits) {
|
|
@@ -272656,16 +272656,16 @@ function compileStyleMap(schema2, map4) {
|
|
|
272656
272656
|
}
|
|
272657
272657
|
return result;
|
|
272658
272658
|
}
|
|
272659
|
-
function encodeHex(
|
|
272659
|
+
function encodeHex(character2) {
|
|
272660
272660
|
var string4, handle, length;
|
|
272661
|
-
string4 =
|
|
272662
|
-
if (
|
|
272661
|
+
string4 = character2.toString(16).toUpperCase();
|
|
272662
|
+
if (character2 <= 255) {
|
|
272663
272663
|
handle = "x";
|
|
272664
272664
|
length = 2;
|
|
272665
|
-
} else if (
|
|
272665
|
+
} else if (character2 <= 65535) {
|
|
272666
272666
|
handle = "u";
|
|
272667
272667
|
length = 4;
|
|
272668
|
-
} else if (
|
|
272668
|
+
} else if (character2 <= 4294967295) {
|
|
272669
272669
|
handle = "U";
|
|
272670
272670
|
length = 8;
|
|
272671
272671
|
} else {
|
|
@@ -273845,7 +273845,7 @@ async function createScenarioAgent(server2, agentName = "scenario-agent", plugin
|
|
|
273845
273845
|
"@elizaos/plugin-bootstrap"
|
|
273846
273846
|
]) {
|
|
273847
273847
|
console.log(`\uD83D\uDD27 [DEBUG] createScenarioAgent called for agent: ${agentName}, plugins: ${pluginNames.join(", ")}`);
|
|
273848
|
-
const
|
|
273848
|
+
const character2 = {
|
|
273849
273849
|
name: agentName,
|
|
273850
273850
|
id: stringToUuid2(agentName),
|
|
273851
273851
|
bio: "A test agent for scenario execution",
|
|
@@ -273861,9 +273861,9 @@ async function createScenarioAgent(server2, agentName = "scenario-agent", plugin
|
|
|
273861
273861
|
chat: ["Direct", "Helpful"]
|
|
273862
273862
|
}
|
|
273863
273863
|
};
|
|
273864
|
-
const [runtime] = await server2.startAgents([{ character }]);
|
|
273864
|
+
const [runtime] = await server2.startAgents([{ character: character2 }]);
|
|
273865
273865
|
if (!runtime) {
|
|
273866
|
-
throw new Error(`Failed to start agent: ${
|
|
273866
|
+
throw new Error(`Failed to start agent: ${character2.name}`);
|
|
273867
273867
|
}
|
|
273868
273868
|
const agentId = runtime.character.id;
|
|
273869
273869
|
return { runtime, agentId };
|
|
@@ -283869,11 +283869,12 @@ async function selectEmbeddingModel() {
|
|
|
283869
283869
|
return embeddingModel;
|
|
283870
283870
|
}
|
|
283871
283871
|
// src/characters/eliza.ts
|
|
283872
|
-
|
|
283872
|
+
import { buildCharacterPlugins } from "@elizaos/core";
|
|
283873
|
+
var baseElizaCharacter = {
|
|
283873
283874
|
name: "Eliza",
|
|
283874
283875
|
plugins: ["@elizaos/plugin-sql", "@elizaos/plugin-bootstrap"],
|
|
283875
|
-
secrets: {},
|
|
283876
283876
|
settings: {
|
|
283877
|
+
secrets: {},
|
|
283877
283878
|
avatar: "https://elizaos.github.io/eliza-avatars/Eliza/portrait.png"
|
|
283878
283879
|
},
|
|
283879
283880
|
system: "Respond to all messages in a helpful, conversational manner. Provide assistance on a wide range of topics, using knowledge when needed. Be concise but thorough, friendly but professional. Use humor when appropriate and be empathetic to user needs. Provide valuable information and insights when questions are asked.",
|
|
@@ -284079,24 +284080,13 @@ var baseCharacter = {
|
|
|
284079
284080
|
]
|
|
284080
284081
|
}
|
|
284081
284082
|
};
|
|
284082
|
-
function
|
|
284083
|
-
const plugins = [
|
|
284084
|
-
"@elizaos/plugin-sql",
|
|
284085
|
-
...process.env.ANTHROPIC_API_KEY?.trim() ? ["@elizaos/plugin-anthropic"] : [],
|
|
284086
|
-
...process.env.OPENROUTER_API_KEY?.trim() ? ["@elizaos/plugin-openrouter"] : [],
|
|
284087
|
-
...process.env.OPENAI_API_KEY?.trim() ? ["@elizaos/plugin-openai"] : [],
|
|
284088
|
-
...process.env.GOOGLE_GENERATIVE_AI_API_KEY?.trim() ? ["@elizaos/plugin-google-genai"] : [],
|
|
284089
|
-
...process.env.DISCORD_API_TOKEN?.trim() ? ["@elizaos/plugin-discord"] : [],
|
|
284090
|
-
...process.env.TWITTER_API_KEY?.trim() && process.env.TWITTER_API_SECRET_KEY?.trim() && process.env.TWITTER_ACCESS_TOKEN?.trim() && process.env.TWITTER_ACCESS_TOKEN_SECRET?.trim() ? ["@elizaos/plugin-twitter"] : [],
|
|
284091
|
-
...process.env.TELEGRAM_BOT_TOKEN?.trim() ? ["@elizaos/plugin-telegram"] : [],
|
|
284092
|
-
...!process.env.IGNORE_BOOTSTRAP ? ["@elizaos/plugin-bootstrap"] : [],
|
|
284093
|
-
...!process.env.ANTHROPIC_API_KEY?.trim() && !process.env.OPENROUTER_API_KEY?.trim() && !process.env.OPENAI_API_KEY?.trim() && !process.env.GOOGLE_GENERATIVE_AI_API_KEY?.trim() ? ["@elizaos/plugin-ollama"] : []
|
|
284094
|
-
];
|
|
284083
|
+
function getDefaultCharacter(env = process.env) {
|
|
284095
284084
|
return {
|
|
284096
|
-
...
|
|
284097
|
-
plugins
|
|
284085
|
+
...baseElizaCharacter,
|
|
284086
|
+
plugins: buildCharacterPlugins(env)
|
|
284098
284087
|
};
|
|
284099
284088
|
}
|
|
284089
|
+
var character = getDefaultCharacter();
|
|
284100
284090
|
|
|
284101
284091
|
// src/commands/create/actions/creators.ts
|
|
284102
284092
|
init_utils();
|
|
@@ -284557,7 +284547,7 @@ async function createAgent(agentName, targetDir, isNonInteractive = false) {
|
|
|
284557
284547
|
}
|
|
284558
284548
|
}
|
|
284559
284549
|
const agentCharacter = {
|
|
284560
|
-
...
|
|
284550
|
+
...getDefaultCharacter(),
|
|
284561
284551
|
name: agentName,
|
|
284562
284552
|
bio: [
|
|
284563
284553
|
`${agentName} is a helpful AI assistant created to provide assistance and engage in meaningful conversations.`,
|
|
@@ -285160,13 +285150,13 @@ var joinCommand = (filePath, rawArguments) => {
|
|
|
285160
285150
|
var escapeLines = (lines) => stripVTControlCharacters(lines).split(`
|
|
285161
285151
|
`).map((line) => escapeControlCharacters(line)).join(`
|
|
285162
285152
|
`);
|
|
285163
|
-
var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (
|
|
285164
|
-
var escapeControlCharacter = (
|
|
285165
|
-
const commonEscape = COMMON_ESCAPES[
|
|
285153
|
+
var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character2) => escapeControlCharacter(character2));
|
|
285154
|
+
var escapeControlCharacter = (character2) => {
|
|
285155
|
+
const commonEscape = COMMON_ESCAPES[character2];
|
|
285166
285156
|
if (commonEscape !== undefined) {
|
|
285167
285157
|
return commonEscape;
|
|
285168
285158
|
}
|
|
285169
|
-
const codepoint =
|
|
285159
|
+
const codepoint = character2.codePointAt(0);
|
|
285170
285160
|
const codepointHex = codepoint.toString(16);
|
|
285171
285161
|
return codepoint <= ASTRAL_START ? `\\u${codepointHex.padStart(4, "0")}` : `\\U${codepointHex}`;
|
|
285172
285162
|
};
|
|
@@ -315443,10 +315433,10 @@ comprehensive performance reports with statistics, parameter comparisons, and tr
|
|
|
315443
315433
|
import {
|
|
315444
315434
|
logger as logger44
|
|
315445
315435
|
} from "@elizaos/core";
|
|
315436
|
+
init_directory_detection();
|
|
315446
315437
|
import { stringToUuid } from "@elizaos/core";
|
|
315447
315438
|
import * as fs34 from "fs";
|
|
315448
315439
|
import path64 from "path";
|
|
315449
|
-
init_directory_detection();
|
|
315450
315440
|
function isPlugin(module) {
|
|
315451
315441
|
if (module && typeof module === "object" && typeof module.name === "string" && typeof module.description === "string") {
|
|
315452
315442
|
return true;
|
|
@@ -315486,7 +315476,7 @@ async function loadProject(dir) {
|
|
|
315486
315476
|
if (!main) {
|
|
315487
315477
|
logger44.warn("No main field found in package.json, using default character");
|
|
315488
315478
|
const defaultCharacterName = "Eliza (Default)";
|
|
315489
|
-
const elizaCharacter =
|
|
315479
|
+
const elizaCharacter = getDefaultCharacter();
|
|
315490
315480
|
const defaultAgent = {
|
|
315491
315481
|
character: {
|
|
315492
315482
|
...elizaCharacter,
|
|
@@ -315552,7 +315542,7 @@ async function loadProject(dir) {
|
|
|
315552
315542
|
})
|
|
315553
315543
|
};
|
|
315554
315544
|
const characterName = "Eliza (Test Mode)";
|
|
315555
|
-
const elizaCharacter =
|
|
315545
|
+
const elizaCharacter = getDefaultCharacter();
|
|
315556
315546
|
const testCharacter = {
|
|
315557
315547
|
...elizaCharacter,
|
|
315558
315548
|
id: stringToUuid(characterName),
|
|
@@ -315680,10 +315670,10 @@ var start = new Command().name("start").description("Build and start the Eliza a
|
|
|
315680
315670
|
throw new Error(`Character file not found: ${resolvedPath}`);
|
|
315681
315671
|
}
|
|
315682
315672
|
try {
|
|
315683
|
-
const
|
|
315684
|
-
if (
|
|
315685
|
-
characters.push(
|
|
315686
|
-
logger45.info(`Successfully loaded character: ${
|
|
315673
|
+
const character2 = await loadCharacterTryPath(resolvedPath);
|
|
315674
|
+
if (character2) {
|
|
315675
|
+
characters.push(character2);
|
|
315676
|
+
logger45.info(`Successfully loaded character: ${character2.name}`);
|
|
315687
315677
|
} else {
|
|
315688
315678
|
logger45.error(`Failed to load character from ${resolvedPath}: Invalid or empty character file`);
|
|
315689
315679
|
throw new Error(`Invalid character file: ${resolvedPath}`);
|
|
@@ -315718,7 +315708,7 @@ var start = new Command().name("start").description("Build and start the Eliza a
|
|
|
315718
315708
|
character: pa.character,
|
|
315719
315709
|
plugins: Array.isArray(pa.plugins) ? pa.plugins : [],
|
|
315720
315710
|
init: pa.init
|
|
315721
|
-
})) : characters?.map((
|
|
315711
|
+
})) : characters?.map((character2) => ({ character: character2 })) || [];
|
|
315722
315712
|
const server2 = new AgentServer;
|
|
315723
315713
|
await server2.start({
|
|
315724
315714
|
port: options.port,
|
|
@@ -316158,8 +316148,8 @@ async function runComponentTests(testPath, options, projectInfo) {
|
|
|
316158
316148
|
|
|
316159
316149
|
// src/commands/test/actions/e2e-tests.ts
|
|
316160
316150
|
init_utils();
|
|
316161
|
-
var dotenv6 = __toESM(require_main(), 1);
|
|
316162
316151
|
import { logger as logger51 } from "@elizaos/core";
|
|
316152
|
+
var dotenv6 = __toESM(require_main(), 1);
|
|
316163
316153
|
import { AgentServer as AgentServer2, jsonToCharacter, loadCharacterTryPath as loadCharacterTryPath2 } from "@elizaos/server";
|
|
316164
316154
|
import * as fs37 from "fs";
|
|
316165
316155
|
import path70 from "path";
|
|
@@ -316244,9 +316234,9 @@ async function runE2eTests(testPath, options, projectInfo) {
|
|
|
316244
316234
|
}
|
|
316245
316235
|
logger51.info(`Found ${project.agents?.length || 0} agents`);
|
|
316246
316236
|
logger51.info("Setting up server properties...");
|
|
316247
|
-
server2.startAgent = async (
|
|
316248
|
-
logger51.info(`Starting agent for character ${
|
|
316249
|
-
const runtimes2 = await server2.startAgents([
|
|
316237
|
+
server2.startAgent = async (character2) => {
|
|
316238
|
+
logger51.info(`Starting agent for character ${character2.name}`);
|
|
316239
|
+
const runtimes2 = await server2.startAgents([character2], [], { isTestMode: true });
|
|
316250
316240
|
return runtimes2[0];
|
|
316251
316241
|
};
|
|
316252
316242
|
server2.loadCharacterTryPath = loadCharacterTryPath2;
|
|
@@ -316274,7 +316264,7 @@ async function runE2eTests(testPath, options, projectInfo) {
|
|
|
316274
316264
|
if (!pluginUnderTest) {
|
|
316275
316265
|
throw new Error("Plugin module could not be loaded for testing.");
|
|
316276
316266
|
}
|
|
316277
|
-
const defaultElizaCharacter =
|
|
316267
|
+
const defaultElizaCharacter = getDefaultCharacter();
|
|
316278
316268
|
const startedRuntimes = await server2.startAgents([defaultElizaCharacter], [pluginUnderTest], { isTestMode: true });
|
|
316279
316269
|
const runtime = startedRuntimes[0];
|
|
316280
316270
|
runtimes.push(runtime);
|
|
@@ -318120,5 +318110,5 @@ main().catch((error47) => {
|
|
|
318120
318110
|
process.exit(1);
|
|
318121
318111
|
});
|
|
318122
318112
|
|
|
318123
|
-
//# debugId=
|
|
318113
|
+
//# debugId=A18728C9968FDC8864756E2164756E21
|
|
318124
318114
|
//# sourceMappingURL=index.js.map
|