@elizaos/cli 1.6.2-alpha.21 → 1.6.2-alpha.23

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/README.md CHANGED
@@ -458,7 +458,7 @@ elizaos tee phala <command> [options]
458
458
 
459
459
  ```bash
460
460
  # Create a TEE project starter template
461
- elizaos create -t tee tee-agent
461
+ elizaos create --type tee tee-agent
462
462
 
463
463
  # cd into directory and authenticate your Phala Cloud API Key
464
464
  cd tee-agent
@@ -1,15 +1,16 @@
1
- import type { Character } from '@elizaos/core';
1
+ import { type Character } from '@elizaos/core';
2
2
  /**
3
- * Returns the Eliza character with plugins ordered by priority based on environment variables.
4
- * This should be called after environment variables are loaded.
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
- * @returns {Character} The Eliza character with appropriate plugins for the current environment
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 getElizaCharacter(): Character;
9
+ export declare function getDefaultCharacter(env?: Record<string, string | undefined>): Character;
9
10
  /**
10
11
  * Legacy export for backward compatibility.
11
- * Note: This will include all plugins regardless of environment variables.
12
- * Use getElizaCharacter() for environment-aware plugin loading.
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,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA0N/C;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,CAuC7C;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,SAAyB,CAAC"}
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.21", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-10-17T12:00:18.415Z", BUILD_ENV = "production", version_default;
4752
+ var CLI_VERSION = "1.6.2-alpha.23", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-10-17T16:03:18.569Z", BUILD_ENV = "production", version_default;
4753
4753
  var init_version = __esm(() => {
4754
4754
  version_default = {
4755
4755
  version: CLI_VERSION,
@@ -6658,7 +6658,9 @@ async function copyTemplate(templateType, targetDir) {
6658
6658
  path6.resolve(__dirname2, "../templates", packageName),
6659
6659
  path6.resolve(__dirname2, "../../templates", packageName),
6660
6660
  path6.resolve(__dirname2, "../../../templates", packageName),
6661
- path6.resolve(__dirname2, "templates", packageName)
6661
+ path6.resolve(__dirname2, "templates", packageName),
6662
+ path6.resolve(__dirname2, "../../../..", packageName),
6663
+ path6.resolve(__dirname2, "../../../../packages", packageName)
6662
6664
  ];
6663
6665
  let templateDir = null;
6664
6666
  for (const possiblePath of possibleTemplatePaths) {
@@ -26938,7 +26940,7 @@ Available agents in your project:`);
26938
26940
  console.error(` ${index}. ${agent.name}`);
26939
26941
  });
26940
26942
  console.error(`
26941
- You can create a new agent with: elizaos create -t agent ${agentName.toLowerCase()}`);
26943
+ You can create a new agent with: elizaos create --type agent ${agentName.toLowerCase()}`);
26942
26944
  }
26943
26945
  } catch (error46) {}
26944
26946
  throw new Error("AGENT_NOT_FOUND_WITH_HELP");
@@ -27039,7 +27041,7 @@ Examples:
27039
27041
  $ elizaos agent start --remote-character https://example.com/char.json
27040
27042
 
27041
27043
  To create a new agent:
27042
- $ elizaos create -t agent my-agent-name Create a new agent using Eliza template
27044
+ $ elizaos create --type agent my-agent-name Create a new agent using Eliza template
27043
27045
 
27044
27046
  Required configuration:
27045
27047
  You must provide one of these options: --name, --path, or --remote-character
@@ -27589,7 +27591,7 @@ function assembleStyles() {
27589
27591
  }
27590
27592
  let [colorString] = matches;
27591
27593
  if (colorString.length === 3) {
27592
- colorString = [...colorString].map((character) => character + character).join("");
27594
+ colorString = [...colorString].map((character2) => character2 + character2).join("");
27593
27595
  }
27594
27596
  const integer2 = Number.parseInt(colorString, 16);
27595
27597
  return [
@@ -98443,16 +98445,16 @@ var require_dumper = __commonJS((exports, module) => {
98443
98445
  }
98444
98446
  return result;
98445
98447
  }
98446
- function encodeHex(character) {
98448
+ function encodeHex(character2) {
98447
98449
  var string4, handle, length;
98448
- string4 = character.toString(16).toUpperCase();
98449
- if (character <= 255) {
98450
+ string4 = character2.toString(16).toUpperCase();
98451
+ if (character2 <= 255) {
98450
98452
  handle = "x";
98451
98453
  length = 2;
98452
- } else if (character <= 65535) {
98454
+ } else if (character2 <= 65535) {
98453
98455
  handle = "u";
98454
98456
  length = 4;
98455
- } else if (character <= 4294967295) {
98457
+ } else if (character2 <= 4294967295) {
98456
98458
  handle = "U";
98457
98459
  length = 8;
98458
98460
  } else {
@@ -112498,10 +112500,10 @@ ${lanes.join(`
112498
112500
  result.push(lineStart);
