@elizaos/cli 1.0.7 → 1.0.8

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.
Files changed (77) hide show
  1. package/dist/assets/{index-zeG6Jws8.js → index-CZAd5zm2.js} +17 -17
  2. package/dist/assets/index-CZAd5zm2.js.br +0 -0
  3. package/dist/assets/{index-zeG6Jws8.js.map → index-CZAd5zm2.js.map} +1 -1
  4. package/dist/assets/{index-BMJNV7A7.js → index-CaEsCLCC.js} +772 -8056
  5. package/dist/assets/{index-BMJNV7A7.js.map → index-CaEsCLCC.js.map} +1 -1
  6. package/dist/assets/{vendor-BiCY-iVm.js → vendor-DSdxb8P-.js} +2 -2
  7. package/dist/assets/vendor-DSdxb8P-.js.br +0 -0
  8. package/dist/assets/{vendor-BiCY-iVm.js.map → vendor-DSdxb8P-.js.map} +1 -1
  9. package/dist/chunk-33BHGAF7.js +616 -0
  10. package/dist/{chunk-YTV6GDEJ.js → chunk-CVADLFW6.js} +100 -42
  11. package/dist/chunk-F24MS2YR.js +19 -0
  12. package/dist/{chunk-7HDCC22V.js → chunk-IEKLJDUU.js} +99 -0
  13. package/dist/chunk-MA2ZXPG6.js +260 -0
  14. package/dist/{chunk-YMXO6XZ5.js → chunk-REBZFQYE.js} +4890 -789
  15. package/dist/chunk-W3HS2NP6.js +154 -0
  16. package/dist/commands/agent/actions/index.d.ts +25 -0
  17. package/dist/commands/agent/actions/index.js +23 -0
  18. package/dist/commands/agent/index.d.ts +16 -0
  19. package/dist/commands/agent/index.js +24 -0
  20. package/dist/commands/create/actions/index.d.ts +35 -0
  21. package/dist/commands/create/actions/index.js +30 -0
  22. package/dist/commands/{create.d.ts → create/index.d.ts} +0 -3
  23. package/dist/commands/create/index.js +17 -0
  24. package/dist/commands/shared/index.d.ts +35 -0
  25. package/dist/commands/shared/index.js +13 -0
  26. package/dist/index.html +2 -2
  27. package/dist/index.js +103835 -56
  28. package/dist/{prompts-I4LK5NKX.js → lib-NAGYZHVV.js} +3 -3
  29. package/dist/{migrator-BQMHMHSG.js → migrator-KZLCVEIH.js} +117 -117
  30. package/dist/{plugin-creator-EUJNDFIB.js → plugin-creator-IC42XOHG.js} +3 -4
  31. package/dist/{registry-AV3SDTPW.js → registry-XFOSZFU4.js} +4 -5
  32. package/dist/utils-DIZZ3HNZ.js +218 -0
  33. package/package.json +18 -11
  34. package/templates/plugin-starter/package.json +1 -1
  35. package/templates/project-starter/package.json +1 -1
  36. package/templates/project-tee-starter/e2e/project.test.ts +1 -1
  37. package/templates/project-tee-starter/e2e/starter-plugin.test.ts +1 -1
  38. package/templates/project-tee-starter/package.json +2 -1
  39. package/dist/assets/index-zeG6Jws8.js.br +0 -0
  40. package/dist/assets/vendor-BiCY-iVm.js.br +0 -0
  41. package/dist/chunk-2RXF3FKA.js +0 -17
  42. package/dist/chunk-335PGADS.js +0 -207
  43. package/dist/chunk-3EAACNH2.js +0 -478
  44. package/dist/chunk-4OL6NNBI.js +0 -264
  45. package/dist/chunk-5J7S2CSH.js +0 -2771
  46. package/dist/chunk-APFJCFC6.js +0 -78
  47. package/dist/chunk-CEMRVVKO.js +0 -96
  48. package/dist/chunk-IYVGVCIB.js +0 -90156
  49. package/dist/chunk-JOHBW4FN.js +0 -576
  50. package/dist/chunk-JROMRXES.js +0 -711
  51. package/dist/chunk-KB3JDWUI.js +0 -106
  52. package/dist/chunk-LRSU7IN6.js +0 -4862
  53. package/dist/chunk-SCN6ZP4J.js +0 -315
  54. package/dist/chunk-V2MPQGYW.js +0 -613
  55. package/dist/chunk-WIPEH5RX.js +0 -7898
  56. package/dist/commands/agent.d.ts +0 -27
  57. package/dist/commands/agent.js +0 -22
  58. package/dist/commands/create.js +0 -18
  59. package/dist/commands/dev.d.ts +0 -8
  60. package/dist/commands/dev.js +0 -18
  61. package/dist/commands/env.d.ts +0 -16
  62. package/dist/commands/env.js +0 -21
  63. package/dist/commands/monorepo.d.ts +0 -5
  64. package/dist/commands/monorepo.js +0 -17
  65. package/dist/commands/plugins.d.ts +0 -19
  66. package/dist/commands/plugins.js +0 -25
  67. package/dist/commands/publish.d.ts +0 -5
  68. package/dist/commands/publish.js +0 -18
  69. package/dist/commands/start.d.ts +0 -198
  70. package/dist/commands/start.js +0 -26
  71. package/dist/commands/tee.d.ts +0 -5
  72. package/dist/commands/tee.js +0 -13
  73. package/dist/commands/test.d.ts +0 -6
  74. package/dist/commands/test.js +0 -25
  75. package/dist/commands/update.d.ts +0 -14
  76. package/dist/commands/update.js +0 -23
  77. package/dist/{chunk-NHI4RJD2.js → chunk-CEE6RKN5.js} +58 -58
