@elizaos/cli 1.2.2 → 1.2.3
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-5RHJRZKW.js → chunk-2XI6N7KN.js} +6 -6
- package/dist/{chunk-GRPGGUED.js → chunk-5DYKNYEY.js} +104 -104
- package/dist/{chunk-J5E77VTL.js → chunk-JZG5QBNT.js} +2 -2
- package/dist/{chunk-YKFBLIQD.js → chunk-PSSTO76B.js} +42 -48
- package/dist/{chunk-PMV25BM7.js → chunk-ZWDXDKSA.js} +1 -1
- package/dist/commands/agent/actions/index.js +2 -2
- package/dist/commands/agent/index.js +2 -2
- package/dist/commands/create/actions/index.js +4 -4
- package/dist/commands/create/index.js +5 -5
- package/dist/index.js +32 -35
- package/dist/{plugin-creator-KFTUVFYX.js → plugin-creator-5CER524N.js} +1 -1
- package/dist/{registry-WOGFPQNY.js → registry-SN5V2VXR.js} +2 -2
- package/dist/{setup-KAJWYH6P.js → setup-UQOWDHFN.js} +3 -3
- package/dist/templates/plugin-starter/package.json +1 -1
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-tee-starter/package.json +3 -3
- package/dist/{utils-Q5OUIPQH.js → utils-DTW3XU6O.js} +2 -2
- package/package.json +5 -5
- package/templates/plugin-starter/package.json +1 -1
- package/templates/project-starter/package.json +4 -4
- package/templates/project-tee-starter/package.json +3 -3
|
@@ -4,7 +4,7 @@ const require = createRequire(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
setupProjectEnvironment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZWDXDKSA.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-PSSTO76B.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-UQOWDHFN.js");
|
|
609
|
+
const { promptAndStorePostgresUrl } = await import("./utils-DTW3XU6O.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-UQOWDHFN.js");
|
|
670
|
+
const { promptAndStorePostgresUrl } = await import("./utils-DTW3XU6O.js");
|
|
671
671
|
const envFilePath = `${projectTargetDir}/.env`;
|
|
672
672
|
if (database === "postgres") {
|
|
673
673
|
await promptAndStorePostgresUrl(envFilePath);
|
|
@@ -1940,105 +1940,8 @@ var require_execa = __commonJS({
|
|
|
1940
1940
|
}
|
|
1941
1941
|
});
|
|
1942
1942
|
|
|
1943
|
-
// src/utils/emoji-handler.ts
|
|
1944
|
-
import { logger } from "@elizaos/core";
|
|
1945
|
-
var config = {
|
|
1946
|
-
enabled: true,
|
|
1947
|
-
forceDisable: false
|
|
1948
|
-
};
|
|
1949
|
-
var EMOJIS = {
|
|
1950
|
-
// Status indicators
|
|
1951
|
-
success: { emoji: "\u2705", fallback: "[OK]" },
|
|
1952
|
-
error: { emoji: "\u274C", fallback: "[ERROR]" },
|
|
1953
|
-
warning: { emoji: "\u26A0\uFE0F", fallback: "[WARNING]" },
|
|
1954
|
-
info: { emoji: "\u2139\uFE0F", fallback: "[INFO]" },
|
|
1955
|
-
// Actions
|
|
1956
|
-
rocket: { emoji: "\u{1F680}", fallback: ">>" },
|
|
1957
|
-
sparkles: { emoji: "\u2728", fallback: "*" },
|
|
1958
|
-
party: { emoji: "\u{1F389}", fallback: "[DONE]" },
|
|
1959
|
-
// Objects/Tools
|
|
1960
|
-
package: { emoji: "\u{1F4E6}", fallback: "[PKG]" },
|
|
1961
|
-
link: { emoji: "\u{1F517}", fallback: "[LINK]" },
|
|
1962
|
-
lightbulb: { emoji: "\u{1F4A1}", fallback: "[TIP]" },
|
|
1963
|
-
clipboard: { emoji: "\u{1F4CB}", fallback: "[LIST]" },
|
|
1964
|
-
// Platforms
|
|
1965
|
-
penguin: { emoji: "\u{1F427}", fallback: "[LINUX]" },
|
|
1966
|
-
globe: { emoji: "\u{1F310}", fallback: "[WEB]" },
|
|
1967
|
-
// Arrows and pointers
|
|
1968
|
-
rightArrow: { emoji: "\u2192", fallback: "->" },
|
|
1969
|
-
bullet: { emoji: "\u2022", fallback: "*" }
|
|
1970
|
-
};
|
|
1971
|
-
function detectEmojiSupport() {
|
|
1972
|
-
if (config.forceDisable) {
|
|
1973
|
-
return false;
|
|
1974
|
-
}
|
|
1975
|
-
const term = process.env.TERM || "";
|
|
1976
|
-
const termProgram = process.env.TERM_PROGRAM || "";
|
|
1977
|
-
const colorTerm = process.env.COLORTERM;
|
|
1978
|
-
const ciEnv = process.env.CI;
|
|
1979
|
-
if (ciEnv === "true" || process.env.GITHUB_ACTIONS) {
|
|
1980
|
-
return false;
|
|
1981
|
-
}
|
|
1982
|
-
if (process.platform === "win32") {
|
|
1983
|
-
if (termProgram === "vscode" || process.env.WT_SESSION || process.env.WT_PROFILE_ID || termProgram === "Windows Terminal") {
|
|
1984
|
-
return true;
|
|
1985
|
-
}
|
|
1986
|
-
if (process.env.PSModulePath && process.env.POWERSHELL_TELEMETRY_OPTOUT !== void 0) {
|
|
1987
|
-
return true;
|
|
1988
|
-
}
|
|
1989
|
-
return false;
|
|
1990
|
-
}
|
|
1991
|
-
if (process.platform === "darwin" || process.platform === "linux") {
|
|
1992
|
-
if (termProgram === "vscode" || termProgram === "iTerm.app" || termProgram === "Apple_Terminal" || term.includes("xterm") || term.includes("screen") || colorTerm) {
|
|
1993
|
-
return true;
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
if (term.includes("256color") || term.includes("truecolor")) {
|
|
1997
|
-
return true;
|
|
1998
|
-
}
|
|
1999
|
-
return false;
|
|
2000
|
-
}
|
|
2001
|
-
function getEmoji(key) {
|
|
2002
|
-
const emojiDef = EMOJIS[key];
|
|
2003
|
-
if (!emojiDef) {
|
|
2004
|
-
logger.warn(`Unknown emoji key: ${key}`);
|
|
2005
|
-
return "";
|
|
2006
|
-
}
|
|
2007
|
-
return config.enabled && detectEmojiSupport() ? emojiDef.emoji : emojiDef.fallback;
|
|
2008
|
-
}
|
|
2009
|
-
function configureEmojis(newConfig) {
|
|
2010
|
-
config = { ...config, ...newConfig };
|
|
2011
|
-
}
|
|
2012
|
-
function withEmoji(key, message, spacing = true) {
|
|
2013
|
-
const emoji2 = getEmoji(key);
|
|
2014
|
-
const space = spacing && emoji2 ? " " : "";
|
|
2015
|
-
return `${emoji2}${space}${message}`;
|
|
2016
|
-
}
|
|
2017
|
-
var emoji = {
|
|
2018
|
-
success: (msg) => withEmoji("success", msg),
|
|
2019
|
-
error: (msg) => withEmoji("error", msg),
|
|
2020
|
-
warning: (msg) => withEmoji("warning", msg),
|
|
2021
|
-
info: (msg) => withEmoji("info", msg),
|
|
2022
|
-
rocket: (msg) => withEmoji("rocket", msg),
|
|
2023
|
-
package: (msg) => withEmoji("package", msg),
|
|
2024
|
-
link: (msg) => withEmoji("link", msg),
|
|
2025
|
-
tip: (msg) => withEmoji("lightbulb", msg),
|
|
2026
|
-
list: (msg) => withEmoji("clipboard", msg),
|
|
2027
|
-
penguin: (msg) => withEmoji("penguin", msg),
|
|
2028
|
-
bullet: (msg) => withEmoji("bullet", msg)
|
|
2029
|
-
};
|
|
2030
|
-
function initializeEmojiSupport() {
|
|
2031
|
-
const supported = detectEmojiSupport();
|
|
2032
|
-
if (process.env.DEBUG || process.env.ELIZA_DEBUG) {
|
|
2033
|
-
logger.debug(
|
|
2034
|
-
`Emoji support: ${supported ? "enabled" : "disabled"} (platform: ${process.platform}, term: ${process.env.TERM || "unknown"})`
|
|
2035
|
-
);
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
initializeEmojiSupport();
|
|
2039
|
-
|
|
2040
1943
|
// src/utils/bun-exec.ts
|
|
2041
|
-
import { logger
|
|
1944
|
+
import { logger } from "@elizaos/core";
|
|
2042
1945
|
var COMMAND_EXISTS_TIMEOUT_MS = 5e3;
|
|
2043
1946
|
var ProcessExecutionError = class extends Error {
|
|
2044
1947
|
constructor(message, exitCode, stderr, command) {
|
|
@@ -2072,7 +1975,7 @@ async function readStreamSafe(stream, streamName) {
|
|
|
2072
1975
|
const text = await new Response(stream).text();
|
|
2073
1976
|
return text;
|
|
2074
1977
|
} catch (error) {
|
|
2075
|
-
|
|
1978
|
+
logger.debug(`[bunExec] Error reading ${streamName}:`, error);
|
|
2076
1979
|
return "";
|
|
2077
1980
|
}
|
|
2078
1981
|
}
|
|
@@ -2082,7 +1985,7 @@ async function bunExec(command, args = [], options = {}) {
|
|
|
2082
1985
|
try {
|
|
2083
1986
|
const escapedArgs = args.map(escapeShellArg);
|
|
2084
1987
|
const fullCommand = [command, ...escapedArgs].join(" ");
|
|
2085
|
-
|
|
1988
|
+
logger.debug(`[bunExec] Executing: ${fullCommand}`);
|
|
2086
1989
|
proc = Bun.spawn([command, ...args], {
|
|
2087
1990
|
cwd: options.cwd,
|
|
2088
1991
|
env: { ...process.env, ...options.env },
|
|
@@ -2128,9 +2031,9 @@ async function bunExec(command, args = [], options = {}) {
|
|
|
2128
2031
|
}
|
|
2129
2032
|
const success = exitCode === 0;
|
|
2130
2033
|
if (!success && options.stdio !== "ignore") {
|
|
2131
|
-
|
|
2034
|
+
logger.debug(`[bunExec] Command failed with exit code ${exitCode}`);
|
|
2132
2035
|
if (stderr) {
|
|
2133
|
-
|
|
2036
|
+
logger.debug(`[bunExec] stderr: ${stderr}`);
|
|
2134
2037
|
}
|
|
2135
2038
|
}
|
|
2136
2039
|
return {
|
|
@@ -2159,9 +2062,9 @@ async function bunExec(command, args = [], options = {}) {
|
|
|
2159
2062
|
if (proc && proc.exitCode === null) {
|
|
2160
2063
|
try {
|
|
2161
2064
|
proc.kill();
|
|
2162
|
-
|
|
2065
|
+
logger.debug("[bunExec] Killed still-running process in cleanup");
|
|
2163
2066
|
} catch (cleanupError) {
|
|
2164
|
-
|
|
2067
|
+
logger.debug(
|
|
2165
2068
|
"[bunExec] Process cleanup error (process may have already exited):",
|
|
2166
2069
|
cleanupError
|
|
2167
2070
|
);
|
|
@@ -2207,6 +2110,103 @@ async function commandExists(command) {
|
|
|
2207
2110
|
}
|
|
2208
2111
|
}
|
|
2209
2112
|
|
|
2113
|
+
// src/utils/emoji-handler.ts
|
|
2114
|
+
import { logger as logger2 } from "@elizaos/core";
|
|
2115
|
+
var config = {
|
|
2116
|
+
enabled: true,
|
|
2117
|
+
forceDisable: false
|
|
2118
|
+
};
|
|
2119
|
+
var EMOJIS = {
|
|
2120
|
+
// Status indicators
|
|
2121
|
+
success: { emoji: "\u2705", fallback: "[OK]" },
|
|
2122
|
+
error: { emoji: "\u274C", fallback: "[ERROR]" },
|
|
2123
|
+
warning: { emoji: "\u26A0\uFE0F", fallback: "[WARNING]" },
|
|
2124
|
+
info: { emoji: "\u2139\uFE0F", fallback: "[INFO]" },
|
|
2125
|
+
// Actions
|
|
2126
|
+
rocket: { emoji: "\u{1F680}", fallback: ">>" },
|
|
2127
|
+
sparkles: { emoji: "\u2728", fallback: "*" },
|
|
2128
|
+
party: { emoji: "\u{1F389}", fallback: "[DONE]" },
|
|
2129
|
+
// Objects/Tools
|
|
2130
|
+
package: { emoji: "\u{1F4E6}", fallback: "[PKG]" },
|
|
2131
|
+
link: { emoji: "\u{1F517}", fallback: "[LINK]" },
|
|
2132
|
+
lightbulb: { emoji: "\u{1F4A1}", fallback: "[TIP]" },
|
|
2133
|
+
clipboard: { emoji: "\u{1F4CB}", fallback: "[LIST]" },
|
|
2134
|
+
// Platforms
|
|
2135
|
+
penguin: { emoji: "\u{1F427}", fallback: "[LINUX]" },
|
|
2136
|
+
globe: { emoji: "\u{1F310}", fallback: "[WEB]" },
|
|
2137
|
+
// Arrows and pointers
|
|
2138
|
+
rightArrow: { emoji: "\u2192", fallback: "->" },
|
|
2139
|
+
bullet: { emoji: "\u2022", fallback: "*" }
|
|
2140
|
+
};
|
|
2141
|
+
function detectEmojiSupport() {
|
|
2142
|
+
if (config.forceDisable) {
|
|
2143
|
+
return false;
|
|
2144
|
+
}
|
|
2145
|
+
const term = process.env.TERM || "";
|
|
2146
|
+
const termProgram = process.env.TERM_PROGRAM || "";
|
|
2147
|
+
const colorTerm = process.env.COLORTERM;
|
|
2148
|
+
const ciEnv = process.env.CI;
|
|
2149
|
+
if (ciEnv === "true" || process.env.GITHUB_ACTIONS) {
|
|
2150
|
+
return false;
|
|
2151
|
+
}
|
|
2152
|
+
if (process.platform === "win32") {
|
|
2153
|
+
if (termProgram === "vscode" || process.env.WT_SESSION || process.env.WT_PROFILE_ID || termProgram === "Windows Terminal") {
|
|
2154
|
+
return true;
|
|
2155
|
+
}
|
|
2156
|
+
if (process.env.PSModulePath && process.env.POWERSHELL_TELEMETRY_OPTOUT !== void 0) {
|
|
2157
|
+
return true;
|
|
2158
|
+
}
|
|
2159
|
+
return false;
|
|
2160
|
+
}
|
|
2161
|
+
if (process.platform === "darwin" || process.platform === "linux") {
|
|
2162
|
+
if (termProgram === "vscode" || termProgram === "iTerm.app" || termProgram === "Apple_Terminal" || term.includes("xterm") || term.includes("screen") || colorTerm) {
|
|
2163
|
+
return true;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
if (term.includes("256color") || term.includes("truecolor")) {
|
|
2167
|
+
return true;
|
|
2168
|
+
}
|
|
2169
|
+
return false;
|
|
2170
|
+
}
|
|
2171
|
+
function getEmoji(key) {
|
|
2172
|
+
const emojiDef = EMOJIS[key];
|
|
2173
|
+
if (!emojiDef) {
|
|
2174
|
+
logger2.warn(`Unknown emoji key: ${key}`);
|
|
2175
|
+
return "";
|
|
2176
|
+
}
|
|
2177
|
+
return config.enabled && detectEmojiSupport() ? emojiDef.emoji : emojiDef.fallback;
|
|
2178
|
+
}
|
|
2179
|
+
function configureEmojis(newConfig) {
|
|
2180
|
+
config = { ...config, ...newConfig };
|
|
2181
|
+
}
|
|
2182
|
+
function withEmoji(key, message, spacing = true) {
|
|
2183
|
+
const emoji2 = getEmoji(key);
|
|
2184
|
+
const space = spacing && emoji2 ? " " : "";
|
|
2185
|
+
return `${emoji2}${space}${message}`;
|
|
2186
|
+
}
|
|
2187
|
+
var emoji = {
|
|
2188
|
+
success: (msg) => withEmoji("success", msg),
|
|
2189
|
+
error: (msg) => withEmoji("error", msg),
|
|
2190
|
+
warning: (msg) => withEmoji("warning", msg),
|
|
2191
|
+
info: (msg) => withEmoji("info", msg),
|
|
2192
|
+
rocket: (msg) => withEmoji("rocket", msg),
|
|
2193
|
+
package: (msg) => withEmoji("package", msg),
|
|
2194
|
+
link: (msg) => withEmoji("link", msg),
|
|
2195
|
+
tip: (msg) => withEmoji("lightbulb", msg),
|
|
2196
|
+
list: (msg) => withEmoji("clipboard", msg),
|
|
2197
|
+
penguin: (msg) => withEmoji("penguin", msg),
|
|
2198
|
+
bullet: (msg) => withEmoji("bullet", msg)
|
|
2199
|
+
};
|
|
2200
|
+
function initializeEmojiSupport() {
|
|
2201
|
+
const supported = detectEmojiSupport();
|
|
2202
|
+
if (process.env.DEBUG || process.env.ELIZA_DEBUG) {
|
|
2203
|
+
logger2.debug(
|
|
2204
|
+
`Emoji support: ${supported ? "enabled" : "disabled"} (platform: ${process.platform}, term: ${process.env.TERM || "unknown"})`
|
|
2205
|
+
);
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
initializeEmojiSupport();
|
|
2209
|
+
|
|
2210
2210
|
// src/utils/bun-installation-helper.ts
|
|
2211
2211
|
import { logger as logger3 } from "@elizaos/core";
|
|
2212
2212
|
function displayBunInstallationTipCompact() {
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
selectEmbeddingModel,
|
|
13
13
|
validateCreateOptions,
|
|
14
14
|
validateProjectName
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2XI6N7KN.js";
|
|
16
16
|
import {
|
|
17
17
|
displayBanner,
|
|
18
18
|
handleError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PSSTO76B.js";
|
|
20
20
|
|
|
21
21
|
// src/commands/create/index.ts
|
|
22
22
|
import { Command } from "commander";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
emoji,
|
|
12
12
|
require_execa,
|
|
13
13
|
runBunCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5DYKNYEY.js";
|
|
15
15
|
import {
|
|
16
16
|
getAgentRuntimeUrl,
|
|
17
17
|
getAgentsBaseUrl
|
|
@@ -630,7 +630,6 @@ function isValidForUpdates(info) {
|
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
// src/utils/spinner-utils.ts
|
|
633
|
-
var import_execa = __toESM(require_execa(), 1);
|
|
634
633
|
import * as clack from "@clack/prompts";
|
|
635
634
|
import colors from "yoctocolors";
|
|
636
635
|
import { parseBooleanFromText, logger as logger3 } from "@elizaos/core";
|
|
@@ -641,12 +640,10 @@ async function runCommandWithSpinner(command, args, options) {
|
|
|
641
640
|
const spinner3 = clack.spinner();
|
|
642
641
|
try {
|
|
643
642
|
spinner3.start(options.spinnerText);
|
|
644
|
-
const result = await (
|
|
645
|
-
cwd: options.cwd || process.cwd()
|
|
646
|
-
stdio: "pipe",
|
|
647
|
-
reject: false
|
|
643
|
+
const result = await bunExec(command, args, {
|
|
644
|
+
cwd: options.cwd || process.cwd()
|
|
648
645
|
});
|
|
649
|
-
if (result.
|
|
646
|
+
if (result.success) {
|
|
650
647
|
spinner3.stop(options.successText);
|
|
651
648
|
return {
|
|
652
649
|
success: true,
|
|
@@ -727,12 +724,10 @@ async function installPluginWithSpinner(pluginName, targetDir, purpose = "") {
|
|
|
727
724
|
const spinner3 = clack.spinner();
|
|
728
725
|
spinner3.start(`Installing ${packageName}${purposeText}...`);
|
|
729
726
|
try {
|
|
730
|
-
const result = await (
|
|
731
|
-
cwd: targetDir
|
|
732
|
-
stdio: "pipe",
|
|
733
|
-
reject: false
|
|
727
|
+
const result = await bunExec("bun", ["add", packageName], {
|
|
728
|
+
cwd: targetDir
|
|
734
729
|
});
|
|
735
|
-
if (result.
|
|
730
|
+
if (result.success) {
|
|
736
731
|
spinner3.stop(colors.green(`\u2713 ${packageName} installed successfully`));
|
|
737
732
|
} else {
|
|
738
733
|
spinner3.stop(colors.yellow(`\u26A0 Failed to install ${packageName} (optional)`));
|
|
@@ -816,11 +811,11 @@ async function buildProject(cwd = process.cwd(), isPlugin = false) {
|
|
|
816
811
|
}
|
|
817
812
|
|
|
818
813
|
// src/utils/cli-bun-migration.ts
|
|
819
|
-
var
|
|
814
|
+
var import_execa = __toESM(require_execa(), 1);
|
|
820
815
|
import { logger as logger4 } from "@elizaos/core";
|
|
821
816
|
async function isBunAvailable() {
|
|
822
817
|
try {
|
|
823
|
-
await (0,
|
|
818
|
+
await (0, import_execa.execa)("bun", ["--version"], { stdio: "ignore" });
|
|
824
819
|
return true;
|
|
825
820
|
} catch (error) {
|
|
826
821
|
return false;
|
|
@@ -828,13 +823,13 @@ async function isBunAvailable() {
|
|
|
828
823
|
}
|
|
829
824
|
async function isCliInstalledViaNpm() {
|
|
830
825
|
try {
|
|
831
|
-
const { stdout } = await (0,
|
|
826
|
+
const { stdout } = await (0, import_execa.execa)("npm", ["list", "-g", "@elizaos/cli", "--depth=0"], {
|
|
832
827
|
stdio: "pipe"
|
|
833
828
|
});
|
|
834
829
|
return stdout.includes("@elizaos/cli");
|
|
835
830
|
} catch (error) {
|
|
836
831
|
try {
|
|
837
|
-
const { stdout: whichOutput } = await (0,
|
|
832
|
+
const { stdout: whichOutput } = await (0, import_execa.execa)("which", ["elizaos"], { stdio: "pipe" });
|
|
838
833
|
return whichOutput.includes("node_modules") || whichOutput.includes(".nvm");
|
|
839
834
|
} catch {
|
|
840
835
|
return false;
|
|
@@ -843,15 +838,15 @@ async function isCliInstalledViaNpm() {
|
|
|
843
838
|
}
|
|
844
839
|
async function removeNpmInstallation() {
|
|
845
840
|
logger4.info("Removing npm installation of @elizaos/cli...");
|
|
846
|
-
await (0,
|
|
841
|
+
await (0, import_execa.execa)("npm", ["uninstall", "-g", "@elizaos/cli"], { stdio: "inherit" });
|
|
847
842
|
}
|
|
848
843
|
async function installCliWithBun(version) {
|
|
849
844
|
logger4.info("Installing CLI with bun...");
|
|
850
|
-
await (0,
|
|
845
|
+
await (0, import_execa.execa)("bun", ["add", "-g", `@elizaos/cli@${version}`], { stdio: "inherit" });
|
|
851
846
|
}
|
|
852
847
|
async function verifyCliInstallation(expectedVersion) {
|
|
853
848
|
try {
|
|
854
|
-
const { stdout } = await (0,
|
|
849
|
+
const { stdout } = await (0, import_execa.execa)("elizaos", ["-v"], { stdio: "pipe" });
|
|
855
850
|
const output = stdout.trim();
|
|
856
851
|
const versionMatch = output.match(/(\d+\.\d+\.\d+(?:-[a-zA-Z0-9.-]+)?)/);
|
|
857
852
|
if (!versionMatch) {
|
|
@@ -886,7 +881,7 @@ async function migrateCliToBun(targetVersion) {
|
|
|
886
881
|
logger4.error("Your original npm installation is still intact.");
|
|
887
882
|
try {
|
|
888
883
|
logger4.info("Cleaning up failed bun installation...");
|
|
889
|
-
await (0,
|
|
884
|
+
await (0, import_execa.execa)("bun", ["remove", "-g", "@elizaos/cli"], { stdio: "ignore" });
|
|
890
885
|
} catch {
|
|
891
886
|
}
|
|
892
887
|
throw error;
|
|
@@ -2391,7 +2386,6 @@ async function getPackageInfo() {
|
|
|
2391
2386
|
}
|
|
2392
2387
|
|
|
2393
2388
|
// src/utils/github.ts
|
|
2394
|
-
var import_execa3 = __toESM(require_execa(), 1);
|
|
2395
2389
|
import { promises as fs8 } from "fs";
|
|
2396
2390
|
import path10 from "path";
|
|
2397
2391
|
import { logger as logger10 } from "@elizaos/core";
|
|
@@ -2771,7 +2765,7 @@ async function getGitHubCredentials() {
|
|
|
2771
2765
|
}
|
|
2772
2766
|
logger10.warn("Invalid GitHub token found in environment variables");
|
|
2773
2767
|
}
|
|
2774
|
-
const { getGitHubToken: getGitHubToken2 } = await import("./registry-
|
|
2768
|
+
const { getGitHubToken: getGitHubToken2 } = await import("./registry-SN5V2VXR.js");
|
|
2775
2769
|
const token = await getGitHubToken2() || void 0;
|
|
2776
2770
|
if (token) {
|
|
2777
2771
|
const isValid2 = await validateGitHubToken(token);
|
|
@@ -2990,7 +2984,9 @@ async function pushToGitHub(cwd, repoUrl, branch = "main") {
|
|
|
2990
2984
|
let hasCorrectRemote = false;
|
|
2991
2985
|
if (gitDirExists) {
|
|
2992
2986
|
try {
|
|
2993
|
-
const { stdout: remoteUrl } = await (
|
|
2987
|
+
const { stdout: remoteUrl } = await bunExecSimple("git", ["remote", "get-url", "origin"], {
|
|
2988
|
+
cwd
|
|
2989
|
+
});
|
|
2994
2990
|
const sanitizedRepoUrl = repoUrl.replace(/https:\/\/.*?@/, "https://");
|
|
2995
2991
|
const sanitizedRemoteUrl = remoteUrl.replace(/https:\/\/.*?@/, "https://");
|
|
2996
2992
|
hasCorrectRemote = sanitizedRemoteUrl.includes(
|
|
@@ -3003,39 +2999,39 @@ async function pushToGitHub(cwd, repoUrl, branch = "main") {
|
|
|
3003
2999
|
if (!gitDirExists || !hasCorrectRemote) {
|
|
3004
3000
|
if (gitDirExists) {
|
|
3005
3001
|
logger10.info("Existing git repository has incorrect remote, reinitializing...");
|
|
3006
|
-
await (
|
|
3002
|
+
await bunExec("rm", ["-rf", ".git"], { cwd });
|
|
3007
3003
|
}
|
|
3008
|
-
await (
|
|
3009
|
-
await (
|
|
3004
|
+
await bunExec("git", ["init"], { cwd });
|
|
3005
|
+
await bunExec("git", ["checkout", "-b", "main"], { cwd });
|
|
3010
3006
|
logger10.info("Git repository initialized with main branch");
|
|
3011
|
-
await (
|
|
3007
|
+
await bunExec("git", ["remote", "add", "origin", repoUrl], { cwd });
|
|
3012
3008
|
logger10.info(`Added remote: ${repoUrl.replace(/\/\/.*?@/, "//***@")}`);
|
|
3013
3009
|
} else {
|
|
3014
3010
|
try {
|
|
3015
|
-
await (
|
|
3016
|
-
await (
|
|
3011
|
+
await bunExec("git", ["rev-parse", "--verify", branch], { cwd });
|
|
3012
|
+
await bunExec("git", ["checkout", branch], { cwd });
|
|
3017
3013
|
} catch (error) {
|
|
3018
|
-
await (
|
|
3014
|
+
await bunExec("git", ["checkout", "-b", branch], { cwd });
|
|
3019
3015
|
logger10.info(`Created and switched to ${branch} branch`);
|
|
3020
3016
|
}
|
|
3021
3017
|
}
|
|
3022
|
-
await (
|
|
3018
|
+
await bunExec("git", ["add", "."], { cwd });
|
|
3023
3019
|
logger10.info("Added files to git");
|
|
3024
3020
|
try {
|
|
3025
|
-
await (
|
|
3021
|
+
await bunExec("git", ["config", "user.email"], { cwd });
|
|
3026
3022
|
} catch (error) {
|
|
3027
|
-
await (
|
|
3028
|
-
await (
|
|
3023
|
+
await bunExec("git", ["config", "user.email", "plugindev@elizaos.com"], { cwd });
|
|
3024
|
+
await bunExec("git", ["config", "user.name", "ElizaOS Plugin Dev"], { cwd });
|
|
3029
3025
|
logger10.info("Set git user info for commit");
|
|
3030
3026
|
}
|
|
3031
3027
|
try {
|
|
3032
|
-
await (
|
|
3028
|
+
await bunExec("git", ["commit", "-m", "Initial commit from ElizaOS CLI"], { cwd });
|
|
3033
3029
|
logger10.info("Committed changes");
|
|
3034
3030
|
} catch (error) {
|
|
3035
3031
|
logger10.info("No changes to commit");
|
|
3036
3032
|
}
|
|
3037
3033
|
try {
|
|
3038
|
-
await (
|
|
3034
|
+
await bunExec("git", ["push", "-u", "origin", branch], { cwd });
|
|
3039
3035
|
logger10.success(`Pushed to GitHub repository: ${repoUrl}`);
|
|
3040
3036
|
return true;
|
|
3041
3037
|
} catch (error) {
|
|
@@ -3044,9 +3040,8 @@ async function pushToGitHub(cwd, repoUrl, branch = "main") {
|
|
|
3044
3040
|
);
|
|
3045
3041
|
try {
|
|
3046
3042
|
logger10.info("Attempting force push...");
|
|
3047
|
-
await (
|
|
3048
|
-
cwd
|
|
3049
|
-
stdio: "pipe"
|
|
3043
|
+
await bunExec("git", ["push", "-u", "origin", "main", "--force-with-lease"], {
|
|
3044
|
+
cwd
|
|
3050
3045
|
});
|
|
3051
3046
|
return true;
|
|
3052
3047
|
} catch (forcePushError) {
|
|
@@ -4210,16 +4205,16 @@ async function findNextAvailablePort(startPort) {
|
|
|
4210
4205
|
}
|
|
4211
4206
|
|
|
4212
4207
|
// src/utils/publisher.ts
|
|
4213
|
-
var
|
|
4208
|
+
var import_execa2 = __toESM(require_execa(), 1);
|
|
4214
4209
|
import { logger as logger19 } from "@elizaos/core";
|
|
4215
4210
|
async function testPublishToNpm(cwd) {
|
|
4216
4211
|
try {
|
|
4217
|
-
await (0,
|
|
4212
|
+
await (0, import_execa2.execa)("npm", ["whoami"]);
|
|
4218
4213
|
logger19.info("[\u2713] Logged in to npm");
|
|
4219
4214
|
logger19.info("Testing build...");
|
|
4220
|
-
await (0,
|
|
4215
|
+
await (0, import_execa2.execa)("npm", ["run", "build", "--dry-run"], { cwd });
|
|
4221
4216
|
logger19.info("[\u2713] Build test successful");
|
|
4222
|
-
await (0,
|
|
4217
|
+
await (0, import_execa2.execa)("npm", ["access", "ls-packages"], { cwd });
|
|
4223
4218
|
logger19.info("[\u2713] Have publish permissions");
|
|
4224
4219
|
return true;
|
|
4225
4220
|
} catch (error) {
|
|
@@ -4314,11 +4309,11 @@ async function testPublishToGitHub(packageJson, username) {
|
|
|
4314
4309
|
}
|
|
4315
4310
|
async function publishToNpm(cwd) {
|
|
4316
4311
|
try {
|
|
4317
|
-
await (0,
|
|
4312
|
+
await (0, import_execa2.execa)("npm", ["whoami"]);
|
|
4318
4313
|
logger19.info("Building package...");
|
|
4319
|
-
await (0,
|
|
4314
|
+
await (0, import_execa2.execa)("npm", ["run", "build"], { cwd, stdio: "inherit" });
|
|
4320
4315
|
logger19.info("Publishing to npm...");
|
|
4321
|
-
await (0,
|
|
4316
|
+
await (0, import_execa2.execa)("npm", ["publish"], { cwd, stdio: "inherit" });
|
|
4322
4317
|
return true;
|
|
4323
4318
|
} catch (error) {
|
|
4324
4319
|
logger19.error("Failed to publish to npm:", error);
|
|
@@ -4824,7 +4819,6 @@ Test Summary: ${this.stats.passed} passed, ${this.stats.failed} failed, ${this.s
|
|
|
4824
4819
|
};
|
|
4825
4820
|
|
|
4826
4821
|
// src/utils/registry/index.ts
|
|
4827
|
-
var import_execa5 = __toESM(require_execa(), 1);
|
|
4828
4822
|
import { logger as logger21 } from "@elizaos/core";
|
|
4829
4823
|
import dotenv3 from "dotenv";
|
|
4830
4824
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
@@ -5119,7 +5113,7 @@ async function getPluginRepository(pluginName) {
|
|
|
5119
5113
|
}
|
|
5120
5114
|
async function repoHasBranch(repoUrl, branchName) {
|
|
5121
5115
|
try {
|
|
5122
|
-
const { stdout } = await (
|
|
5116
|
+
const { stdout } = await bunExecSimple("git", ["ls-remote", "--heads", repoUrl, branchName]);
|
|
5123
5117
|
return stdout.includes(branchName);
|
|
5124
5118
|
} catch (error) {
|
|
5125
5119
|
logger21.warn(
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
setAgentConfig,
|
|
10
10
|
startAgent,
|
|
11
11
|
stopAgent
|
|
12
|
-
} from "../../../chunk-
|
|
13
|
-
import "../../../chunk-
|
|
12
|
+
} from "../../../chunk-PSSTO76B.js";
|
|
13
|
+
import "../../../chunk-5DYKNYEY.js";
|
|
14
14
|
import "../../../chunk-F24MS2YR.js";
|
|
15
15
|
import "../../../chunk-XB5JBFO6.js";
|
|
16
16
|
export {
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
createPlugin,
|
|
8
8
|
createProject,
|
|
9
9
|
createTEEProject
|
|
10
|
-
} from "../../../chunk-
|
|
10
|
+
} from "../../../chunk-2XI6N7KN.js";
|
|
11
11
|
import {
|
|
12
12
|
createProjectDirectories,
|
|
13
13
|
setupAIModelConfig,
|
|
14
14
|
setupEmbeddingModelConfig,
|
|
15
15
|
setupProjectEnvironment
|
|
16
|
-
} from "../../../chunk-
|
|
17
|
-
import "../../../chunk-
|
|
18
|
-
import "../../../chunk-
|
|
16
|
+
} from "../../../chunk-ZWDXDKSA.js";
|
|
17
|
+
import "../../../chunk-PSSTO76B.js";
|
|
18
|
+
import "../../../chunk-5DYKNYEY.js";
|
|
19
19
|
import "../../../chunk-F24MS2YR.js";
|
|
20
20
|
import "../../../chunk-XB5JBFO6.js";
|
|
21
21
|
export {
|
|
@@ -4,11 +4,11 @@ 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-
|
|
7
|
+
} from "../../chunk-JZG5QBNT.js";
|
|
8
|
+
import "../../chunk-2XI6N7KN.js";
|
|
9
|
+
import "../../chunk-ZWDXDKSA.js";
|
|
10
|
+
import "../../chunk-PSSTO76B.js";
|
|
11
|
+
import "../../chunk-5DYKNYEY.js";
|
|
12
12
|
import "../../chunk-F24MS2YR.js";
|
|
13
13
|
import "../../chunk-XB5JBFO6.js";
|
|
14
14
|
export {
|
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-JZG5QBNT.js";
|
|
9
9
|
import {
|
|
10
10
|
getElizaCharacter
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-2XI6N7KN.js";
|
|
12
|
+
import "./chunk-ZWDXDKSA.js";
|
|
13
13
|
import {
|
|
14
14
|
TestRunner,
|
|
15
15
|
UserEnvironment,
|
|
@@ -46,13 +46,16 @@ import {
|
|
|
46
46
|
testPublishToGitHub,
|
|
47
47
|
testPublishToNpm,
|
|
48
48
|
validateDataDir
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PSSTO76B.js";
|
|
50
50
|
import {
|
|
51
|
+
bunExec,
|
|
52
|
+
bunExecInherit,
|
|
53
|
+
bunExecSimple,
|
|
51
54
|
configureEmojis,
|
|
52
55
|
emoji,
|
|
53
56
|
require_execa,
|
|
54
57
|
runBunCommand
|
|
55
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-5DYKNYEY.js";
|
|
56
59
|
import "./chunk-F24MS2YR.js";
|
|
57
60
|
import {
|
|
58
61
|
__toESM
|
|
@@ -1585,7 +1588,6 @@ async function addPlugin(pluginArg, opts) {
|
|
|
1585
1588
|
}
|
|
1586
1589
|
|
|
1587
1590
|
// src/commands/plugins/actions/remove.ts
|
|
1588
|
-
var import_execa = __toESM(require_execa(), 1);
|
|
1589
1591
|
import { logger as logger4 } from "@elizaos/core";
|
|
1590
1592
|
import { existsSync as existsSync9, rmSync } from "fs";
|
|
1591
1593
|
import path9 from "path";
|
|
@@ -1613,9 +1615,8 @@ async function removePlugin(plugin) {
|
|
|
1613
1615
|
}
|
|
1614
1616
|
console.info(`Removing ${packageNameToRemove}...`);
|
|
1615
1617
|
try {
|
|
1616
|
-
await (
|
|
1617
|
-
cwd
|
|
1618
|
-
stdio: "inherit"
|
|
1618
|
+
await bunExecInherit("bun", ["remove", packageNameToRemove], {
|
|
1619
|
+
cwd
|
|
1619
1620
|
});
|
|
1620
1621
|
} catch (execError) {
|
|
1621
1622
|
logger4.error(
|
|
@@ -2932,7 +2933,7 @@ import { readFileSync as readFileSync4 } from "fs";
|
|
|
2932
2933
|
import path12 from "path";
|
|
2933
2934
|
async function generatePlugin(opts) {
|
|
2934
2935
|
try {
|
|
2935
|
-
const { PluginCreator } = await import("./plugin-creator-
|
|
2936
|
+
const { PluginCreator } = await import("./plugin-creator-5CER524N.js");
|
|
2936
2937
|
if (opts.apiKey) {
|
|
2937
2938
|
process.env.ANTHROPIC_API_KEY = opts.apiKey;
|
|
2938
2939
|
}
|
|
@@ -3043,7 +3044,6 @@ import path18 from "path";
|
|
|
3043
3044
|
import * as clack10 from "@clack/prompts";
|
|
3044
3045
|
|
|
3045
3046
|
// src/commands/publish/actions/npm-publish.ts
|
|
3046
|
-
var import_execa2 = __toESM(require_execa(), 1);
|
|
3047
3047
|
import { promises as fs2 } from "fs";
|
|
3048
3048
|
import path13 from "path";
|
|
3049
3049
|
async function publishToNpm(cwd, packageJson, npmUsername) {
|
|
@@ -3055,9 +3055,9 @@ async function publishToNpm(cwd, packageJson, npmUsername) {
|
|
|
3055
3055
|
await fs2.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
|
|
3056
3056
|
}
|
|
3057
3057
|
console.info("Building package...");
|
|
3058
|
-
await (
|
|
3058
|
+
await bunExecInherit("npm", ["run", "build"], { cwd });
|
|
3059
3059
|
console.info("Publishing to npm...");
|
|
3060
|
-
await (
|
|
3060
|
+
await bunExecInherit("npm", ["publish", "--ignore-scripts"], { cwd });
|
|
3061
3061
|
console.log(`[\u221A] Successfully published ${packageJson.name}@${packageJson.version} to npm`);
|
|
3062
3062
|
}
|
|
3063
3063
|
|
|
@@ -3295,14 +3295,13 @@ async function generatePackageMetadata(packageJson, cliVersion, username) {
|
|
|
3295
3295
|
}
|
|
3296
3296
|
|
|
3297
3297
|
// src/commands/publish/utils/authentication.ts
|
|
3298
|
-
var import_execa3 = __toESM(require_execa(), 1);
|
|
3299
3298
|
import * as clack7 from "@clack/prompts";
|
|
3300
3299
|
async function getNpmUsername() {
|
|
3301
3300
|
console.info(
|
|
3302
3301
|
"NPM authentication required for registry compliance (package name must match potential NPM package)."
|
|
3303
3302
|
);
|
|
3304
3303
|
try {
|
|
3305
|
-
const { stdout } = await (
|
|
3304
|
+
const { stdout } = await bunExecSimple("npm", ["whoami"]);
|
|
3306
3305
|
const currentUser = stdout.trim();
|
|
3307
3306
|
console.info(`Found existing NPM login: ${currentUser}`);
|
|
3308
3307
|
const useExisting = await clack7.confirm({
|
|
@@ -3317,8 +3316,8 @@ async function getNpmUsername() {
|
|
|
3317
3316
|
return currentUser;
|
|
3318
3317
|
} else {
|
|
3319
3318
|
console.info("Please login with your desired NPM account...");
|
|
3320
|
-
await (
|
|
3321
|
-
const { stdout: newStdout } = await (
|
|
3319
|
+
await bunExecInherit("npm", ["login"]);
|
|
3320
|
+
const { stdout: newStdout } = await bunExecSimple("npm", ["whoami"]);
|
|
3322
3321
|
const newUser = newStdout.trim();
|
|
3323
3322
|
console.info(`Logged in as: ${newUser}`);
|
|
3324
3323
|
return newUser;
|
|
@@ -3326,8 +3325,8 @@ async function getNpmUsername() {
|
|
|
3326
3325
|
} catch (error) {
|
|
3327
3326
|
console.info("Not logged into NPM. Please login to continue...");
|
|
3328
3327
|
try {
|
|
3329
|
-
await (
|
|
3330
|
-
const { stdout } = await (
|
|
3328
|
+
await bunExecInherit("npm", ["login"]);
|
|
3329
|
+
const { stdout } = await bunExecSimple("npm", ["whoami"]);
|
|
3331
3330
|
const username = stdout.trim();
|
|
3332
3331
|
console.info(`Successfully logged in as: ${username}`);
|
|
3333
3332
|
return username;
|
|
@@ -3339,7 +3338,6 @@ async function getNpmUsername() {
|
|
|
3339
3338
|
}
|
|
3340
3339
|
|
|
3341
3340
|
// src/commands/publish/utils/version-check.ts
|
|
3342
|
-
var import_execa7 = __toESM(require_execa(), 1);
|
|
3343
3341
|
import { promises as fs7 } from "fs";
|
|
3344
3342
|
import path17 from "path";
|
|
3345
3343
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
@@ -3350,11 +3348,11 @@ import { logger as logger13 } from "@elizaos/core";
|
|
|
3350
3348
|
import { Command as Command4 } from "commander";
|
|
3351
3349
|
|
|
3352
3350
|
// src/commands/update/actions/cli-update.ts
|
|
3353
|
-
var
|
|
3351
|
+
var import_execa2 = __toESM(require_execa(), 1);
|
|
3354
3352
|
import { logger as logger11 } from "@elizaos/core";
|
|
3355
3353
|
|
|
3356
3354
|
// src/commands/update/utils/version-utils.ts
|
|
3357
|
-
var
|
|
3355
|
+
var import_execa = __toESM(require_execa(), 1);
|
|
3358
3356
|
import { logger as logger10 } from "@elizaos/core";
|
|
3359
3357
|
import * as semver from "semver";
|
|
3360
3358
|
var SPECIAL_VERSION_TAGS = ["latest", "next", "canary", "rc", "dev", "nightly", "alpha"];
|
|
@@ -3401,7 +3399,7 @@ function isMajorUpdate(currentVersion, targetVersion) {
|
|
|
3401
3399
|
}
|
|
3402
3400
|
async function fetchLatestVersion(packageName) {
|
|
3403
3401
|
try {
|
|
3404
|
-
const { stdout } = await (0,
|
|
3402
|
+
const { stdout } = await (0, import_execa.execa)("npm", ["view", packageName, "version"], {
|
|
3405
3403
|
env: { NODE_ENV: "production" }
|
|
3406
3404
|
});
|
|
3407
3405
|
const version = stdout.trim();
|
|
@@ -3451,7 +3449,7 @@ async function performCliUpdate(options = {}) {
|
|
|
3451
3449
|
migrationError instanceof Error ? migrationError.message : String(migrationError)
|
|
3452
3450
|
);
|
|
3453
3451
|
try {
|
|
3454
|
-
await (0,
|
|
3452
|
+
await (0, import_execa2.execa)("npm", ["install", "-g", `@elizaos/cli@${latestVersion}`], {
|
|
3455
3453
|
stdio: "inherit"
|
|
3456
3454
|
});
|
|
3457
3455
|
console.log(`CLI updated successfully to version ${latestVersion} [\u2713]`);
|
|
@@ -3465,7 +3463,7 @@ async function performCliUpdate(options = {}) {
|
|
|
3465
3463
|
}
|
|
3466
3464
|
}
|
|
3467
3465
|
try {
|
|
3468
|
-
await (0,
|
|
3466
|
+
await (0, import_execa2.execa)("bun", ["add", "-g", `@elizaos/cli@${latestVersion}`], { stdio: "inherit" });
|
|
3469
3467
|
console.log(`CLI updated successfully to version ${latestVersion} [\u2713]`);
|
|
3470
3468
|
return true;
|
|
3471
3469
|
} catch (bunError) {
|
|
@@ -3488,7 +3486,7 @@ import { promises as fs6 } from "fs";
|
|
|
3488
3486
|
import * as path16 from "path";
|
|
3489
3487
|
|
|
3490
3488
|
// src/commands/update/utils/package-utils.ts
|
|
3491
|
-
var
|
|
3489
|
+
var import_execa3 = __toESM(require_execa(), 1);
|
|
3492
3490
|
import fs5 from "fs/promises";
|
|
3493
3491
|
import { logger as logger12 } from "@elizaos/core";
|
|
3494
3492
|
async function checkForUpdates(dependencies) {
|
|
@@ -3537,7 +3535,7 @@ async function installDependencies(cwd) {
|
|
|
3537
3535
|
console.log("\nInstalling updated packages...");
|
|
3538
3536
|
try {
|
|
3539
3537
|
const packageManager = await getPackageManager();
|
|
3540
|
-
await (0,
|
|
3538
|
+
await (0, import_execa3.execa)(packageManager, ["install"], { cwd, stdio: "inherit" });
|
|
3541
3539
|
console.log("Dependencies installed successfully [\u2713]");
|
|
3542
3540
|
} catch (error) {
|
|
3543
3541
|
throw new Error(
|
|
@@ -3698,7 +3696,7 @@ async function checkCliVersion() {
|
|
|
3698
3696
|
const cliPackageJsonContent = await fs7.readFile(cliPackageJsonPath, "utf-8");
|
|
3699
3697
|
const cliPackageJson = JSON.parse(cliPackageJsonContent);
|
|
3700
3698
|
const currentVersion = cliPackageJson.version || "0.0.0";
|
|
3701
|
-
const { stdout } = await (
|
|
3699
|
+
const { stdout } = await bunExecSimple("npm", ["view", "@elizaos/cli", "time", "--json"]);
|
|
3702
3700
|
const timeData = JSON.parse(stdout);
|
|
3703
3701
|
delete timeData.created;
|
|
3704
3702
|
delete timeData.modified;
|
|
@@ -4045,13 +4043,13 @@ var publish = new Command5().name("publish").description("Publish a plugin to np
|
|
|
4045
4043
|
import { Command as Command6 } from "commander";
|
|
4046
4044
|
|
|
4047
4045
|
// src/commands/monorepo/actions/clone.ts
|
|
4048
|
-
var
|
|
4046
|
+
var import_execa4 = __toESM(require_execa(), 1);
|
|
4049
4047
|
import { existsSync as existsSync12, readdirSync as readdirSync3, mkdirSync } from "fs";
|
|
4050
4048
|
import path19 from "path";
|
|
4051
4049
|
async function cloneRepository(repo, branch, destination) {
|
|
4052
4050
|
try {
|
|
4053
4051
|
const repoUrl = `https://github.com/${repo}`;
|
|
4054
|
-
await (0,
|
|
4052
|
+
await (0, import_execa4.execa)("git", ["clone", "-b", branch, repoUrl, destination], {
|
|
4055
4053
|
stdio: "inherit"
|
|
4056
4054
|
});
|
|
4057
4055
|
} catch (error) {
|
|
@@ -4815,7 +4813,7 @@ async function installPluginDependencies(projectInfo) {
|
|
|
4815
4813
|
};
|
|
4816
4814
|
await fs11.promises.writeFile(packageJsonPath, JSON.stringify(packageJsonContent, null, 2));
|
|
4817
4815
|
}
|
|
4818
|
-
const { installPlugin: installPlugin2 } = await import("./utils-
|
|
4816
|
+
const { installPlugin: installPlugin2 } = await import("./utils-DTW3XU6O.js");
|
|
4819
4817
|
for (const dependency of project.pluginModule.dependencies) {
|
|
4820
4818
|
await installPlugin2(dependency, pluginsDir);
|
|
4821
4819
|
const dependencyPath = path24.join(pluginsDir, "node_modules", dependency);
|
|
@@ -4838,7 +4836,6 @@ import { spawn as spawn3 } from "child_process";
|
|
|
4838
4836
|
import path26 from "path";
|
|
4839
4837
|
|
|
4840
4838
|
// src/utils/testing/tsc-validator.ts
|
|
4841
|
-
var import_execa9 = __toESM(require_execa(), 1);
|
|
4842
4839
|
import { logger as logger21 } from "@elizaos/core";
|
|
4843
4840
|
import path25 from "path";
|
|
4844
4841
|
import { existsSync as existsSync17 } from "fs";
|
|
@@ -4856,10 +4853,10 @@ async function runTypeCheck(projectPath, strict = true) {
|
|
|
4856
4853
|
if (strict) {
|
|
4857
4854
|
args.push("--strict");
|
|
4858
4855
|
}
|
|
4859
|
-
const
|
|
4860
|
-
cwd: projectPath
|
|
4861
|
-
reject: false
|
|
4856
|
+
const result = await bunExec("tsc", args, {
|
|
4857
|
+
cwd: projectPath
|
|
4862
4858
|
});
|
|
4859
|
+
const { stdout, stderr } = result;
|
|
4863
4860
|
const hasErrors = stderr.includes("error TS") || stdout.includes("error TS");
|
|
4864
4861
|
return {
|
|
4865
4862
|
success: !hasErrors,
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
setEnvVar,
|
|
29
29
|
setGitHubToken,
|
|
30
30
|
validateDataDir
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-PSSTO76B.js";
|
|
32
|
+
import "./chunk-5DYKNYEY.js";
|
|
33
33
|
import "./chunk-F24MS2YR.js";
|
|
34
34
|
import "./chunk-XB5JBFO6.js";
|
|
35
35
|
export {
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
setupAIModelConfig,
|
|
8
8
|
setupEmbeddingModelConfig,
|
|
9
9
|
setupProjectEnvironment
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ZWDXDKSA.js";
|
|
11
|
+
import "./chunk-PSSTO76B.js";
|
|
12
|
+
import "./chunk-5DYKNYEY.js";
|
|
13
13
|
import "./chunk-F24MS2YR.js";
|
|
14
14
|
import "./chunk-XB5JBFO6.js";
|
|
15
15
|
export {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@elizaos/cli": "1.2.
|
|
32
|
-
"@elizaos/core": "1.2.
|
|
33
|
-
"@elizaos/plugin-bootstrap": "1.2.
|
|
34
|
-
"@elizaos/plugin-sql": "1.2.
|
|
31
|
+
"@elizaos/cli": "1.2.3",
|
|
32
|
+
"@elizaos/core": "1.2.3",
|
|
33
|
+
"@elizaos/plugin-bootstrap": "1.2.3",
|
|
34
|
+
"@elizaos/plugin-sql": "1.2.3",
|
|
35
35
|
"@tanstack/react-query": "^5.29.0",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"react": "^18.3.1",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"GUIDE.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@elizaos/cli": "1.2.
|
|
37
|
-
"@elizaos/core": "1.2.
|
|
36
|
+
"@elizaos/cli": "1.2.3",
|
|
37
|
+
"@elizaos/core": "1.2.3",
|
|
38
38
|
"@elizaos/plugin-redpill": "1.0.3",
|
|
39
|
-
"@elizaos/plugin-sql": "1.2.
|
|
39
|
+
"@elizaos/plugin-sql": "1.2.3",
|
|
40
40
|
"@phala/dstack-sdk": "0.1.11",
|
|
41
41
|
"@solana/web3.js": "1.98.2",
|
|
42
42
|
"viem": "2.30.1",
|
|
@@ -113,10 +113,10 @@ import {
|
|
|
113
113
|
updateFile,
|
|
114
114
|
validateGitHubToken,
|
|
115
115
|
writeEnvFile
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-PSSTO76B.js";
|
|
117
117
|
import {
|
|
118
118
|
runBunCommand
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-5DYKNYEY.js";
|
|
120
120
|
import "./chunk-F24MS2YR.js";
|
|
121
121
|
import "./chunk-XB5JBFO6.js";
|
|
122
122
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "elizaOS CLI - Manage your AI agents and plugins",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"typescript": "5.8.3",
|
|
70
70
|
"vite": "^6.3.5"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9fc23427045b3262109c41926af65bb89342b44a",
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@anthropic-ai/claude-code": "^1.0.35",
|
|
75
75
|
"@anthropic-ai/sdk": "^0.54.0",
|
|
76
76
|
"@clack/prompts": "^0.11.0",
|
|
77
|
-
"@elizaos/core": "1.2.
|
|
78
|
-
"@elizaos/plugin-sql": "1.2.
|
|
79
|
-
"@elizaos/server": "1.2.
|
|
77
|
+
"@elizaos/core": "1.2.3",
|
|
78
|
+
"@elizaos/plugin-sql": "1.2.3",
|
|
79
|
+
"@elizaos/server": "1.2.3",
|
|
80
80
|
"bun": "^1.2.17",
|
|
81
81
|
"chalk": "^5.3.0",
|
|
82
82
|
"chokidar": "^4.0.3",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@elizaos/cli": "1.2.
|
|
32
|
-
"@elizaos/core": "1.2.
|
|
33
|
-
"@elizaos/plugin-bootstrap": "1.2.
|
|
34
|
-
"@elizaos/plugin-sql": "1.2.
|
|
31
|
+
"@elizaos/cli": "1.2.3",
|
|
32
|
+
"@elizaos/core": "1.2.3",
|
|
33
|
+
"@elizaos/plugin-bootstrap": "1.2.3",
|
|
34
|
+
"@elizaos/plugin-sql": "1.2.3",
|
|
35
35
|
"@tanstack/react-query": "^5.29.0",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"react": "^18.3.1",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"GUIDE.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@elizaos/cli": "1.2.
|
|
37
|
-
"@elizaos/core": "1.2.
|
|
36
|
+
"@elizaos/cli": "1.2.3",
|
|
37
|
+
"@elizaos/core": "1.2.3",
|
|
38
38
|
"@elizaos/plugin-redpill": "1.0.3",
|
|
39
|
-
"@elizaos/plugin-sql": "1.2.
|
|
39
|
+
"@elizaos/plugin-sql": "1.2.3",
|
|
40
40
|
"@phala/dstack-sdk": "0.1.11",
|
|
41
41
|
"@solana/web3.js": "1.98.2",
|
|
42
42
|
"viem": "2.30.1",
|