@elizaos/cli 1.6.1-alpha.2 → 1.6.1-alpha.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/start/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,KAAK,SAgLd,CAAC;AAGL,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/start/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,KAAK,SAiOd,CAAC;AAGL,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -4688,7 +4688,7 @@ __export(exports_version, {
4688
4688
  BUILD_TIME: () => BUILD_TIME,
4689
4689
  BUILD_ENV: () => BUILD_ENV
4690
4690
  });
4691
- var CLI_VERSION = "1.6.1-alpha.2", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-09-29T16:13:30.314Z", BUILD_ENV = "production", version_default;
4691
+ var CLI_VERSION = "1.6.1-alpha.4", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-09-30T14:16:58.537Z", BUILD_ENV = "production", version_default;
4692
4692
  var init_version = __esm(() => {
4693
4693
  version_default = {
4694
4694
  version: CLI_VERSION,
@@ -305510,16 +305510,43 @@ var start = new Command().name("start").description("Build and start the Eliza a
305510
305510
  });
305511
305511
  await server2.start(options.port || 3000);
305512
305512
  if (projectAgents && projectAgents.length > 0) {
305513
- const charactersToStart = projectAgents.map((pa) => pa.character);
305514
- const runtimes = await server2.startAgents(charactersToStart);
305515
- for (let i = 0;i < projectAgents.length; i++) {
305516
- const init = projectAgents[i]?.init;
305517
- const runtime = runtimes[i];
305518
- if (typeof init === "function" && runtime) {
305519
- await init(runtime);
305513
+ const runtimes = [];
305514
+ const agentRuntimeMap = new Map;
305515
+ for (const projectAgent of projectAgents) {
305516
+ try {
305517
+ const agentPlugins = Array.isArray(projectAgent.plugins) ? projectAgent.plugins : [];
305518
+ const [runtime] = await server2.startAgents([projectAgent.character], agentPlugins);
305519
+ if (runtime) {
305520
+ runtimes.push(runtime);
305521
+ agentRuntimeMap.set(projectAgent, runtime);
305522
+ logger42.info(`Started agent: ${projectAgent.character.name || "Unnamed"} (${runtime.agentId})`);
305523
+ } else {
305524
+ logger42.error(`Failed to start agent: ${projectAgent.character.name || "Unnamed"} - runtime is undefined`);
305525
+ }
305526
+ } catch (error46) {
305527
+ logger42.error({
305528
+ error: error46,
305529
+ characterName: projectAgent.character.name || "Unnamed"
305530
+ }, "Failed to start project agent");
305531
+ }
305532
+ }
305533
+ logger42.info(`Started ${runtimes.length}/${projectAgents.length} project agents`);
305534
+ for (const projectAgent of projectAgents) {
305535
+ const runtime = agentRuntimeMap.get(projectAgent);
305536
+ if (runtime && typeof projectAgent.init === "function") {
305537
+ try {
305538
+ logger42.info(`Running init function for agent: ${projectAgent.character.name || "Unnamed"}`);
305539
+ await projectAgent.init(runtime);
305540
+ } catch (error46) {
305541
+ logger42.error({
305542
+ error: error46,
305543
+ characterName: projectAgent.character.name || "Unnamed",
305544
+ agentId: runtime.agentId
305545
+ }, "Agent init function failed");
305546
+ }
305520
305547
  }
305521
305548
  }
305522
- logger42.info(`Started ${runtimes.length} project agents`);
305549
+ logger42.info("All agent init functions completed");
305523
305550
  } else if (characters && characters.length > 0) {
305524
305551
  const runtimes = await server2.startAgents(characters);
305525
305552
  logger42.info(`Started ${runtimes.length} agents`);
@@ -307743,5 +307770,5 @@ main2().catch((error46) => {
307743
307770
  process.exit(1);
307744
307771
  });
307745
307772
 
307746
- //# debugId=777BD0879D8F834F64756E2164756E21
307773
+ //# debugId=4BEB9185C78477DC64756E2164756E21
307747
307774
  //# sourceMappingURL=index.js.map