@@ -1,78 +0,0 @@
1
-
2
- import { createRequire } from 'module';
3
- const require = createRequire(import.meta.url);
4
-
5
- import {
6
- Command
7
- } from "./chunk-5J7S2CSH.js";
8
- import {
9
- emoji
10
- } from "./chunk-KB3JDWUI.js";
11
-
12
- // src/commands/tee/phala-wrapper.ts
13
- import { spawn } from "node:child_process";
14
- import { elizaLogger } from "@elizaos/core";
15
- var phalaCliCommand = new Command("phala").description("Official Phala Cloud CLI - Manage TEE deployments on Phala Cloud").allowUnknownOption().helpOption(false).action(async (options, command) => {
16
- const args = command.args;
17
- try {
18
- elizaLogger.info("Running Phala CLI command:", ["phala", ...args].join(" "));
19
- const phalaProcess = spawn("npx", ["--yes", "phala", ...args], {
20
- stdio: "inherit",
21
- shell: true
22
- });
23
- phalaProcess.on("error", (error) => {
24
- elizaLogger.error("Failed to execute Phala CLI:", error);
25
- if (error.message.includes("ENOENT")) {
26
- elizaLogger.error(
27
- `
28
- ${emoji.error("Error: npx not found. Please install Node.js and npm:")}`
29
- );
30
- elizaLogger.error(" Visit https://nodejs.org or use a version manager like nvm");
31
- elizaLogger.error(
32
- " curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash"
33
- );
34
- } else {
35
- elizaLogger.error(`
36
- ${emoji.error("Error: Failed to execute Phala CLI")}`);
37
- elizaLogger.error(" Try running directly: npx phala", args.join(" "));
38
- }
39
- process.exit(1);
40
- });
41
- phalaProcess.on("exit", (code) => {
42
- if (code !== 0) {
43
- elizaLogger.warn(`Phala CLI exited with code: ${code}`);
44
- }
45
- process.exit(code || 0);
46
- });
47
- } catch (error) {
48
- elizaLogger.error("Error running Phala CLI:", error);
49
- elizaLogger.error(`
50
- ${emoji.error("Error: Failed to run Phala CLI")}`);
51
- elizaLogger.error(" Try running Phala CLI directly with: npx phala", args.join(" "));
52
- elizaLogger.error(" Or visit https://www.npmjs.com/package/phala for more information");
53
- process.exit(1);
54
- }
55
- }).configureHelp({
56
- helpWidth: 100
57
- }).on("--help", () => {
58
- console.log("");
59
- console.log("This command wraps the official Phala Cloud CLI.");
60
- console.log("The Phala CLI will be automatically downloaded if not already installed.");
61
- console.log("All arguments are passed directly to the Phala CLI.");
62
- console.log("");
63
- console.log("Examples:");
64
- console.log(" $ elizaos tee phala help");
65
- console.log(" $ elizaos tee phala auth login <api-key>");
66
- console.log(" $ elizaos tee phala cvms list");
67
- console.log(" $ elizaos tee phala cvms create --name my-app --compose ./docker-compose.yml");
68
- console.log("");
69
- console.log("For full Phala CLI documentation, run:");
70
- console.log(" $ npx phala help");
71
- });
72
-
73
- // src/commands/tee.ts
74
- var teeCommand = new Command("tee").description("Manage TEE deployments").addCommand(phalaCliCommand);
75
-
76
- export {
77
- teeCommand
78
- };
@@ -1,96 +0,0 @@
1
-
2
- import { createRequire } from 'module';
3
- const require = createRequire(import.meta.url);
4
-
5
- import {
6
- handleError
7
- } from "./chunk-YMXO6XZ5.js";
8
- import {
9
- Command
10
- } from "./chunk-5J7S2CSH.js";
11
- import {
12
- emoji
13
- } from "./chunk-KB3JDWUI.js";
14
-
15
- // src/commands/monorepo.ts
16
- import { execa } from "execa";
17
- import fs from "node:fs";
18
- import path from "node:path";
19
- async function cloneRepository(repo, branch, destination) {
20
- try {
21
- const repoUrl = `https://github.com/${repo}`;
22
- await execa("git", ["clone", "-b", branch, repoUrl, destination], {
23
- stdio: "inherit"
24
- });
25
- } catch (error) {
26
- if (error.message && error.message.includes("exit code 128")) {
27
- console.error(`
28
- [X] Branch '${branch}' doesn't exist in the ElizaOS repository.`);
29
- console.error(`Please specify a valid branch name. Common branches include:`);
30
- console.error(` \u2022 main - The main branch`);
31
- console.error(` \u2022 develop - The development branch (default)`);
32
- console.error(
33
- `
34
- For a complete list of branches, visit: https://github.com/elizaOS/eliza/branches`
35
- );
36
- throw new Error(`Branch '${branch}' not found`);
37
- }
38
- throw new Error(`Failed to clone repository: ${error.message}`);
39
- }
40
- }
41
- function displayNextSteps(targetDir) {
42
- const cdPath = path.relative(process.cwd(), targetDir);
43
- console.log("\nTo complete the ElizaOS setup, follow these steps:\n");
44
- console.log("1. Navigate to the project directory:");
45
- console.log(` cd ${cdPath}`);
46
- console.log("\n2. Install dependencies:");
47
- console.log(" bun install");
48
- console.log("\n3. Build the project:");
49
- console.log(" bun run build");
50
- console.log("\n4. Start ElizaOS:");
51
- console.log(" bun run start or bun run dev");
52
- console.log(`
53
- ${emoji.list("Prerequisites:")}`);
54
- console.log(` ${emoji.bullet("Node.js 23.3.0+")}`);
55
- console.log(` ${emoji.bullet("Bun (JavaScript runtime & package manager)")}`);
56
- console.log(`
57
- ${emoji.rocket("If you don't have Bun installed:")}`);
58
- const platform = process.platform;
59
- if (platform === "win32") {
60
- console.log(' Windows: powershell -c "irm bun.sh/install.ps1 | iex"');
61
- console.log(" Alternative: scoop install bun (if you have Scoop)");
62
- } else {
63
- console.log(" Linux/macOS: curl -fsSL https://bun.sh/install | bash");
64
- if (platform === "darwin") {
65
- console.log(" macOS alternative: brew install bun (if you have Homebrew)");
66
- }
67
- }
68
- console.log(" More options: https://bun.sh/docs/installation");
69
- console.log(" After installation, restart your terminal");
70
- }
71
- var monorepo = new Command().name("monorepo").description("Clone ElizaOS monorepo from a specific branch, defaults to develop").option("-b, --branch <branch>", "Branch to install", "develop").option("-d, --dir <directory>", "Destination directory", "./eliza").action(async (options) => {
72
- try {
73
- const repo = "elizaOS/eliza";
74
- const branch = options.branch || "develop";
75
- const dir = options.dir || "./eliza";
76
- const destinationDir = path.resolve(process.cwd(), dir);
77
- if (fs.existsSync(destinationDir)) {
78
- const files = fs.readdirSync(destinationDir);
79
- if (files.length > 0) {
80
- throw new Error(
81
- `Destination directory ${destinationDir} already exists and is not empty`
82
- );
83
- }
84
- } else {
85
- fs.mkdirSync(destinationDir, { recursive: true });
86
- }
87
- await cloneRepository(repo, branch, destinationDir);
88
- displayNextSteps(destinationDir);
89
- } catch (error) {
90
- handleError(error);
91
- }
92
- });
93
-
94
- export {
95
- monorepo
96
- };