@elizaos/cli 1.5.9-alpha.1 → 1.5.9-alpha.11

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":"dev-server.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/actions/dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAmPtC;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4LrE"}
1
+ {"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/actions/dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAsRtC;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgMrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/utils/build-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,UAAU,EAAE,MAAM,UAAU,CAAC;AA0DnD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBvE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B5E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAiBxD"}
1
+ {"version":3,"file":"build-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/utils/build-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,UAAU,EAAE,MAAM,UAAU,CAAC;AA0DnD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBvE;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B5E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAqBxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"agent-start.d.ts","sourceRoot":"","sources":["../../../../src/commands/start/actions/agent-start.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAS7C;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,EACnB,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,EAChD,OAAO,GAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAO,EACjC,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,aAAa,CAAC,CA6FxB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAI1F"}
1
+ {"version":3,"file":"agent-start.d.ts","sourceRoot":"","sources":["../../../../src/commands/start/actions/agent-start.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAS7C;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,WAAW,EACnB,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,EAChD,OAAO,GAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAO,EACjC,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,aAAa,CAAC,CA8ExB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAI1F"}
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ var require_argument = __commonJS((exports) => {
79
79
  this._name = name;
80
80
  break;
81
81
  }
82
- if (this._name.length > 3 && this._name.slice(-3) === "...") {
82
+ if (this._name.endsWith("...")) {
83
83
  this.variadic = true;
84
84
  this._name = this._name.slice(0, -3);
85
85
  }
@@ -87,11 +87,12 @@ var require_argument = __commonJS((exports) => {
87
87
  name() {
88
88
  return this._name;
89
89
  }
90
- _concatValue(value, previous) {
90
+ _collectValue(value, previous) {
91
91
  if (previous === this.defaultValue || !Array.isArray(previous)) {
92
92
  return [value];
93
93
  }
94
- return previous.concat(value);
94
+ previous.push(value);
95
+ return previous;
95
96
  }
96
97
  default(value, description) {
97
98
  this.defaultValue = value;
@@ -109,7 +110,7 @@ var require_argument = __commonJS((exports) => {
109
110
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
110
111
  }
111
112
  if (this.variadic) {
112
- return this._concatValue(arg, previous);
113
+ return this._collectValue(arg, previous);
113
114
  }
114
115
  return arg;
115
116
  };
@@ -556,11 +557,12 @@ var require_option = __commonJS((exports) => {
556
557
  this.hidden = !!hide;
557
558
  return this;
558
559
  }
559
- _concatValue(value, previous) {
560
+ _collectValue(value, previous) {
560
561
  if (previous === this.defaultValue || !Array.isArray(previous)) {
561
562
  return [value];
562
563
  }
563
- return previous.concat(value);
564
+ previous.push(value);
565
+ return previous;
564
566
  }
565
567
  choices(values) {
566
568
  this.argChoices = values.slice();
@@ -569,7 +571,7 @@ var require_option = __commonJS((exports) => {
569
571
  throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
570
572
  }
571
573
  if (this.variadic) {
572
- return this._concatValue(arg, previous);
574
+ return this._collectValue(arg, previous);
573
575
  }
574
576
  return arg;
575
577
  };
@@ -875,7 +877,10 @@ var require_command = __commonJS((exports) => {
875
877
  configureOutput(configuration) {
876
878
  if (configuration === undefined)
877
879
  return this._outputConfiguration;
878
- this._outputConfiguration = Object.assign({}, this._outputConfiguration, configuration);
880
+ this._outputConfiguration = {
881
+ ...this._outputConfiguration,
882
+ ...configuration
883
+ };
879
884
  return this;
880
885
  }
881
886
  showHelpAfterError(displayHelp = true) {
@@ -924,7 +929,7 @@ var require_command = __commonJS((exports) => {
924
929
  }
925
930
  addArgument(argument) {
926
931
  const previousArgument = this.registeredArguments.slice(-1)[0];
927
- if (previousArgument && previousArgument.variadic) {
932
+ if (previousArgument?.variadic) {
928
933
  throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
929
934
  }
930
935
  if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
@@ -1079,7 +1084,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1079
1084
  if (val !== null && option.parseArg) {
1080
1085
  val = this._callParseArg(option, val, oldValue, invalidValueMessage);
1081
1086
  } else if (val !== null && option.variadic) {
1082
- val = option._concatValue(val, oldValue);
1087
+ val = option._collectValue(val, oldValue);
1083
1088
  }
1084
1089
  if (val == null) {
1085
1090
  if (option.negate) {
@@ -1454,7 +1459,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1454
1459
  this.processedArgs = processedArgs;
1455
1460
  }
1456
1461
  _chainOrCall(promise, fn) {
1457
- if (promise && promise.then && typeof promise.then === "function") {
1462
+ if (promise?.then && typeof promise.then === "function") {
1458
1463
  return promise.then(() => fn());
1459
1464
  }
1460
1465
  return fn();
@@ -1531,7 +1536,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1531
1536
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
1532
1537
  return promiseChain;
1533
1538
  }
1534
- if (this.parent && this.parent.listenerCount(commandEvent)) {
1539
+ if (this.parent?.listenerCount(commandEvent)) {
1535
1540
  checkForUnknownOptions();
1536
1541
  this._processArguments();
1537
1542
  this.parent.emit(commandEvent, operands, unknown);
@@ -1593,11 +1598,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1593
1598
  cmd._checkForConflictingLocalOptions();
1594
1599
  });
1595
1600
  }
1596
- parseOptions(argv) {
1601
+ parseOptions(args) {
1597
1602
  const operands = [];
1598
1603
  const unknown = [];
1599
1604
  let dest = operands;
1600
- const args = argv.slice();
1601
1605
  function maybeOption(arg) {
1602
1606
  return arg.length > 1 && arg[0] === "-";
1603
1607
  }
@@ -1607,12 +1611,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
1607
1611
  return !this._getCommandAndAncestors().some((cmd) => cmd.options.map((opt) => opt.short).some((short) => /^-\d$/.test(short)));
1608
1612
  };
1609
1613
  let activeVariadicOption = null;
1610
- while (args.length) {
1611
- const arg = args.shift();
1614
+ let activeGroup = null;
1615
+ let i = 0;
1616
+ while (i < args.length || activeGroup) {
1617
+ const arg = activeGroup ?? args[i++];
1618
+ activeGroup = null;
1612
1619
  if (arg === "--") {
1613
1620
  if (dest === unknown)
1614
1621
  dest.push(arg);
1615
- dest.push(...args);
1622
+ dest.push(...args.slice(i));
1616
1623
  break;
1617
1624
  }
1618
1625
  if (activeVariadicOption && (!maybeOption(arg) || negativeNumberArg(arg))) {
@@ -1624,14 +1631,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
1624
1631
  const option = this._findOption(arg);
1625
1632
  if (option) {
1626
1633
  if (option.required) {
1627
- const value = args.shift();
1634
+ const value = args[i++];
1628
1635
  if (value === undefined)
1629
1636
  this.optionMissingArgument(option);
1630
1637
  this.emit(`option:${option.name()}`, value);
1631
1638
  } else if (option.optional) {
1632
1639
  let value = null;
1633
- if (args.length > 0 && (!maybeOption(args[0]) || negativeNumberArg(args[0]))) {
1634
- value = args.shift();
1640
+ if (i < args.length && (!maybeOption(args[i]) || negativeNumberArg(args[i]))) {
1641
+ value = args[i++];
1635
1642
  }
1636
1643
  this.emit(`option:${option.name()}`, value);
1637
1644
  } else {
@@ -1648,7 +1655,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1648
1655
  this.emit(`option:${option.name()}`, arg.slice(2));
1649
1656
  } else {
1650
1657
  this.emit(`option:${option.name()}`);
1651
- args.unshift(`-${arg.slice(2)}`);
1658
+ activeGroup = `-${arg.slice(2)}`;
1652
1659
  }
1653
1660
  continue;
1654
1661
  }
@@ -1667,25 +1674,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
1667
1674
  if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
1668
1675
  if (this._findCommand(arg)) {
1669
1676
  operands.push(arg);
1670
- if (args.length > 0)
1671
- unknown.push(...args);
1677
+ unknown.push(...args.slice(i));
1672
1678
  break;
1673
1679
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
1674
- operands.push(arg);
1675
- if (args.length > 0)
1676
- operands.push(...args);
1680
+ operands.push(arg, ...args.slice(i));
1677
1681
  break;
1678
1682
  } else if (this._defaultCommandName) {
1679
- unknown.push(arg);
1680
- if (args.length > 0)
1681
- unknown.push(...args);
1683
+ unknown.push(arg, ...args.slice(i));
1682
1684
  break;
1683
1685
  }
1684
1686
  }
1685
1687
  if (this._passThroughOptions) {
1686
- dest.push(arg);
1687
- if (args.length > 0)
1688
- dest.push(...args);
1688
+ dest.push(arg, ...args.slice(i));
1689
1689
  break;
1690
1690
  }
1691
1691
  dest.push(arg);
@@ -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.5.9-alpha.1", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-09-11T15:28:23.282Z", BUILD_ENV = "production", version_default;
4691
+ var CLI_VERSION = "1.5.9-alpha.11", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-09-16T12:18:46.688Z", BUILD_ENV = "production", version_default;
4692
4692
  var init_version = __esm(() => {
4693
4693
  version_default = {
4694
4694
  version: CLI_VERSION,
@@ -5604,7 +5604,7 @@ var init_dist = __esm(() => {
5604
5604
  Object.keys(r.modifier);
5605
5605
  iD = Object.keys(r.color);
5606
5606
  CD = Object.keys(r.bgColor);
5607
- [...iD];
5607
+ [...iD, ...CD];
5608
5608
  ED = rD();
5609
5609
  d = new Set(["\x1B", "\x9B"]);
5610
5610
  _ = `${nD}8;;`;
@@ -259888,7 +259888,7 @@ import {
259888
259888
  logger as logger46,
259889
259889
  stringToUuid as stringToUuid2
259890
259890
  } from "@elizaos/core";
259891
- import { plugin as sqlPlugin } from "@elizaos/plugin-sql";
259891
+ import sqlPlugin from "@elizaos/plugin-sql";
259892
259892
  async function startAgent2(character, server2, init, plugins2 = [], options = {}) {
259893
259893
  character.id ??= stringToUuid2(character.name);
259894
259894
  if (!hasCharacterSecrets(character)) {
@@ -259942,21 +259942,6 @@ async function startAgent2(character, server2, init, plugins2 = [], options = {}
259942
259942
  };
259943
259943
  await initWrapper(runtime);
259944
259944
  await runtime.initialize();
259945
- try {
259946
- const migrationService = runtime.getService("database_migration");
259947
- if (migrationService) {
259948
- logger46.info("Discovering plugin schemas for dynamic migration...");
259949
- migrationService.discoverAndRegisterPluginSchemas(finalPlugins);
259950
- logger46.info("Running all plugin migrations...");
259951
- await migrationService.runAllPluginMigrations();
259952
- logger46.info("All plugin migrations completed successfully");
259953
- } else {
259954
- logger46.warn("DatabaseMigrationService not found - plugin schema migrations skipped");
259955
- }
259956
- } catch (error2) {
259957
- logger46.error({ error: error2 }, "Failed to run plugin migrations:");
259958
- throw error2;
259959
- }
259960
259945
  server2.registerAgent(runtime);
259961
259946
  logger46.log(`Started ${runtime.character.name} as ${runtime.agentId}`);
259962
259947
  return runtime;
@@ -273965,7 +273950,7 @@ function createDevContext(cwd) {
273965
273950
  return {
273966
273951
  directory: cwd,
273967
273952
  directoryType,
273968
- watchDirectory: existsSync22(srcDir) ? srcDir : cwd,
273953
+ watchDirectory: directoryType.monorepoRoot ? directoryType.monorepoRoot : existsSync22(srcDir) ? srcDir : cwd,
273969
273954
  buildRequired: directoryType.type !== "elizaos-monorepo"
273970
273955
  };
273971
273956
  }
@@ -274273,11 +274258,12 @@ import { logger as logger28 } from "@elizaos/core";
274273
274258
  import * as path26 from "path";
274274
274259
  import * as fs15 from "fs";
274275
274260
  var clientDevServerProcess = null;
274276
- function hasClientPackage(cwd) {
274277
- const installedClientPath = path26.join(cwd, "node_modules", "@elizaos", "client", "package.json");
274278
- const monorepoClientPath = path26.join(cwd, "packages", "client", "package.json");
274279
- const parentClientPath = path26.join(path26.dirname(cwd), "client", "package.json");
274280
- return fs15.existsSync(installedClientPath) || fs15.existsSync(monorepoClientPath) || fs15.existsSync(parentClientPath);
274261
+ function hasLocalClientSource(cwd) {
274262
+ const monorepoClient = path26.join(cwd, "packages", "client", "package.json");
274263
+ const parentClient = path26.join(path26.dirname(cwd), "client", "package.json");
274264
+ const localViteTs = path26.join(cwd, "vite.config.ts");
274265
+ const localViteJs = path26.join(cwd, "vite.config.js");
274266
+ return fs15.existsSync(monorepoClient) || fs15.existsSync(parentClient) || fs15.existsSync(localViteTs) || fs15.existsSync(localViteJs);
274281
274267
  }
274282
274268
  async function startClientDevServer(cwd) {
274283
274269
  if (clientDevServerProcess) {
@@ -274298,12 +274284,24 @@ async function startClientDevServer(cwd) {
274298
274284
  if (fs15.existsSync(path26.join(installedClientPath, "package.json"))) {
274299
274285
  clientDir = installedClientPath;
274300
274286
  }
274287
+ if (!clientDir) {
274288
+ const localViteTs = path26.join(cwd, "vite.config.ts");
274289
+ const localViteJs = path26.join(cwd, "vite.config.js");
274290
+ if (fs15.existsSync(localViteTs) || fs15.existsSync(localViteJs)) {
274291
+ clientDir = cwd;
274292
+ }
274293
+ }
274301
274294
  }
274302
274295
  }
274303
274296
  if (!clientDir) {
274304
274297
  console.warn("Client package not found, skipping client dev server");
274305
274298
  return;
274306
274299
  }
274300
+ const isInstalledClient = clientDir.includes(path26.join("node_modules", "@elizaos", "client"));
274301
+ if (isInstalledClient) {
274302
+ console.info("Detected installed @elizaos/client. Using server static UI instead of running Vite.");
274303
+ return;
274304
+ }
274307
274305
  console.info("Starting Vite dev server for client with HMR...");
274308
274306
  const clientPackageJson = JSON.parse(fs15.readFileSync(path26.join(clientDir, "package.json"), "utf-8"));
274309
274307
  const hasDevClientScript = clientPackageJson.scripts?.["dev:client"];
@@ -274398,9 +274396,11 @@ async function stopClientDevServer() {
274398
274396
  }
274399
274397
  async function getClientPort(cwd) {
274400
274398
  const possibleClientDirs = [
274399
+ cwd,
274401
274400
  path26.join(cwd, "packages", "client"),
274402
274401
  path26.join(path26.dirname(cwd), "client"),
274403
- path26.join(cwd, "..", "client")
274402
+ path26.join(cwd, "..", "client"),
274403
+ path26.join(cwd, "node_modules", "@elizaos", "client")
274404
274404
  ];
274405
274405
  for (const clientDir of possibleClientDirs) {
274406
274406
  const pkgPath = path26.join(clientDir, "package.json");
@@ -274490,13 +274490,15 @@ async function startDevMode(options) {
274490
274490
  const rebuildAndRestart = async () => {
274491
274491
  try {
274492
274492
  await serverManager2.stop();
274493
- if ((isProject || isMonorepo) && hasClientPackage(cwd)) {
274493
+ const hasLocalVite2 = fs15.existsSync(path26.join(cwd, "vite.config.ts")) || fs15.existsSync(path26.join(cwd, "vite.config.js"));
274494
+ const shouldStartClient2 = (isProject || isMonorepo) && hasLocalClientSource(cwd) || isPlugin && hasLocalVite2;
274495
+ if (shouldStartClient2) {
274494
274496
  await stopClientDevServer();
274495
274497
  }
274496
274498
  await performRebuild(context);
274497
274499
  console.log("\u2713 Rebuild successful, restarting...");
274498
274500
  await serverManager2.start(cliArgs);
274499
- if ((isProject || isMonorepo) && hasClientPackage(cwd)) {
274501
+ if (shouldStartClient2) {
274500
274502
  await new Promise((resolve2) => setTimeout(resolve2, 2000));
274501
274503
  await startClientDevServer(cwd);
274502
274504
  }
@@ -274520,7 +274522,9 @@ async function startDevMode(options) {
274520
274522
  const serverPort = portArgIndex !== -1 && cliArgs[portArgIndex + 1] ? parseInt(cliArgs[portArgIndex + 1], 10) : availablePort || 3000;
274521
274523
  await serverManager2.start(cliArgs);
274522
274524
  await new Promise((resolve2) => setTimeout(resolve2, 2000));
274523
- if ((isProject || isMonorepo) && hasClientPackage(cwd)) {
274525
+ const hasLocalVite = fs15.existsSync(path26.join(cwd, "vite.config.ts")) || fs15.existsSync(path26.join(cwd, "vite.config.js"));
274526
+ const shouldStartClient = (isProject || isMonorepo) && hasLocalClientSource(cwd) || isPlugin && hasLocalVite;
274527
+ if (shouldStartClient) {
274524
274528
  await startClientDevServer(cwd);
274525
274529
  await new Promise((resolve2) => setTimeout(resolve2, 1000));
274526
274530
  }
@@ -299232,5 +299236,5 @@ main2().catch((error2) => {
299232
299236
  process.exit(1);
299233
299237
  });
299234
299238
 
299235
- //# debugId=1AC2240F87319FFC64756E2164756E21
299239
+ //# debugId=9DAF0F5368E631DE64756E2164756E21
299236
299240
  //# sourceMappingURL=index.js.map