112499
112501
  return result;
112500
112502
  }
112501
- function getPositionOfLineAndCharacter(sourceFile, line, character, allowEdits) {
112502
- return sourceFile.getPositionOfLineAndCharacter ? sourceFile.getPositionOfLineAndCharacter(line, character, allowEdits) : computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character, sourceFile.text, allowEdits);
112503
+ function getPositionOfLineAndCharacter(sourceFile, line, character2, allowEdits) {
112504
+ return sourceFile.getPositionOfLineAndCharacter ? sourceFile.getPositionOfLineAndCharacter(line, character2, allowEdits) : computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character2, sourceFile.text, allowEdits);
112503
112505
  }
112504
- function computePositionOfLineAndCharacter(lineStarts, line, character, debugText, allowEdits) {
112506
+ function computePositionOfLineAndCharacter(lineStarts, line, character2, debugText, allowEdits) {
112505
112507
  if (line < 0 || line >= lineStarts.length) {
112506
112508
  if (allowEdits) {
112507
112509
  line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
@@ -112509,7 +112511,7 @@ ${lanes.join(`
112509
112511
  Debug2.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== undefined ? arrayIsEqualTo(lineStarts, computeLineStarts(debugText)) : "unknown"}`);
112510
112512
  }
112511
112513
  }
112512
- const res = lineStarts[line] + character;
112514
+ const res = lineStarts[line] + character2;
112513
112515
  if (allowEdits) {
112514
112516
  return res > lineStarts[line + 1] ? lineStarts[line + 1] : typeof debugText === "string" && res > debugText.length ? debugText.length : res;
112515
112517
  }
@@ -208255,10 +208257,10 @@ ${lanes.join(`
208255
208257
  function formatDiagnostic(diagnostic, host) {
208256
208258
  const errorMessage = `${diagnosticCategoryName(diagnostic)} TS${diagnostic.code}: ${flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())}${host.getNewLine()}`;
208257
208259
  if (diagnostic.file) {
208258
- const { line, character } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
208260
+ const { line, character: character2 } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
208259
208261
  const fileName = diagnostic.file.fileName;
208260
208262
  const relativeFileName = convertToRelativePath(fileName, host.getCurrentDirectory(), (fileName2) => host.getCanonicalFileName(fileName2));
208261
- return `${relativeFileName}(${line + 1},${character + 1}): ` + errorMessage;
208263
+ return `${relativeFileName}(${line + 1},${character2 + 1}): ` + errorMessage;
208262
208264
  }
208263
208265
  return errorMessage;
208264
208266
  }
@@ -230922,8 +230924,8 @@ ${newComment.split(`
230922
230924
  getLineStarts() {
230923
230925
  return getLineStarts(this);
230924
230926
  }
230925
- getPositionOfLineAndCharacter(line, character, allowEdits) {
230926
- return computePositionOfLineAndCharacter(getLineStarts(this), line, character, this.text, allowEdits);
230927
+ getPositionOfLineAndCharacter(line, character2, allowEdits) {
230928
+ return computePositionOfLineAndCharacter(getLineStarts(this), line, character2, this.text, allowEdits);
230927
230929
  }
230928
230930
  getLineEndOfPosition(pos) {
230929
230931
  const { line } = this.getLineAndCharacterOfPosition(pos);
@@ -238962,15 +238964,15 @@ ${newComment.split(`
238962
238964
  ">": "&gt;",
238963
238965
  "}": "&rbrace;"
238964
238966
  };
238965
- function isValidCharacter(character) {
238966
- return hasProperty(htmlEntity, character);
238967
+ function isValidCharacter(character2) {
238968
+ return hasProperty(htmlEntity, character2);
238967
238969
  }
238968
238970
  function doChange26(changes, preferences, sourceFile, start, useHtmlEntity) {
238969
- const character = sourceFile.getText()[start];
238970
- if (!isValidCharacter(character)) {
238971
+ const character2 = sourceFile.getText()[start];
238972
+ if (!isValidCharacter(character2)) {
238971
238973
  return;
238972
238974
  }
238973
- const replacement = useHtmlEntity ? htmlEntity[character] : `{${quote(sourceFile, preferences, character)}}`;
238975
+ const replacement = useHtmlEntity ? htmlEntity[character2] : `{${quote(sourceFile, preferences, character2)}}`;
238974
238976
  changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement);
238975
238977
  }
238976
238978
  var deleteUnmatchedParameter = "deleteUnmatchedParameter";
@@ -256683,11 +256685,11 @@ ${options.prefix}` : `
256683
256685
  return findFirstNonWhitespaceColumn(getStartPositionOfLine(commentStartLine, sourceFile), position, sourceFile, options);
256684
256686
  }
256685
256687
  const startPositionOfLine = getStartPositionOfLine(previousLine, sourceFile);
256686
- const { column, character } = findFirstNonWhitespaceCharacterAndColumn(startPositionOfLine, position, sourceFile, options);
256688
+ const { column, character: character2 } = findFirstNonWhitespaceCharacterAndColumn(startPositionOfLine, position, sourceFile, options);
256687
256689
  if (column === 0) {
256688
256690
  return column;
256689
256691
  }
256690
- const firstNonWhitespaceCharacterCode = sourceFile.text.charCodeAt(startPositionOfLine + character);
256692
+ const firstNonWhitespaceCharacterCode = sourceFile.text.charCodeAt(startPositionOfLine + character2);
256691
256693
  return firstNonWhitespaceCharacterCode === 42 ? column - 1 : column;
256692
256694
  }
256693
256695
  function getBlockIndent(sourceFile, position, options) {
@@ -256961,7 +256963,7 @@ ${options.prefix}` : `
256961
256963
  return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options);
256962
256964
  }
256963
256965
  function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) {
256964
- let character = 0;
256966
+ let character2 = 0;
256965
256967
  let column = 0;
256966
256968
  for (let pos = startPos;pos < endPos; pos++) {
256967
256969
  const ch = sourceFile.text.charCodeAt(pos);
@@ -256973,9 +256975,9 @@ ${options.prefix}` : `
256973
256975
  } else {
256974
256976
  column++;
256975
256977
  }
256976
- character++;
256978
+ character2++;
256977
256979
  }
256978
- return { column, character };
256980
+ return { column, character: character2 };
256979
256981
  }
256980
256982
  SmartIndenter2.findFirstNonWhitespaceCharacterAndColumn = findFirstNonWhitespaceCharacterAndColumn;
256981
256983
  function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) {
@@ -260539,8 +260541,8 @@ ${options.prefix}` : `
260539
260541
  const svc = this.tryUseScriptVersionCache();
260540
260542
  if (svc)
260541
260543
  return svc.positionToLineOffset(position);
260542
- const { line, character } = computeLineAndCharacterOfPosition(this.getLineMap(), position);
260543
- return { line: line + 1, offset: character + 1 };
260544
+ const { line, character: character2 } = computeLineAndCharacterOfPosition(this.getLineMap(), position);
260545
+ return { line: line + 1, offset: character2 + 1 };
260544
260546
  }
260545
260547
  getFileTextAndSize(tempFileName) {
260546
260548
  let text;
@@ -264861,7 +264863,7 @@ Dynamic files must always be opened with service's current directory or service
264861
264863
  const lineOffset = info2.positionToLineOffset(pos);
264862
264864
  return { line: lineOffset.line - 1, character: lineOffset.offset - 1 };
264863
264865
  },
264864
- getPositionOfLineAndCharacter: (line, character, allowEdits) => info2.lineOffsetToPosition(line + 1, character + 1, allowEdits)
264866
+ getPositionOfLineAndCharacter: (line, character2, allowEdits) => info2.lineOffsetToPosition(line + 1, character2 + 1, allowEdits)
264865
264867
  };
264866
264868
  }
264867
264869
  return info2.sourceFileLike;
@@ -268911,8 +268913,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
268911
268913
  }
268912
268914
  function getLocationInNewDocument(oldText, renameFilename, renameLocation, edits) {
268913
268915
  const newText = applyEdits(oldText, renameFilename, edits);
268914
- const { line, character } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation);
268915
- return { line: line + 1, offset: character + 1 };
268916
+ const { line, character: character2 } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation);
268917
+ return { line: line + 1, offset: character2 + 1 };
268916
268918
  }
268917
268919
  function applyEdits(text, textFilename, edits) {
268918
268920
  for (const { fileName, textChanges: textChanges2 } of edits) {
@@ -272656,16 +272658,16 @@ function compileStyleMap(schema2, map4) {
272656
272658
  }
272657
272659
  return result;
272658
272660
  }
272659
- function encodeHex(character) {
272661
+ function encodeHex(character2) {
272660
272662
  var string4, handle, length;
272661
- string4 = character.toString(16).toUpperCase();
272662
- if (character <= 255) {
272663
+ string4 = character2.toString(16).toUpperCase();
272664
+ if (character2 <= 255) {
272663
272665
  handle = "x";
272664
272666
  length = 2;
272665
- } else if (character <= 65535) {
272667
+ } else if (character2 <= 65535) {
272666
272668
  handle = "u";
272667
272669
  length = 4;
272668
- } else if (character <= 4294967295) {
272670
+ } else if (character2 <= 4294967295) {
272669
272671
  handle = "U";
272670
272672
  length = 8;
272671
272673
  } else {
@@ -273845,7 +273847,7 @@ async function createScenarioAgent(server2, agentName = "scenario-agent", plugin
273845
273847
  "@elizaos/plugin-bootstrap"
273846
273848
  ]) {
273847
273849
  console.log(`\uD83D\uDD27 [DEBUG] createScenarioAgent called for agent: ${agentName}, plugins: ${pluginNames.join(", ")}`);
273848
- const character = {
273850
+ const character2 = {
273849
273851
  name: agentName,
273850
273852
  id: stringToUuid2(agentName),
273851
273853
  bio: "A test agent for scenario execution",
@@ -273861,9 +273863,9 @@ async function createScenarioAgent(server2, agentName = "scenario-agent", plugin
273861
273863
  chat: ["Direct", "Helpful"]
273862
273864
  }
273863
273865
  };
273864
- const [runtime] = await server2.startAgents([{ character }]);
273866
+ const [runtime] = await server2.startAgents([{ character: character2 }]);
273865
273867
  if (!runtime) {
273866
- throw new Error(`Failed to start agent: ${character.name}`);
273868
+ throw new Error(`Failed to start agent: ${character2.name}`);
273867
273869
  }
273868
273870
  const agentId = runtime.character.id;
273869
273871
  return { runtime, agentId };
@@ -283869,11 +283871,12 @@ async function selectEmbeddingModel() {
283869
283871
  return embeddingModel;
283870
283872
  }
283871
283873
  // src/characters/eliza.ts
283872
- var baseCharacter = {
283874
+ import { buildCharacterPlugins } from "@elizaos/core";
283875
+ var baseElizaCharacter = {
283873
283876
  name: "Eliza",
283874
283877
  plugins: ["@elizaos/plugin-sql", "@elizaos/plugin-bootstrap"],
283875
- secrets: {},
283876
283878
  settings: {
283879
+ secrets: {},
283877
283880
  avatar: "https://elizaos.github.io/eliza-avatars/Eliza/portrait.png"
283878
283881
  },
283879
283882
  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 +284082,13 @@ var baseCharacter = {
284079
284082
  ]
284080
284083
  }
284081
284084
  };
284082
- function getElizaCharacter() {
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
- ];
284085
+ function getDefaultCharacter(env = process.env) {
284095
284086
  return {
284096
- ...baseCharacter,
284097
- plugins
284087
+ ...baseElizaCharacter,
284088
+ plugins: buildCharacterPlugins(env)
284098
284089
  };
284099
284090
  }
284091
+ var character = getDefaultCharacter();
284100
284092
 
284101
284093
  // src/commands/create/actions/creators.ts
284102
284094
  init_utils();
@@ -284557,7 +284549,7 @@ async function createAgent(agentName, targetDir, isNonInteractive = false) {
284557
284549
  }
284558
284550
  }
284559
284551
  const agentCharacter = {
284560
- ...getElizaCharacter(),
284552
+ ...getDefaultCharacter(),
284561
284553
  name: agentName,
284562
284554
  bio: [
284563
284555
  `${agentName} is a helpful AI assistant created to provide assistance and engage in meaningful conversations.`,
@@ -284671,7 +284663,7 @@ Next steps:`);
284671
284663
  function formatProjectType(type) {
284672
284664
  return type === "tee" ? "TEE Project" : type.charAt(0).toUpperCase() + type.slice(1);
284673
284665
  }
284674
- var create = new Command("create").description("Create a new ElizaOS project, plugin, agent, or TEE project").argument("[name]", "name of the project/plugin/agent to create").option("--yes, -y", "skip prompts and use defaults").option("--type <type>", "type of project to create (project, plugin, agent, tee)", "project").action(async (name, opts) => {
284666
+ var create = new Command("create").description("Create a new ElizaOS project, plugin, agent, or TEE project").argument("[name]", "name of the project/plugin/agent to create").option("-y, --yes", "skip prompts and use defaults").option("-t, --type <type>", "type of project to create (project, plugin, agent, tee)", "project").action(async (name, opts) => {
284675
284667
  let projectType;
284676
284668
  try {
284677
284669
  if (process.env.ELIZA_NONINTERACTIVE === "1" || process.env.ELIZA_NONINTERACTIVE === "true" || process.argv.includes("-y") || process.argv.includes("--yes")) {
@@ -285160,13 +285152,13 @@ var joinCommand = (filePath, rawArguments) => {
285160
285152
  var escapeLines = (lines) => stripVTControlCharacters(lines).split(`
285161
285153
  `).map((line) => escapeControlCharacters(line)).join(`
285162
285154
  `);
285163
- var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character) => escapeControlCharacter(character));
285164
- var escapeControlCharacter = (character) => {
285165
- const commonEscape = COMMON_ESCAPES[character];
285155
+ var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character2) => escapeControlCharacter(character2));
285156
+ var escapeControlCharacter = (character2) => {
285157
+ const commonEscape = COMMON_ESCAPES[character2];
285166
285158
  if (commonEscape !== undefined) {
285167
285159
  return commonEscape;
285168
285160
  }
285169
- const codepoint = character.codePointAt(0);
285161
+ const codepoint = character2.codePointAt(0);
285170
285162
  const codepointHex = codepoint.toString(16);
285171
285163
  return codepoint <= ASTRAL_START ? `\\u${codepointHex.padStart(4, "0")}` : `\\U${codepointHex}`;
285172
285164
  };
@@ -315443,10 +315435,10 @@ comprehensive performance reports with statistics, parameter comparisons, and tr
315443
315435
  import {
315444
315436
  logger as logger44
315445
315437
  } from "@elizaos/core";
315438
+ init_directory_detection();
315446
315439
  import { stringToUuid } from "@elizaos/core";
315447
315440
  import * as fs34 from "fs";
315448
315441
  import path64 from "path";
315449
- init_directory_detection();
315450
315442
  function isPlugin(module) {
315451
315443
  if (module && typeof module === "object" && typeof module.name === "string" && typeof module.description === "string") {
315452
315444
  return true;
@@ -315486,7 +315478,7 @@ async function loadProject(dir) {
315486
315478
  if (!main) {
315487
315479
  logger44.warn("No main field found in package.json, using default character");
315488
315480
  const defaultCharacterName = "Eliza (Default)";
315489
- const elizaCharacter = getElizaCharacter();
315481
+ const elizaCharacter = getDefaultCharacter();
315490
315482
  const defaultAgent = {
315491
315483
  character: {
315492
315484
  ...elizaCharacter,
@@ -315552,7 +315544,7 @@ async function loadProject(dir) {
315552
315544
  })
315553
315545
  };
315554
315546
  const characterName = "Eliza (Test Mode)";
315555
- const elizaCharacter = getElizaCharacter();
315547
+ const elizaCharacter = getDefaultCharacter();
315556
315548
  const testCharacter = {
315557
315549
  ...elizaCharacter,
315558
315550
  id: stringToUuid(characterName),
@@ -315680,10 +315672,10 @@ var start = new Command().name("start").description("Build and start the Eliza a
315680
315672
  throw new Error(`Character file not found: ${resolvedPath}`);
315681
315673
  }
315682
315674
  try {
315683
- const character = await loadCharacterTryPath(resolvedPath);
315684
- if (character) {
315685
- characters.push(character);
315686
- logger45.info(`Successfully loaded character: ${character.name}`);
315675
+ const character2 = await loadCharacterTryPath(resolvedPath);
315676
+ if (character2) {
315677
+ characters.push(character2);
315678
+ logger45.info(`Successfully loaded character: ${character2.name}`);
315687
315679
  } else {
315688
315680
  logger45.error(`Failed to load character from ${resolvedPath}: Invalid or empty character file`);
315689
315681
  throw new Error(`Invalid character file: ${resolvedPath}`);
@@ -315718,7 +315710,7 @@ var start = new Command().name("start").description("Build and start the Eliza a
315718
315710
  character: pa.character,
315719
315711
  plugins: Array.isArray(pa.plugins) ? pa.plugins : [],
315720
315712
  init: pa.init
315721
- })) : characters?.map((character) => ({ character })) || [];
315713
+ })) : characters?.map((character2) => ({ character: character2 })) || [];
315722
315714
  const server2 = new AgentServer;
315723
315715
  await server2.start({
315724
315716
  port: options.port,
@@ -316158,8 +316150,8 @@ async function runComponentTests(testPath, options, projectInfo) {
316158
316150
 
316159
316151
  // src/commands/test/actions/e2e-tests.ts
316160
316152
  init_utils();
316161
- var dotenv6 = __toESM(require_main(), 1);
316162
316153
  import { logger as logger51 } from "@elizaos/core";
316154
+ var dotenv6 = __toESM(require_main(), 1);
316163
316155
  import { AgentServer as AgentServer2, jsonToCharacter, loadCharacterTryPath as loadCharacterTryPath2 } from "@elizaos/server";
316164
316156
  import * as fs37 from "fs";
316165
316157
  import path70 from "path";
@@ -316244,9 +316236,9 @@ async function runE2eTests(testPath, options, projectInfo) {
316244
316236
  }
316245
316237
  logger51.info(`Found ${project.agents?.length || 0} agents`);
316246
316238
  logger51.info("Setting up server properties...");
316247
- server2.startAgent = async (character) => {
316248
- logger51.info(`Starting agent for character ${character.name}`);
316249
- const runtimes2 = await server2.startAgents([character], [], { isTestMode: true });
316239
+ server2.startAgent = async (character2) => {
316240
+ logger51.info(`Starting agent for character ${character2.name}`);
316241
+ const runtimes2 = await server2.startAgents([character2], [], { isTestMode: true });
316250
316242
  return runtimes2[0];
316251
316243
  };
316252
316244
  server2.loadCharacterTryPath = loadCharacterTryPath2;
@@ -316274,7 +316266,7 @@ async function runE2eTests(testPath, options, projectInfo) {
316274
316266
  if (!pluginUnderTest) {
316275
316267
  throw new Error("Plugin module could not be loaded for testing.");
316276
316268
  }
316277
- const defaultElizaCharacter = getElizaCharacter();
316269
+ const defaultElizaCharacter = getDefaultCharacter();
316278
316270
  const startedRuntimes = await server2.startAgents([defaultElizaCharacter], [pluginUnderTest], { isTestMode: true });
316279
316271
  const runtime = startedRuntimes[0];
316280
316272
  runtimes.push(runtime);
@@ -318120,5 +318112,5 @@ main().catch((error47) => {
318120
318112
  process.exit(1);
318121
318113
  });
318122
318114
 
318123
- //# debugId=7B9B65D9F3E017E164756E2164756E21
318115
+ //# debugId=2618F9F1AD5259AB64756E2164756E21
318124
318116
  //# sourceMappingURL=index.js.map