@elizaos/cli 1.2.3 → 1.2.5
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/bun-exec-4BOHUSSZ.js +21 -0
- package/dist/chunk-6ZB77OJK.js +154 -0
- package/dist/chunk-AQ6OMR2A.js +14 -0
- package/dist/{chunk-JZG5QBNT.js → chunk-ECH6TQ7M.js} +2 -2
- package/dist/chunk-EVE5GO74.js +183 -0
- package/dist/{chunk-2XI6N7KN.js → chunk-JR4V32X7.js} +348 -67
- package/dist/{chunk-PSSTO76B.js → chunk-X5K7QYAH.js} +79 -97
- package/dist/commands/agent/actions/index.js +4 -3
- package/dist/commands/agent/index.js +4 -3
- package/dist/commands/create/actions/index.d.ts +5 -1
- package/dist/commands/create/actions/index.js +8 -7
- package/dist/commands/create/index.js +6 -6
- package/dist/commands/shared/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -27
- package/dist/{plugin-creator-5CER524N.js → plugin-creator-UBYADX3B.js} +16 -15
- package/dist/{registry-SN5V2VXR.js → registry-U2ZGKGSS.js} +4 -3
- package/dist/templates/plugin-starter/dist/assets/index-CgkejLs_.css +1 -0
- package/dist/templates/plugin-starter/dist/assets/index-DUtsQhKX.js +49 -0
- package/dist/templates/plugin-starter/dist/index.html +14 -0
- package/dist/templates/plugin-starter/package.json +1 -1
- package/dist/templates/plugin-starter/src/__tests__/build-order.test.ts +51 -0
- package/dist/templates/plugin-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/dist/templates/plugin-starter/tsup.config.ts +1 -1
- package/dist/templates/plugin-starter/vite.config.ts +1 -1
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-starter/src/__tests__/build-order.test.ts +59 -0
- package/dist/templates/project-starter/src/__tests__/character-plugin-ordering.test.ts +11 -110
- package/dist/templates/project-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/dist/templates/project-starter/src/character.ts +14 -17
- package/dist/templates/project-starter/tsup.config.ts +1 -1
- package/dist/templates/project-tee-starter/package.json +3 -3
- package/dist/templates/project-tee-starter/src/character.ts +3 -0
- package/dist/{utils-DTW3XU6O.js → utils-7XPDALF7.js} +4 -3
- package/package.json +6 -6
- package/templates/plugin-starter/dist/.vite/manifest.json +2 -2
- package/templates/plugin-starter/dist/assets/index-CgkejLs_.css +1 -0
- package/templates/plugin-starter/dist/assets/index-DUtsQhKX.js +49 -0
- package/templates/plugin-starter/dist/index.html +14 -0
- package/templates/plugin-starter/package.json +1 -1
- package/templates/plugin-starter/src/__tests__/build-order.test.ts +51 -0
- package/templates/plugin-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/templates/plugin-starter/tsup.config.ts +1 -1
- package/templates/plugin-starter/vite.config.ts +1 -1
- package/templates/project-starter/package.json +4 -4
- package/templates/project-starter/src/__tests__/build-order.test.ts +59 -0
- package/templates/project-starter/src/__tests__/character-plugin-ordering.test.ts +11 -110
- package/templates/project-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/templates/project-starter/src/character.ts +14 -17
- package/templates/project-starter/tsup.config.ts +1 -1
- package/templates/project-tee-starter/package.json +3 -3
- package/templates/project-tee-starter/src/character.ts +3 -0
- package/dist/chunk-5DYKNYEY.js +0 -2262
- package/dist/chunk-XB5JBFO6.js +0 -41
- package/dist/chunk-ZWDXDKSA.js +0 -281
- package/dist/setup-UQOWDHFN.js +0 -20
|
@@ -3,23 +3,23 @@ import { createRequire } from 'module';
|
|
|
3
3
|
const require = createRequire(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
bunExec,
|
|
7
|
-
bunExecInherit,
|
|
8
|
-
bunExecSimple,
|
|
9
|
-
commandExists,
|
|
10
6
|
displayBunInstallationTipCompact,
|
|
11
7
|
emoji,
|
|
12
|
-
require_execa,
|
|
13
8
|
runBunCommand
|
|
14
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6ZB77OJK.js";
|
|
15
10
|
import {
|
|
16
11
|
getAgentRuntimeUrl,
|
|
17
12
|
getAgentsBaseUrl
|
|
18
13
|
} from "./chunk-F24MS2YR.js";
|
|
19
14
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
bunExec,
|
|
16
|
+
bunExecInherit,
|
|
17
|
+
bunExecSimple,
|
|
18
|
+
commandExists
|
|
19
|
+
} from "./chunk-EVE5GO74.js";
|
|
20
|
+
import {
|
|
21
|
+
__require
|
|
22
|
+
} from "./chunk-AQ6OMR2A.js";
|
|
23
23
|
|
|
24
24
|
// src/utils/build-project.ts
|
|
25
25
|
import * as fs3 from "fs";
|
|
@@ -232,53 +232,58 @@ var UserEnvironment = class _UserEnvironment {
|
|
|
232
232
|
const isNpx = process.env.npm_execpath?.includes("npx");
|
|
233
233
|
const isBunx = process.argv[0]?.includes("bun");
|
|
234
234
|
let version = null;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
version
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
logger2.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
235
|
+
if (typeof Bun !== "undefined" && Bun.version) {
|
|
236
|
+
version = Bun.version;
|
|
237
|
+
logger2.debug(`[UserEnvironment] Running under Bun runtime, version: ${version}`);
|
|
238
|
+
} else {
|
|
239
|
+
try {
|
|
240
|
+
const { stdout } = await bunExecSimple("bun", ["--version"]);
|
|
241
|
+
version = stdout.trim();
|
|
242
|
+
logger2.debug(`[UserEnvironment] Bun version: ${version}`);
|
|
243
|
+
} catch (e) {
|
|
244
|
+
logger2.debug(
|
|
245
|
+
`[UserEnvironment] Could not get bun version: ${e instanceof Error ? e.message : String(e)}`
|
|
246
|
+
);
|
|
247
|
+
if (shouldAutoInstall()) {
|
|
248
|
+
logger2.info(`${emoji.info("Attempting to automatically install Bun...")}`);
|
|
249
|
+
const installSuccess = await autoInstallBun();
|
|
250
|
+
if (installSuccess) {
|
|
251
|
+
try {
|
|
252
|
+
const { stdout } = await bunExecSimple("bun", ["--version"]);
|
|
253
|
+
version = stdout.trim();
|
|
254
|
+
logger2.debug(`[UserEnvironment] Bun version after auto-install: ${version}`);
|
|
255
|
+
} catch (retryError) {
|
|
256
|
+
logger2.error(
|
|
257
|
+
`Failed to verify Bun installation after auto-install: ${retryError instanceof Error ? retryError.message : String(retryError)}`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
255
260
|
}
|
|
256
261
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
262
|
+
if (!version) {
|
|
263
|
+
const platform = process.platform;
|
|
264
|
+
logger2.error(
|
|
265
|
+
`${emoji.error("Bun is required for ElizaOS CLI but is not installed or not found in PATH.")}`
|
|
266
|
+
);
|
|
267
|
+
logger2.error("");
|
|
268
|
+
logger2.error(
|
|
269
|
+
`${emoji.rocket("Install Bun using the appropriate command for your system:")}`
|
|
270
|
+
);
|
|
271
|
+
logger2.error("");
|
|
272
|
+
if (platform === "win32") {
|
|
273
|
+
logger2.error(' Windows: powershell -c "irm bun.sh/install.ps1 | iex"');
|
|
274
|
+
} else {
|
|
275
|
+
logger2.error(" Linux/macOS: curl -fsSL https://bun.sh/install | bash");
|
|
276
|
+
if (platform === "darwin") {
|
|
277
|
+
logger2.error(" macOS (Homebrew): brew install bun");
|
|
278
|
+
}
|
|
274
279
|
}
|
|
280
|
+
logger2.error("");
|
|
281
|
+
logger2.error(" More options: https://bun.sh/docs/installation");
|
|
282
|
+
logger2.error(" After installation, restart your terminal or source your shell profile");
|
|
283
|
+
logger2.error("");
|
|
284
|
+
logger2.error("\u{1F534} Exiting: Bun installation is required to continue.");
|
|
285
|
+
process.exit(1);
|
|
275
286
|
}
|
|
276
|
-
logger2.error("");
|
|
277
|
-
logger2.error(" More options: https://bun.sh/docs/installation");
|
|
278
|
-
logger2.error(" After installation, restart your terminal or source your shell profile");
|
|
279
|
-
logger2.error("");
|
|
280
|
-
logger2.error("\u{1F534} Exiting: Bun installation is required to continue.");
|
|
281
|
-
process.exit(1);
|
|
282
287
|
}
|
|
283
288
|
}
|
|
284
289
|
const packageName = "@elizaos/cli";
|
|
@@ -811,11 +816,10 @@ async function buildProject(cwd = process.cwd(), isPlugin = false) {
|
|
|
811
816
|
}
|
|
812
817
|
|
|
813
818
|
// src/utils/cli-bun-migration.ts
|
|
814
|
-
var import_execa = __toESM(require_execa(), 1);
|
|
815
819
|
import { logger as logger4 } from "@elizaos/core";
|
|
816
820
|
async function isBunAvailable() {
|
|
817
821
|
try {
|
|
818
|
-
await (
|
|
822
|
+
await bunExec("bun", ["--version"], { stdio: "ignore" });
|
|
819
823
|
return true;
|
|
820
824
|
} catch (error) {
|
|
821
825
|
return false;
|
|
@@ -823,13 +827,11 @@ async function isBunAvailable() {
|
|
|
823
827
|
}
|
|
824
828
|
async function isCliInstalledViaNpm() {
|
|
825
829
|
try {
|
|
826
|
-
const { stdout } = await (
|
|
827
|
-
stdio: "pipe"
|
|
828
|
-
});
|
|
830
|
+
const { stdout } = await bunExecSimple("npm", ["list", "-g", "@elizaos/cli", "--depth=0"]);
|
|
829
831
|
return stdout.includes("@elizaos/cli");
|
|
830
832
|
} catch (error) {
|
|
831
833
|
try {
|
|
832
|
-
const { stdout: whichOutput } = await (
|
|
834
|
+
const { stdout: whichOutput } = await bunExecSimple("which", ["elizaos"]);
|
|
833
835
|
return whichOutput.includes("node_modules") || whichOutput.includes(".nvm");
|
|
834
836
|
} catch {
|
|
835
837
|
return false;
|
|
@@ -838,15 +840,15 @@ async function isCliInstalledViaNpm() {
|
|
|
838
840
|
}
|
|
839
841
|
async function removeNpmInstallation() {
|
|
840
842
|
logger4.info("Removing npm installation of @elizaos/cli...");
|
|
841
|
-
await (
|
|
843
|
+
await bunExecInherit("npm", ["uninstall", "-g", "@elizaos/cli"]);
|
|
842
844
|
}
|
|
843
845
|
async function installCliWithBun(version) {
|
|
844
846
|
logger4.info("Installing CLI with bun...");
|
|
845
|
-
await (
|
|
847
|
+
await bunExecInherit("bun", ["add", "-g", `@elizaos/cli@${version}`]);
|
|
846
848
|
}
|
|
847
849
|
async function verifyCliInstallation(expectedVersion) {
|
|
848
850
|
try {
|
|
849
|
-
const { stdout } = await (
|
|
851
|
+
const { stdout } = await bunExecSimple("elizaos", ["-v"]);
|
|
850
852
|
const output = stdout.trim();
|
|
851
853
|
const versionMatch = output.match(/(\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?)/);
|
|
852
854
|
if (!versionMatch) {
|
|
@@ -881,7 +883,7 @@ async function migrateCliToBun(targetVersion) {
|
|
|
881
883
|
logger4.error("Your original npm installation is still intact.");
|
|
882
884
|
try {
|
|
883
885
|
logger4.info("Cleaning up failed bun installation...");
|
|
884
|
-
await (
|
|
886
|
+
await bunExec("bun", ["remove", "-g", "@elizaos/cli"], { stdio: "ignore" });
|
|
885
887
|
} catch {
|
|
886
888
|
}
|
|
887
889
|
throw error;
|
|
@@ -1653,7 +1655,7 @@ var SAMPLE_ENV_TEMPLATE = `### elizaOS Environment Variables ###
|
|
|
1653
1655
|
# Please read the comments for each of the configurations
|
|
1654
1656
|
|
|
1655
1657
|
## The only thing you ABSOLUTELY NEED to get up and running is one of the model provider keys,
|
|
1656
|
-
## i.e. OPENAI_API_KEY or ANTHROPIC_API_KEY, or setup the
|
|
1658
|
+
## i.e. OPENAI_API_KEY or ANTHROPIC_API_KEY, or setup the ollama plugin
|
|
1657
1659
|
## Everything else is optional, and most settings and secrets can be configured in your agent or through the GUI
|
|
1658
1660
|
## For multi-agent, each agent will need keys for the various services it is connected to
|
|
1659
1661
|
-------------------------------
|
|
@@ -1665,7 +1667,7 @@ var SAMPLE_ENV_TEMPLATE = `### elizaOS Environment Variables ###
|
|
|
1665
1667
|
## and you can use them by overriding the base URL
|
|
1666
1668
|
|
|
1667
1669
|
## NOTE: You will need a provider that provides embeddings. So even if you use Claude, you will
|
|
1668
|
-
## need to get embeddings using another provider, for example openai or
|
|
1670
|
+
## need to get embeddings using another provider, for example openai or ollama
|
|
1669
1671
|
|
|
1670
1672
|
# OpenAI Configuration
|
|
1671
1673
|
OPENAI_API_KEY=
|
|
@@ -1700,16 +1702,6 @@ ANTHROPIC_API_KEY=
|
|
|
1700
1702
|
# OLLAMA_LARGE_MODEL=gemma3:latest
|
|
1701
1703
|
|
|
1702
1704
|
|
|
1703
|
-
# Local AI Configuration
|
|
1704
|
-
## REMEMBER A GOOD AMOUNT OF VRAM IS NEEDED FOR THE LARGE LOCAL MODELS
|
|
1705
|
-
--------------------------------
|
|
1706
|
-
# LOCAL_SMALL_MODEL=DeepHermes-3-Llama-3-3B-Preview-q4.gguf
|
|
1707
|
-
# LOCAL_LARGE_MODEL=DeepHermes-3-Llama-3-70B-Preview-q4.gguf
|
|
1708
|
-
# LOCAL_EMBEDDING_MODEL=bge-small-en-v1.5.Q4_K_M.gguf
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
1705
|
# Highly recommended to use nomic-embed-text for embeddings
|
|
1714
1706
|
# OLLAMA_EMBEDDING_MODEL=nomic-embed-text
|
|
1715
1707
|
|
|
@@ -2080,15 +2072,13 @@ async function storeOllamaConfig(config, envFilePath) {
|
|
|
2080
2072
|
content = await fs7.readFile(envFilePath, "utf8");
|
|
2081
2073
|
}
|
|
2082
2074
|
const lines = content.split("\n").filter(
|
|
2083
|
-
(line) => !line.startsWith("OLLAMA_API_ENDPOINT=") && !line.startsWith("OLLAMA_MODEL=")
|
|
2075
|
+
(line) => !line.startsWith("OLLAMA_API_ENDPOINT=") && !line.startsWith("OLLAMA_MODEL=")
|
|
2084
2076
|
);
|
|
2085
2077
|
lines.push(`OLLAMA_API_ENDPOINT=${config.endpoint}`);
|
|
2086
2078
|
lines.push(`OLLAMA_MODEL=${config.model}`);
|
|
2087
|
-
lines.push("USE_OLLAMA_TEXT_MODELS=true");
|
|
2088
2079
|
await fs7.writeFile(envFilePath, lines.join("\n"), "utf8");
|
|
2089
2080
|
process.env.OLLAMA_API_ENDPOINT = config.endpoint;
|
|
2090
2081
|
process.env.OLLAMA_MODEL = config.model;
|
|
2091
|
-
process.env.USE_OLLAMA_TEXT_MODELS = "true";
|
|
2092
2082
|
logger9.success("Ollama configuration saved to configuration");
|
|
2093
2083
|
} catch (error) {
|
|
2094
2084
|
logger9.error("Error saving Ollama configuration:", error);
|
|
@@ -2133,9 +2123,7 @@ async function promptAndStoreOllamaEmbeddingConfig(envFilePath) {
|
|
|
2133
2123
|
if (existsSync8(envPath)) {
|
|
2134
2124
|
content = await fs7.readFile(envPath, "utf8");
|
|
2135
2125
|
}
|
|
2136
|
-
const lines = content.split("\n").filter(
|
|
2137
|
-
(line) => !line.startsWith("OLLAMA_EMBEDDING_MODEL=") && !line.startsWith("USE_OLLAMA_EMBEDDINGS=")
|
|
2138
|
-
);
|
|
2126
|
+
const lines = content.split("\n").filter((line) => !line.startsWith("OLLAMA_EMBEDDING_MODEL="));
|
|
2139
2127
|
const endpointPattern = /^OLLAMA_API_ENDPOINT=(.*)$/m;
|
|
2140
2128
|
const existingEndpointMatch = content.match(endpointPattern);
|
|
2141
2129
|
if (existingEndpointMatch) {
|
|
@@ -2153,11 +2141,9 @@ async function promptAndStoreOllamaEmbeddingConfig(envFilePath) {
|
|
|
2153
2141
|
lines.push(`OLLAMA_API_ENDPOINT=${results.endpoint}`);
|
|
2154
2142
|
}
|
|
2155
2143
|
lines.push(`OLLAMA_EMBEDDING_MODEL=${results.embeddingModel}`);
|
|
2156
|
-
lines.push("USE_OLLAMA_EMBEDDINGS=true");
|
|
2157
2144
|
await fs7.writeFile(envPath, lines.join("\n"), "utf8");
|
|
2158
2145
|
process.env.OLLAMA_API_ENDPOINT = results.endpoint;
|
|
2159
2146
|
process.env.OLLAMA_EMBEDDING_MODEL = results.embeddingModel;
|
|
2160
|
-
process.env.USE_OLLAMA_EMBEDDINGS = "true";
|
|
2161
2147
|
logger9.success("Ollama embedding configuration saved");
|
|
2162
2148
|
} catch (error) {
|
|
2163
2149
|
logger9.error("Error saving Ollama embedding configuration:", error);
|
|
@@ -2765,7 +2751,7 @@ async function getGitHubCredentials() {
|
|
|
2765
2751
|
}
|
|
2766
2752
|
logger10.warn("Invalid GitHub token found in environment variables");
|
|
2767
2753
|
}
|
|
2768
|
-
const { getGitHubToken: getGitHubToken2 } = await import("./registry-
|
|
2754
|
+
const { getGitHubToken: getGitHubToken2 } = await import("./registry-U2ZGKGSS.js");
|
|
2769
2755
|
const token = await getGitHubToken2() || void 0;
|
|
2770
2756
|
if (token) {
|
|
2771
2757
|
const isValid2 = await validateGitHubToken(token);
|
|
@@ -3446,9 +3432,7 @@ async function stopAgent(opts) {
|
|
|
3446
3432
|
process.exit(1);
|
|
3447
3433
|
}
|
|
3448
3434
|
try {
|
|
3449
|
-
const {
|
|
3450
|
-
const { promisify } = await import("util");
|
|
3451
|
-
const execAsync = promisify(exec);
|
|
3435
|
+
const { bunExec: bunExec2 } = await import("./bun-exec-4BOHUSSZ.js");
|
|
3452
3436
|
const patterns = [
|
|
3453
3437
|
"(node|bun).*elizaos",
|
|
3454
3438
|
"(node|bun).*eliza.*start",
|
|
@@ -3456,10 +3440,10 @@ async function stopAgent(opts) {
|
|
|
3456
3440
|
];
|
|
3457
3441
|
for (const pattern of patterns) {
|
|
3458
3442
|
try {
|
|
3459
|
-
const
|
|
3460
|
-
const pids = stdout.trim().split("\n").filter((pid) => pid && pid !== process.pid.toString());
|
|
3443
|
+
const result = await bunExec2("sh", ["-c", `pgrep -f "${pattern}"`]);
|
|
3444
|
+
const pids = result.stdout.trim().split("\n").filter((pid) => pid && pid !== process.pid.toString());
|
|
3461
3445
|
if (pids.length > 0) {
|
|
3462
|
-
await
|
|
3446
|
+
await bunExec2("sh", ["-c", `echo "${pids.join(" ")}" | xargs -r kill`]);
|
|
3463
3447
|
}
|
|
3464
3448
|
} catch (pgrepError) {
|
|
3465
3449
|
}
|
|
@@ -4205,16 +4189,15 @@ async function findNextAvailablePort(startPort) {
|
|
|
4205
4189
|
}
|
|
4206
4190
|
|
|
4207
4191
|
// src/utils/publisher.ts
|
|
4208
|
-
var import_execa2 = __toESM(require_execa(), 1);
|
|
4209
4192
|
import { logger as logger19 } from "@elizaos/core";
|
|
4210
4193
|
async function testPublishToNpm(cwd) {
|
|
4211
4194
|
try {
|
|
4212
|
-
await (
|
|
4195
|
+
await bunExec("npm", ["whoami"]);
|
|
4213
4196
|
logger19.info("[\u2713] Logged in to npm");
|
|
4214
4197
|
logger19.info("Testing build...");
|
|
4215
|
-
await (
|
|
4198
|
+
await bunExec("npm", ["run", "build", "--dry-run"], { cwd });
|
|
4216
4199
|
logger19.info("[\u2713] Build test successful");
|
|
4217
|
-
await (
|
|
4200
|
+
await bunExec("npm", ["access", "ls-packages"], { cwd });
|
|
4218
4201
|
logger19.info("[\u2713] Have publish permissions");
|
|
4219
4202
|
return true;
|
|
4220
4203
|
} catch (error) {
|
|
@@ -4309,11 +4292,11 @@ async function testPublishToGitHub(packageJson, username) {
|
|
|
4309
4292
|
}
|
|
4310
4293
|
async function publishToNpm(cwd) {
|
|
4311
4294
|
try {
|
|
4312
|
-
await (
|
|
4295
|
+
await bunExec("npm", ["whoami"]);
|
|
4313
4296
|
logger19.info("Building package...");
|
|
4314
|
-
await (
|
|
4297
|
+
await bunExecInherit("npm", ["run", "build"], { cwd });
|
|
4315
4298
|
logger19.info("Publishing to npm...");
|
|
4316
|
-
await (
|
|
4299
|
+
await bunExecInherit("npm", ["publish"], { cwd });
|
|
4317
4300
|
return true;
|
|
4318
4301
|
} catch (error) {
|
|
4319
4302
|
logger19.error("Failed to publish to npm:", error);
|
|
@@ -4947,7 +4930,6 @@ var DEFAULT_REGISTRY = {
|
|
|
4947
4930
|
"@elizaos/plugin-evm": "github:elizaos-plugins/plugin-evm",
|
|
4948
4931
|
"@elizaos/plugin-farcaster": "github:elizaos-plugins/plugin-farcaster",
|
|
4949
4932
|
"@elizaos/plugin-groq": "github:elizaos-plugins/plugin-groq",
|
|
4950
|
-
"@elizaos/plugin-local-ai": "github:elizaos-plugins/plugin-local-ai",
|
|
4951
4933
|
"@elizaos/plugin-mcp": "github:elizaos-plugins/plugin-mcp",
|
|
4952
4934
|
"@elizaos/plugin-messari-ai-toolkit": "github:messari/plugin-messari-ai-toolkit",
|
|
4953
4935
|
"@elizaos/plugin-morpheus": "github:bowtiedbluefin/plugin-morpheus",
|
|
@@ -9,10 +9,11 @@ import {
|
|
|
9
9
|
setAgentConfig,
|
|
10
10
|
startAgent,
|
|
11
11
|
stopAgent
|
|
12
|
-
} from "../../../chunk-
|
|
13
|
-
import "../../../chunk-
|
|
12
|
+
} from "../../../chunk-X5K7QYAH.js";
|
|
13
|
+
import "../../../chunk-6ZB77OJK.js";
|
|
14
14
|
import "../../../chunk-F24MS2YR.js";
|
|
15
|
-
import "../../../chunk-
|
|
15
|
+
import "../../../chunk-EVE5GO74.js";
|
|
16
|
+
import "../../../chunk-AQ6OMR2A.js";
|
|
16
17
|
export {
|
|
17
18
|
clearAgentMemories,
|
|
18
19
|
getAgent,
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
agent,
|
|
7
7
|
getAgents,
|
|
8
8
|
resolveAgentId
|
|
9
|
-
} from "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
} from "../../chunk-X5K7QYAH.js";
|
|
10
|
+
import "../../chunk-6ZB77OJK.js";
|
|
11
11
|
import {
|
|
12
12
|
getAgentRuntimeUrl,
|
|
13
13
|
getAgentsBaseUrl
|
|
14
14
|
} from "../../chunk-F24MS2YR.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-EVE5GO74.js";
|
|
16
|
+
import "../../chunk-AQ6OMR2A.js";
|
|
16
17
|
export {
|
|
17
18
|
agent,
|
|
18
19
|
getAgentRuntimeUrl,
|
|
@@ -23,6 +23,10 @@ declare function createProjectDirectories(targetDir: string): Promise<void>;
|
|
|
23
23
|
* Sets up AI model configuration in the project's .env file based on user selection.
|
|
24
24
|
*/
|
|
25
25
|
declare function setupAIModelConfig(aiModel: string, envFilePath: string, isNonInteractive?: boolean): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Checks if an environment variable has a real value (not a placeholder) in the content
|
|
28
|
+
*/
|
|
29
|
+
declare function hasValidApiKey(content: string, keyName: string): boolean;
|
|
26
30
|
/**
|
|
27
31
|
* Sets up embedding model configuration when the primary AI model doesn't support embeddings.
|
|
28
32
|
*/
|
|
@@ -32,4 +36,4 @@ declare function setupEmbeddingModelConfig(embeddingModel: string, envFilePath:
|
|
|
32
36
|
*/
|
|
33
37
|
declare function setupProjectEnvironment(targetDir: string, database: string, aiModel: string, embeddingModel?: string, isNonInteractive?: boolean): Promise<void>;
|
|
34
38
|
|
|
35
|
-
export { createAgent, createPlugin, createProject, createProjectDirectories, createTEEProject, setupAIModelConfig, setupEmbeddingModelConfig, setupProjectEnvironment };
|
|
39
|
+
export { createAgent, createPlugin, createProject, createProjectDirectories, createTEEProject, hasValidApiKey, setupAIModelConfig, setupEmbeddingModelConfig, setupProjectEnvironment };
|
|
@@ -6,24 +6,25 @@ import {
|
|
|
6
6
|
createAgent,
|
|
7
7
|
createPlugin,
|
|
8
8
|
createProject,
|
|
9
|
-
createTEEProject
|
|
10
|
-
} from "../../../chunk-2XI6N7KN.js";
|
|
11
|
-
import {
|
|
12
9
|
createProjectDirectories,
|
|
10
|
+
createTEEProject,
|
|
11
|
+
hasValidApiKey,
|
|
13
12
|
setupAIModelConfig,
|
|
14
13
|
setupEmbeddingModelConfig,
|
|
15
14
|
setupProjectEnvironment
|
|
16
|
-
} from "../../../chunk-
|
|
17
|
-
import "../../../chunk-
|
|
18
|
-
import "../../../chunk-
|
|
15
|
+
} from "../../../chunk-JR4V32X7.js";
|
|
16
|
+
import "../../../chunk-X5K7QYAH.js";
|
|
17
|
+
import "../../../chunk-6ZB77OJK.js";
|
|
19
18
|
import "../../../chunk-F24MS2YR.js";
|
|
20
|
-
import "../../../chunk-
|
|
19
|
+
import "../../../chunk-EVE5GO74.js";
|
|
20
|
+
import "../../../chunk-AQ6OMR2A.js";
|
|
21
21
|
export {
|
|
22
22
|
createAgent,
|
|
23
23
|
createPlugin,
|
|
24
24
|
createProject,
|
|
25
25
|
createProjectDirectories,
|
|
26
26
|
createTEEProject,
|
|
27
|
+
hasValidApiKey,
|
|
27
28
|
setupAIModelConfig,
|
|
28
29
|
setupEmbeddingModelConfig,
|
|
29
30
|
setupProjectEnvironment
|
|
@@ -4,13 +4,13 @@ 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-
|
|
11
|
-
import "../../chunk-5DYKNYEY.js";
|
|
7
|
+
} from "../../chunk-ECH6TQ7M.js";
|
|
8
|
+
import "../../chunk-JR4V32X7.js";
|
|
9
|
+
import "../../chunk-X5K7QYAH.js";
|
|
10
|
+
import "../../chunk-6ZB77OJK.js";
|
|
12
11
|
import "../../chunk-F24MS2YR.js";
|
|
13
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-EVE5GO74.js";
|
|
13
|
+
import "../../chunk-AQ6OMR2A.js";
|
|
14
14
|
export {
|
|
15
15
|
create
|
|
16
16
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env bun
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
3
|
import { createRequire } from 'module';
|
|
4
4
|
const require = createRequire(import.meta.url);
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
create
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ECH6TQ7M.js";
|
|
9
9
|
import {
|
|
10
10
|
getElizaCharacter
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-ZWDXDKSA.js";
|
|
11
|
+
} from "./chunk-JR4V32X7.js";
|
|
13
12
|
import {
|
|
14
13
|
TestRunner,
|
|
15
14
|
UserEnvironment,
|
|
@@ -46,20 +45,19 @@ import {
|
|
|
46
45
|
testPublishToGitHub,
|
|
47
46
|
testPublishToNpm,
|
|
48
47
|
validateDataDir
|
|
49
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-X5K7QYAH.js";
|
|
50
49
|
import {
|
|
51
|
-
bunExec,
|
|
52
|
-
bunExecInherit,
|
|
53
|
-
bunExecSimple,
|
|
54
50
|
configureEmojis,
|
|
55
51
|
emoji,
|
|
56
|
-
require_execa,
|
|
57
52
|
runBunCommand
|
|
58
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6ZB77OJK.js";
|
|
59
54
|
import "./chunk-F24MS2YR.js";
|
|
60
55
|
import {
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
bunExec,
|
|
57
|
+
bunExecInherit,
|
|
58
|
+
bunExecSimple
|
|
59
|
+
} from "./chunk-EVE5GO74.js";
|
|
60
|
+
import "./chunk-AQ6OMR2A.js";
|
|
63
61
|
|
|
64
62
|
// src/utils/port-validation.ts
|
|
65
63
|
function validatePort(value) {
|
|
@@ -2933,7 +2931,7 @@ import { readFileSync as readFileSync4 } from "fs";
|
|
|
2933
2931
|
import path12 from "path";
|
|
2934
2932
|
async function generatePlugin(opts) {
|
|
2935
2933
|
try {
|
|
2936
|
-
const { PluginCreator } = await import("./plugin-creator-
|
|
2934
|
+
const { PluginCreator } = await import("./plugin-creator-UBYADX3B.js");
|
|
2937
2935
|
if (opts.apiKey) {
|
|
2938
2936
|
process.env.ANTHROPIC_API_KEY = opts.apiKey;
|
|
2939
2937
|
}
|
|
@@ -3348,11 +3346,9 @@ import { logger as logger13 } from "@elizaos/core";
|
|
|
3348
3346
|
import { Command as Command4 } from "commander";
|
|
3349
3347
|
|
|
3350
3348
|
// src/commands/update/actions/cli-update.ts
|
|
3351
|
-
var import_execa2 = __toESM(require_execa(), 1);
|
|
3352
3349
|
import { logger as logger11 } from "@elizaos/core";
|
|
3353
3350
|
|
|
3354
3351
|
// src/commands/update/utils/version-utils.ts
|
|
3355
|
-
var import_execa = __toESM(require_execa(), 1);
|
|
3356
3352
|
import { logger as logger10 } from "@elizaos/core";
|
|
3357
3353
|
import * as semver from "semver";
|
|
3358
3354
|
var SPECIAL_VERSION_TAGS = ["latest", "next", "canary", "rc", "dev", "nightly", "alpha"];
|
|
@@ -3399,7 +3395,7 @@ function isMajorUpdate(currentVersion, targetVersion) {
|
|
|
3399
3395
|
}
|
|
3400
3396
|
async function fetchLatestVersion(packageName) {
|
|
3401
3397
|
try {
|
|
3402
|
-
const { stdout } = await (
|
|
3398
|
+
const { stdout } = await bunExecSimple("npm", ["view", packageName, "version"], {
|
|
3403
3399
|
env: { NODE_ENV: "production" }
|
|
3404
3400
|
});
|
|
3405
3401
|
const version = stdout.trim();
|
|
@@ -3449,9 +3445,7 @@ async function performCliUpdate(options = {}) {
|
|
|
3449
3445
|
migrationError instanceof Error ? migrationError.message : String(migrationError)
|
|
3450
3446
|
);
|
|
3451
3447
|
try {
|
|
3452
|
-
await (
|
|
3453
|
-
stdio: "inherit"
|
|
3454
|
-
});
|
|
3448
|
+
await bunExecInherit("npm", ["install", "-g", `@elizaos/cli@${latestVersion}`]);
|
|
3455
3449
|
console.log(`CLI updated successfully to version ${latestVersion} [\u2713]`);
|
|
3456
3450
|
return true;
|
|
3457
3451
|
} catch (npmError) {
|
|
@@ -3463,7 +3457,7 @@ async function performCliUpdate(options = {}) {
|
|
|
3463
3457
|
}
|
|
3464
3458
|
}
|
|
3465
3459
|
try {
|
|
3466
|
-
await (
|
|
3460
|
+
await bunExecInherit("bun", ["add", "-g", `@elizaos/cli@${latestVersion}`]);
|
|
3467
3461
|
console.log(`CLI updated successfully to version ${latestVersion} [\u2713]`);
|
|
3468
3462
|
return true;
|
|
3469
3463
|
} catch (bunError) {
|
|
@@ -3486,7 +3480,6 @@ import { promises as fs6 } from "fs";
|
|
|
3486
3480
|
import * as path16 from "path";
|
|
3487
3481
|
|
|
3488
3482
|
// src/commands/update/utils/package-utils.ts
|
|
3489
|
-
var import_execa3 = __toESM(require_execa(), 1);
|
|
3490
3483
|
import fs5 from "fs/promises";
|
|
3491
3484
|
import { logger as logger12 } from "@elizaos/core";
|
|
3492
3485
|
async function checkForUpdates(dependencies) {
|
|
@@ -3535,7 +3528,7 @@ async function installDependencies(cwd) {
|
|
|
3535
3528
|
console.log("\nInstalling updated packages...");
|
|
3536
3529
|
try {
|
|
3537
3530
|
const packageManager = await getPackageManager();
|
|
3538
|
-
await (
|
|
3531
|
+
await bunExecInherit(packageManager, ["install"], { cwd });
|
|
3539
3532
|
console.log("Dependencies installed successfully [\u2713]");
|
|
3540
3533
|
} catch (error) {
|
|
3541
3534
|
throw new Error(
|
|
@@ -4043,15 +4036,12 @@ var publish = new Command5().name("publish").description("Publish a plugin to np
|
|
|
4043
4036
|
import { Command as Command6 } from "commander";
|
|
4044
4037
|
|
|
4045
4038
|
// src/commands/monorepo/actions/clone.ts
|
|
4046
|
-
var import_execa4 = __toESM(require_execa(), 1);
|
|
4047
4039
|
import { existsSync as existsSync12, readdirSync as readdirSync3, mkdirSync } from "fs";
|
|
4048
4040
|
import path19 from "path";
|
|
4049
4041
|
async function cloneRepository(repo, branch, destination) {
|
|
4050
4042
|
try {
|
|
4051
4043
|
const repoUrl = `https://github.com/${repo}`;
|
|
4052
|
-
await (
|
|
4053
|
-
stdio: "inherit"
|
|
4054
|
-
});
|
|
4044
|
+
await bunExecInherit("git", ["clone", "-b", branch, repoUrl, destination]);
|
|
4055
4045
|
} catch (error) {
|
|
4056
4046
|
if (error instanceof Error && error.message.includes("exit code 128")) {
|
|
4057
4047
|
console.error(`
|
|
@@ -4813,7 +4803,7 @@ async function installPluginDependencies(projectInfo) {
|
|
|
4813
4803
|
};
|
|
4814
4804
|
await fs11.promises.writeFile(packageJsonPath, JSON.stringify(packageJsonContent, null, 2));
|
|
4815
4805
|
}
|
|
4816
|
-
const { installPlugin: installPlugin2 } = await import("./utils-
|
|
4806
|
+
const { installPlugin: installPlugin2 } = await import("./utils-7XPDALF7.js");
|
|
4817
4807
|
for (const dependency of project.pluginModule.dependencies) {
|
|
4818
4808
|
await installPlugin2(dependency, pluginsDir);
|
|
4819
4809
|
const dependencyPath = path24.join(pluginsDir, "node_modules", dependency);
|