@elizaos/cli 1.1.5 → 1.1.7-alpha.0
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/{chunk-77IXJDDC.js → chunk-ECNPEB5D.js} +1 -1
- package/dist/{chunk-GILK2M6Z.js → chunk-RTC6IT4U.js} +1 -33
- package/dist/{chunk-KFGXZCQP.js → chunk-XJVXRHX2.js} +2 -2
- package/dist/{chunk-OHXCCMDW.js → chunk-ZVDUENTN.js} +6 -6
- package/dist/commands/agent/actions/index.js +1 -1
- package/dist/commands/agent/index.js +1 -1
- package/dist/commands/create/actions/index.js +3 -3
- package/dist/commands/create/index.js +4 -4
- package/dist/index.js +58 -26
- package/dist/{registry-FOS35FQH.js → registry-WE56QM2V.js} +1 -1
- package/dist/{setup-6XRSST5O.js → setup-R6L5JN2R.js} +2 -2
- package/dist/templates/plugin-starter/dist/index.js +381 -0
- package/dist/templates/plugin-starter/dist/index.js.map +1 -0
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-tee-starter/package.json +3 -3
- package/dist/{utils-QBGEZZ4I.js → utils-SLAKQOI6.js} +1 -3
- package/package.json +6 -6
- package/templates/plugin-starter/dist/.vite/manifest.json +11 -0
- package/templates/plugin-starter/dist/index.d.ts +14 -0
- package/templates/plugin-starter/dist/index.js +381 -0
- package/templates/plugin-starter/dist/index.js.map +1 -0
- package/templates/plugin-starter/package.json +2 -2
- package/templates/project-starter/package.json +4 -4
- package/templates/project-tee-starter/package.json +3 -3
- package/dist/assets/index-BXWgVSUO.css +0 -1
- package/dist/assets/index-BXWgVSUO.css.br +0 -0
- package/dist/assets/index-CkUr-lz0.js +0 -161648
- package/dist/assets/index-CkUr-lz0.js.br +0 -0
- package/dist/assets/index-CkUr-lz0.js.map +0 -1
- package/dist/assets/index-DA8nGyvG.js +0 -7484
- package/dist/assets/index-DA8nGyvG.js.br +0 -0
- package/dist/assets/index-DA8nGyvG.js.map +0 -1
- package/dist/assets/vendor-Dp9Dttv5.js +0 -5887
- package/dist/assets/vendor-Dp9Dttv5.js.br +0 -0
- package/dist/assets/vendor-Dp9Dttv5.js.map +0 -1
- package/dist/elizaos-avatar.png +0 -0
- package/dist/elizaos-icon.png +0 -0
- package/dist/elizaos-logo-light.png +0 -0
- package/dist/elizaos.webp +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/images/agents/agent1.png +0 -0
- package/dist/images/agents/agent2.png +0 -0
- package/dist/images/agents/agent3.png +0 -0
- package/dist/images/agents/agent4.png +0 -0
- package/dist/images/agents/agent5.png +0 -0
- package/dist/index.html +0 -24
|
@@ -1166,37 +1166,6 @@ async function replacePluginNameInFiles(targetDir, pluginName) {
|
|
|
1166
1166
|
});
|
|
1167
1167
|
await Promise.all(promises2);
|
|
1168
1168
|
}
|
|
1169
|
-
async function copyClientDist() {
|
|
1170
|
-
logger7.debug("Copying client dist files to CLI package");
|
|
1171
|
-
const srcClientDist = path6.resolve(process.cwd(), "../client/dist");
|
|
1172
|
-
const destClientDist = path6.resolve(process.cwd(), "./dist");
|
|
1173
|
-
const indexSrc = path6.join(srcClientDist, "index.html");
|
|
1174
|
-
const indexDest = path6.join(destClientDist, "index.html");
|
|
1175
|
-
await fs5.mkdir(destClientDist, { recursive: true });
|
|
1176
|
-
let retries = 0;
|
|
1177
|
-
const maxRetries = 10;
|
|
1178
|
-
const retryDelay = 1e3;
|
|
1179
|
-
while (retries < maxRetries) {
|
|
1180
|
-
if (existsSync5(indexSrc)) {
|
|
1181
|
-
break;
|
|
1182
|
-
}
|
|
1183
|
-
logger7.info(`Waiting for client index.html (attempt ${retries + 1}/${maxRetries})\u2026`);
|
|
1184
|
-
await new Promise((r) => setTimeout(r, retryDelay));
|
|
1185
|
-
retries++;
|
|
1186
|
-
}
|
|
1187
|
-
if (!existsSync5(indexSrc)) {
|
|
1188
|
-
logger7.error(`index.html not found at ${indexSrc} after ${maxRetries} attempts`);
|
|
1189
|
-
logger7.error("Client package must be built before CLI package. Run: bun run build:client");
|
|
1190
|
-
throw new Error("Client dist files not found - build the client package first");
|
|
1191
|
-
}
|
|
1192
|
-
await copyDir(srcClientDist, destClientDist);
|
|
1193
|
-
if (!existsSync5(indexDest)) {
|
|
1194
|
-
logger7.error(`index.html missing in CLI dist at ${indexDest}`);
|
|
1195
|
-
throw new Error("Failed to copy client files to CLI dist directory");
|
|
1196
|
-
}
|
|
1197
|
-
logger7.info("\u2705 Client files successfully copied to CLI package");
|
|
1198
|
-
logger7.success("Client dist files copied successfully");
|
|
1199
|
-
}
|
|
1200
1169
|
|
|
1201
1170
|
// src/utils/display-banner.ts
|
|
1202
1171
|
import { existsSync as existsSync6, readFileSync as readFileSync4 } from "fs";
|
|
@@ -2788,7 +2757,7 @@ async function getGitHubCredentials() {
|
|
|
2788
2757
|
}
|
|
2789
2758
|
logger10.warn("Invalid GitHub token found in environment variables");
|
|
2790
2759
|
}
|
|
2791
|
-
const { getGitHubToken: getGitHubToken2 } = await import("./registry-
|
|
2760
|
+
const { getGitHubToken: getGitHubToken2 } = await import("./registry-WE56QM2V.js");
|
|
2792
2761
|
const token = await getGitHubToken2() || void 0;
|
|
2793
2762
|
if (token) {
|
|
2794
2763
|
const isValid2 = await validateGitHubToken(token);
|
|
@@ -5386,7 +5355,6 @@ export {
|
|
|
5386
5355
|
saveConfig,
|
|
5387
5356
|
copyDir,
|
|
5388
5357
|
copyTemplate,
|
|
5389
|
-
copyClientDist,
|
|
5390
5358
|
isRunningFromNodeModules,
|
|
5391
5359
|
getVersion,
|
|
5392
5360
|
getCliInstallTag,
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
selectEmbeddingModel,
|
|
13
13
|
validateCreateOptions,
|
|
14
14
|
validateProjectName
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZVDUENTN.js";
|
|
16
16
|
import {
|
|
17
17
|
displayBanner,
|
|
18
18
|
handleError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RTC6IT4U.js";
|
|
20
20
|
|
|
21
21
|
// src/commands/create/index.ts
|
|
22
22
|
import { Command } from "commander";
|
|
@@ -4,7 +4,7 @@ const require = createRequire(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
setupProjectEnvironment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ECNPEB5D.js";
|
|
8
8
|
import {
|
|
9
9
|
buildProjectWithSpinner,
|
|
10
10
|
copyTemplate,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getDisplayDirectory,
|
|
13
13
|
installDependenciesWithSpinner,
|
|
14
14
|
runTasks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RTC6IT4U.js";
|
|
16
16
|
|
|
17
17
|
// src/characters/eliza.ts
|
|
18
18
|
var baseCharacter = {
|
|
@@ -605,8 +605,8 @@ async function createTEEProject(projectName, targetDir, database, aiModel, embed
|
|
|
605
605
|
await withCleanupOnInterrupt(teeTargetDir, projectName, async () => {
|
|
606
606
|
await fs2.mkdir(teeTargetDir, { recursive: true });
|
|
607
607
|
if (!isNonInteractive) {
|
|
608
|
-
const { setupAIModelConfig, setupEmbeddingModelConfig } = await import("./setup-
|
|
609
|
-
const { promptAndStorePostgresUrl } = await import("./utils-
|
|
608
|
+
const { setupAIModelConfig, setupEmbeddingModelConfig } = await import("./setup-R6L5JN2R.js");
|
|
609
|
+
const { promptAndStorePostgresUrl } = await import("./utils-SLAKQOI6.js");
|
|
610
610
|
const envFilePath = `${teeTargetDir}/.env`;
|
|
611
611
|
if (database === "postgres") {
|
|
612
612
|
await promptAndStorePostgresUrl(envFilePath);
|
|
@@ -666,8 +666,8 @@ async function createProject(projectName, targetDir, database, aiModel, embeddin
|
|
|
666
666
|
await fs2.mkdir(projectTargetDir, { recursive: true });
|
|
667
667
|
}
|
|
668
668
|
if (!isNonInteractive) {
|
|
669
|
-
const { setupAIModelConfig, setupEmbeddingModelConfig } = await import("./setup-
|
|
670
|
-
const { promptAndStorePostgresUrl } = await import("./utils-
|
|
669
|
+
const { setupAIModelConfig, setupEmbeddingModelConfig } = await import("./setup-R6L5JN2R.js");
|
|
670
|
+
const { promptAndStorePostgresUrl } = await import("./utils-SLAKQOI6.js");
|
|
671
671
|
const envFilePath = `${projectTargetDir}/.env`;
|
|
672
672
|
if (database === "postgres") {
|
|
673
673
|
await promptAndStorePostgresUrl(envFilePath);
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
createPlugin,
|
|
8
8
|
createProject,
|
|
9
9
|
createTEEProject
|
|
10
|
-
} from "../../../chunk-
|
|
10
|
+
} from "../../../chunk-ZVDUENTN.js";
|
|
11
11
|
import {
|
|
12
12
|
createProjectDirectories,
|
|
13
13
|
setupAIModelConfig,
|
|
14
14
|
setupEmbeddingModelConfig,
|
|
15
15
|
setupProjectEnvironment
|
|
16
|
-
} from "../../../chunk-
|
|
17
|
-
import "../../../chunk-
|
|
16
|
+
} from "../../../chunk-ECNPEB5D.js";
|
|
17
|
+
import "../../../chunk-RTC6IT4U.js";
|
|
18
18
|
import "../../../chunk-7PPBVSWE.js";
|
|
19
19
|
import "../../../chunk-F24MS2YR.js";
|
|
20
20
|
import "../../../chunk-AQ6OMR2A.js";
|
|
@@ -4,10 +4,10 @@ const require = createRequire(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
create
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
7
|
+
} from "../../chunk-XJVXRHX2.js";
|
|
8
|
+
import "../../chunk-ZVDUENTN.js";
|
|
9
|
+
import "../../chunk-ECNPEB5D.js";
|
|
10
|
+
import "../../chunk-RTC6IT4U.js";
|
|
11
11
|
import "../../chunk-7PPBVSWE.js";
|
|
12
12
|
import "../../chunk-F24MS2YR.js";
|
|
13
13
|
import "../../chunk-AQ6OMR2A.js";
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,11 @@ const require = createRequire(import.meta.url);
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
create
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XJVXRHX2.js";
|
|
9
9
|
import {
|
|
10
10
|
getElizaCharacter
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-ZVDUENTN.js";
|
|
12
|
+
import "./chunk-ECNPEB5D.js";
|
|
13
13
|
import {
|
|
14
14
|
TestRunner,
|
|
15
15
|
UserEnvironment,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
testPublishToGitHub,
|
|
47
47
|
testPublishToNpm,
|
|
48
48
|
validateDataDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-RTC6IT4U.js";
|
|
50
50
|
import {
|
|
51
51
|
configureEmojis,
|
|
52
52
|
emoji,
|
|
@@ -4567,12 +4567,44 @@ async function stopAgent(runtime, server) {
|
|
|
4567
4567
|
}
|
|
4568
4568
|
|
|
4569
4569
|
// src/commands/start/actions/server-start.ts
|
|
4570
|
+
import path22 from "path";
|
|
4571
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
4572
|
+
import { existsSync as existsSync14, readFileSync as readFileSync6 } from "fs";
|
|
4570
4573
|
async function startAgents(options) {
|
|
4571
4574
|
const postgresUrl = await configureDatabaseSettings(options.configure);
|
|
4572
4575
|
if (postgresUrl) process.env.POSTGRES_URL = postgresUrl;
|
|
4573
4576
|
const pgliteDataDir = postgresUrl ? void 0 : await resolvePgliteDir();
|
|
4577
|
+
const __filename = fileURLToPath4(import.meta.url);
|
|
4578
|
+
const __dirname = path22.dirname(__filename);
|
|
4579
|
+
let cliDistPath = path22.resolve(__dirname, "../../../");
|
|
4580
|
+
const indexPath = path22.join(cliDistPath, "index.html");
|
|
4581
|
+
if (!existsSync14(indexPath)) {
|
|
4582
|
+
let currentDir = __dirname;
|
|
4583
|
+
while (currentDir !== path22.dirname(currentDir)) {
|
|
4584
|
+
const packageJsonPath = path22.join(currentDir, "package.json");
|
|
4585
|
+
if (existsSync14(packageJsonPath)) {
|
|
4586
|
+
try {
|
|
4587
|
+
const packageJson = JSON.parse(readFileSync6(packageJsonPath, "utf-8"));
|
|
4588
|
+
if (packageJson.name === "@elizaos/cli") {
|
|
4589
|
+
const distPath = path22.join(currentDir, "dist");
|
|
4590
|
+
if (existsSync14(path22.join(distPath, "index.html"))) {
|
|
4591
|
+
cliDistPath = distPath;
|
|
4592
|
+
break;
|
|
4593
|
+
}
|
|
4594
|
+
}
|
|
4595
|
+
} catch {
|
|
4596
|
+
}
|
|
4597
|
+
}
|
|
4598
|
+
currentDir = path22.dirname(currentDir);
|
|
4599
|
+
}
|
|
4600
|
+
}
|
|
4601
|
+
logger18.debug(`[CLI] Resolved client dist path: ${cliDistPath}`);
|
|
4574
4602
|
const server = new AgentServer();
|
|
4575
|
-
await server.initialize({
|
|
4603
|
+
await server.initialize({
|
|
4604
|
+
dataDir: pgliteDataDir,
|
|
4605
|
+
postgresUrl: postgresUrl || void 0,
|
|
4606
|
+
clientPath: cliDistPath
|
|
4607
|
+
});
|
|
4576
4608
|
server.startAgent = (character) => startAgent(character, server);
|
|
4577
4609
|
server.stopAgent = (runtime) => stopAgent(runtime, server);
|
|
4578
4610
|
server.loadCharacterTryPath = loadCharacterTryPath;
|
|
@@ -4610,7 +4642,7 @@ async function startAgents(options) {
|
|
|
4610
4642
|
|
|
4611
4643
|
// src/commands/start/index.ts
|
|
4612
4644
|
import * as fs10 from "fs";
|
|
4613
|
-
import * as
|
|
4645
|
+
import * as path23 from "path";
|
|
4614
4646
|
var start = new Command7().name("start").description("Start the Eliza agent server").option("-c, --configure", "Reconfigure services and AI models").option("-p, --port <port>", "Port to listen on", validatePort).option("--character <paths...>", "Character file(s) to use").hook("preAction", async () => {
|
|
4615
4647
|
await displayBanner();
|
|
4616
4648
|
}).action(async (options) => {
|
|
@@ -4620,7 +4652,7 @@ var start = new Command7().name("start").description("Start the Eliza agent serv
|
|
|
4620
4652
|
let projectAgents = [];
|
|
4621
4653
|
if (options.character && options.character.length > 0) {
|
|
4622
4654
|
for (const charPath of options.character) {
|
|
4623
|
-
const resolvedPath =
|
|
4655
|
+
const resolvedPath = path23.resolve(charPath);
|
|
4624
4656
|
if (!fs10.existsSync(resolvedPath)) {
|
|
4625
4657
|
logger19.error(`Character file not found: ${resolvedPath}`);
|
|
4626
4658
|
throw new Error(`Character file not found: ${resolvedPath}`);
|
|
@@ -4747,9 +4779,9 @@ import { logger as logger24 } from "@elizaos/core";
|
|
|
4747
4779
|
// src/commands/test/utils/project-utils.ts
|
|
4748
4780
|
import { logger as logger20 } from "@elizaos/core";
|
|
4749
4781
|
import * as fs11 from "fs";
|
|
4750
|
-
import
|
|
4782
|
+
import path24 from "path";
|
|
4751
4783
|
function getProjectType(testPath) {
|
|
4752
|
-
const targetPath = testPath ?
|
|
4784
|
+
const targetPath = testPath ? path24.resolve(process.cwd(), testPath) : process.cwd();
|
|
4753
4785
|
return detectDirectoryType(targetPath);
|
|
4754
4786
|
}
|
|
4755
4787
|
function processFilterName(name) {
|
|
@@ -4768,11 +4800,11 @@ async function installPluginDependencies(projectInfo) {
|
|
|
4768
4800
|
}
|
|
4769
4801
|
const project = await loadProject(process.cwd());
|
|
4770
4802
|
if (project.isPlugin && project.pluginModule?.dependencies && project.pluginModule.dependencies.length > 0) {
|
|
4771
|
-
const pluginsDir =
|
|
4803
|
+
const pluginsDir = path24.join(process.cwd(), ".eliza", "plugins");
|
|
4772
4804
|
if (!fs11.existsSync(pluginsDir)) {
|
|
4773
4805
|
await fs11.promises.mkdir(pluginsDir, { recursive: true });
|
|
4774
4806
|
}
|
|
4775
|
-
const packageJsonPath =
|
|
4807
|
+
const packageJsonPath = path24.join(pluginsDir, "package.json");
|
|
4776
4808
|
if (!fs11.existsSync(packageJsonPath)) {
|
|
4777
4809
|
const packageJsonContent = {
|
|
4778
4810
|
name: "test-plugin-dependencies",
|
|
@@ -4782,10 +4814,10 @@ async function installPluginDependencies(projectInfo) {
|
|
|
4782
4814
|
};
|
|
4783
4815
|
await fs11.promises.writeFile(packageJsonPath, JSON.stringify(packageJsonContent, null, 2));
|
|
4784
4816
|
}
|
|
4785
|
-
const { installPlugin: installPlugin2 } = await import("./utils-
|
|
4817
|
+
const { installPlugin: installPlugin2 } = await import("./utils-SLAKQOI6.js");
|
|
4786
4818
|
for (const dependency of project.pluginModule.dependencies) {
|
|
4787
4819
|
await installPlugin2(dependency, pluginsDir);
|
|
4788
|
-
const dependencyPath =
|
|
4820
|
+
const dependencyPath = path24.join(pluginsDir, "node_modules", dependency);
|
|
4789
4821
|
if (fs11.existsSync(dependencyPath)) {
|
|
4790
4822
|
try {
|
|
4791
4823
|
await runBunCommand(["install"], dependencyPath);
|
|
@@ -4802,16 +4834,16 @@ async function installPluginDependencies(projectInfo) {
|
|
|
4802
4834
|
// src/commands/test/actions/component-tests.ts
|
|
4803
4835
|
import { logger as logger22 } from "@elizaos/core";
|
|
4804
4836
|
import { spawn as spawn3 } from "child_process";
|
|
4805
|
-
import
|
|
4837
|
+
import path26 from "path";
|
|
4806
4838
|
|
|
4807
4839
|
// src/utils/testing/tsc-validator.ts
|
|
4808
4840
|
import { logger as logger21 } from "@elizaos/core";
|
|
4809
4841
|
import { execa as execa9 } from "execa";
|
|
4810
|
-
import
|
|
4811
|
-
import { existsSync as
|
|
4842
|
+
import path25 from "path";
|
|
4843
|
+
import { existsSync as existsSync17 } from "fs";
|
|
4812
4844
|
async function runTypeCheck(projectPath, strict = true) {
|
|
4813
|
-
const tsconfigPath =
|
|
4814
|
-
if (!
|
|
4845
|
+
const tsconfigPath = path25.join(projectPath, "tsconfig.json");
|
|
4846
|
+
if (!existsSync17(tsconfigPath)) {
|
|
4815
4847
|
return {
|
|
4816
4848
|
success: false,
|
|
4817
4849
|
errors: [`No tsconfig.json found at ${tsconfigPath}`],
|
|
@@ -4879,7 +4911,7 @@ async function runComponentTests(testPath, options, projectInfo) {
|
|
|
4879
4911
|
}
|
|
4880
4912
|
const monorepoRoot = UserEnvironment.getInstance().findMonorepoRoot(process.cwd());
|
|
4881
4913
|
const baseDir = monorepoRoot ?? process.cwd();
|
|
4882
|
-
const targetPath = testPath ?
|
|
4914
|
+
const targetPath = testPath ? path26.resolve(baseDir, testPath) : process.cwd();
|
|
4883
4915
|
logger22.info(`Executing: bun ${args.join(" ")} in ${targetPath}`);
|
|
4884
4916
|
const child = spawn3("bun", args, {
|
|
4885
4917
|
stdio: "inherit",
|
|
@@ -4909,7 +4941,7 @@ import { AgentServer as AgentServer2, jsonToCharacter as jsonToCharacter2, loadC
|
|
|
4909
4941
|
import { logger as logger23 } from "@elizaos/core";
|
|
4910
4942
|
import * as dotenv2 from "dotenv";
|
|
4911
4943
|
import * as fs12 from "fs";
|
|
4912
|
-
import
|
|
4944
|
+
import path27 from "path";
|
|
4913
4945
|
async function runE2eTests(testPath, options, projectInfo) {
|
|
4914
4946
|
if (!options.skipBuild) {
|
|
4915
4947
|
try {
|
|
@@ -4927,10 +4959,10 @@ async function runE2eTests(testPath, options, projectInfo) {
|
|
|
4927
4959
|
try {
|
|
4928
4960
|
const runtimes = [];
|
|
4929
4961
|
const projectAgents = [];
|
|
4930
|
-
const elizaDir =
|
|
4931
|
-
const packageName =
|
|
4962
|
+
const elizaDir = path27.join(process.cwd(), ".eliza");
|
|
4963
|
+
const packageName = path27.basename(process.cwd());
|
|
4932
4964
|
const timestamp = Date.now();
|
|
4933
|
-
const uniqueDbDir =
|
|
4965
|
+
const uniqueDbDir = path27.join(process.cwd(), ".elizadb-test", `${packageName}-${timestamp}`);
|
|
4934
4966
|
const elizaDbDir = uniqueDbDir;
|
|
4935
4967
|
const envInfo = await UserEnvironment.getInstanceInfo();
|
|
4936
4968
|
const envFilePath = envInfo.paths.envFilePath;
|
|
@@ -4983,7 +5015,7 @@ async function runE2eTests(testPath, options, projectInfo) {
|
|
|
4983
5015
|
logger23.info("Attempting to load project or plugin...");
|
|
4984
5016
|
const monorepoRoot = UserEnvironment.getInstance().findMonorepoRoot(process.cwd());
|
|
4985
5017
|
const baseDir = monorepoRoot ?? process.cwd();
|
|
4986
|
-
const targetPath = testPath ?
|
|
5018
|
+
const targetPath = testPath ? path27.resolve(baseDir, testPath) : process.cwd();
|
|
4987
5019
|
project = await loadProject(targetPath);
|
|
4988
5020
|
if (!project || !project.agents || project.agents.length === 0) {
|
|
4989
5021
|
throw new Error("No agents found in project configuration");
|
|
@@ -5131,7 +5163,7 @@ async function runE2eTests(testPath, options, projectInfo) {
|
|
|
5131
5163
|
fs12.rmSync(elizaDbDir, { recursive: true, force: true });
|
|
5132
5164
|
console.info(`Successfully cleaned up test database directory`);
|
|
5133
5165
|
}
|
|
5134
|
-
const testDir =
|
|
5166
|
+
const testDir = path27.dirname(elizaDbDir);
|
|
5135
5167
|
if (fs12.existsSync(testDir) && fs12.readdirSync(testDir).length === 0) {
|
|
5136
5168
|
fs12.rmSync(testDir, { recursive: true, force: true });
|
|
5137
5169
|
}
|
|
@@ -5197,7 +5229,7 @@ import * as net from "net";
|
|
|
5197
5229
|
// src/commands/test/utils/plugin-utils.ts
|
|
5198
5230
|
import { logger as logger25 } from "@elizaos/core";
|
|
5199
5231
|
import * as fs13 from "fs";
|
|
5200
|
-
import
|
|
5232
|
+
import path28 from "path";
|
|
5201
5233
|
|
|
5202
5234
|
// src/commands/test/index.ts
|
|
5203
5235
|
var test = new Command10().name("test").description("Run tests for the current project or a specified plugin").argument("[path]", "Optional path to the project or plugin to test").addOption(
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
setupAIModelConfig,
|
|
8
8
|
setupEmbeddingModelConfig,
|
|
9
9
|
setupProjectEnvironment
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ECNPEB5D.js";
|
|
11
|
+
import "./chunk-RTC6IT4U.js";
|
|
12
12
|
import "./chunk-7PPBVSWE.js";
|
|
13
13
|
import "./chunk-F24MS2YR.js";
|
|
14
14
|
import "./chunk-AQ6OMR2A.js";
|