@elizaos/cli 1.6.2-alpha.2 → 1.6.2-alpha.21

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 (56) hide show
  1. package/README.md +2 -2
  2. package/dist/commands/deploy/actions/deploy-ecs.d.ts +10 -0
  3. package/dist/commands/deploy/actions/deploy-ecs.d.ts.map +1 -0
  4. package/dist/commands/deploy/actions/deploy.d.ts +9 -0
  5. package/dist/commands/deploy/actions/deploy.d.ts.map +1 -0
  6. package/dist/commands/deploy/index.d.ts +7 -0
  7. package/dist/commands/deploy/index.d.ts.map +1 -0
  8. package/dist/commands/deploy/types.d.ts +156 -0
  9. package/dist/commands/deploy/types.d.ts.map +1 -0
  10. package/dist/commands/deploy/utils/api-client.d.ts +71 -0
  11. package/dist/commands/deploy/utils/api-client.d.ts.map +1 -0
  12. package/dist/commands/deploy/utils/docker-build.d.ts +58 -0
  13. package/dist/commands/deploy/utils/docker-build.d.ts.map +1 -0
  14. package/dist/commands/dev/actions/dev-server.d.ts.map +1 -1
  15. package/dist/commands/scenario/src/plugin-parser.d.ts.map +1 -1
  16. package/dist/commands/scenario/src/runtime-factory.d.ts.map +1 -1
  17. package/dist/commands/start/index.d.ts.map +1 -1
  18. package/dist/commands/tee/eigen-wrapper.d.ts +3 -0
  19. package/dist/commands/tee/eigen-wrapper.d.ts.map +1 -0
  20. package/dist/commands/tee/index.d.ts.map +1 -1
  21. package/dist/commands/test/actions/e2e-tests.d.ts.map +1 -1
  22. package/dist/commands/test/index.d.ts.map +1 -1
  23. package/dist/index.js +18332 -9741
  24. package/dist/index.js.map +193 -47
  25. package/dist/templates/plugin-quick-starter/package.json +2 -2
  26. package/dist/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +54 -0
  27. package/dist/templates/plugin-quick-starter/src/plugin.ts +6 -5
  28. package/dist/templates/plugin-starter/package.json +2 -2
  29. package/dist/templates/plugin-starter/src/plugin.ts +6 -4
  30. package/dist/templates/project-starter/package.json +6 -6
  31. package/dist/templates/project-starter/src/character.ts +3 -0
  32. package/dist/templates/project-starter/src/plugin.ts +6 -4
  33. package/dist/templates/project-starter/tsconfig.json +1 -3
  34. package/dist/templates/project-tee-starter/package.json +4 -4
  35. package/dist/utils/index.d.ts +0 -2
  36. package/dist/utils/index.d.ts.map +1 -1
  37. package/dist/version.d.ts +2 -2
  38. package/dist/version.d.ts.map +1 -1
  39. package/dist/version.js +2 -2
  40. package/package.json +13 -7
  41. package/templates/plugin-quick-starter/package.json +2 -2
  42. package/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +54 -0
  43. package/templates/plugin-quick-starter/src/plugin.ts +6 -5
  44. package/templates/plugin-starter/package.json +2 -2
  45. package/templates/plugin-starter/src/plugin.ts +6 -4
  46. package/templates/project-starter/package.json +6 -6
  47. package/templates/project-starter/src/character.ts +3 -0
  48. package/templates/project-starter/src/plugin.ts +6 -4
  49. package/templates/project-starter/tsconfig.json +1 -3
  50. package/templates/project-tee-starter/package.json +4 -4
  51. package/dist/utils/module-loader.d.ts +0 -71
  52. package/dist/utils/module-loader.d.ts.map +0 -1
  53. package/dist/utils/port-handling.d.ts +0 -15
  54. package/dist/utils/port-handling.d.ts.map +0 -1
  55. package/dist/utils/port-validation.d.ts +0 -6
  56. package/dist/utils/port-validation.d.ts.map +0 -1
@@ -39,11 +39,11 @@
39
39
  "package.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@elizaos/core": "1.6.2-alpha.2",
42
+ "@elizaos/core": "1.6.2-alpha.21",
43
43
  "zod": "4.1.11"
44
44
  },
45
45
  "devDependencies": {
46
- "@elizaos/cli": "1.6.2-alpha.2",
46
+ "@elizaos/cli": "1.6.2-alpha.21",
47
47
  "dotenv": "16.4.5",
48
48
  "prettier": "3.5.3",
49
49
  "typescript": "5.8.2"
@@ -117,6 +117,60 @@ describe('Plugin Configuration', () => {
117
117
  );
118
118
  }
119
119
  });
120
+
121
+ it('should handle ZodError with issues array correctly', async () => {
122
+ const runtime = createMockRuntime();
123
+ const invalidConfig = { EXAMPLE_PLUGIN_VARIABLE: '' }; // Empty string violates min(1)
124
+
125
+ if (starterPlugin.init) {
126
+ try {
127
+ await starterPlugin.init(invalidConfig, runtime);
128
+ throw new Error('Should have thrown error');
129
+ } catch (error) {
130
+ expect(error).toBeInstanceOf(Error);
131
+ const errorMessage = (error as Error).message;
132
+ expect(errorMessage).toContain('Invalid plugin configuration');
133
+ // Should use error.issues, not error.errors
134
+ expect(errorMessage).toContain('Example plugin variable is not provided');
135
+ }
136
+ }
137
+ });
138
+
139
+ it('should handle ZodError with fallback for undefined issues', async () => {
140
+ const runtime = createMockRuntime();
141
+ // Test that the error handling doesn't crash if issues is somehow undefined
142
+ const invalidConfig = { EXAMPLE_PLUGIN_VARIABLE: null };
143
+
144
+ if (starterPlugin.init) {
145
+ try {
146
+ await starterPlugin.init(invalidConfig as any, runtime);
147
+ throw new Error('Should have thrown error');
148
+ } catch (error) {
149
+ expect(error).toBeInstanceOf(Error);
150
+ const errorMessage = (error as Error).message;
151
+ // Should either show specific error or fallback message
152
+ expect(errorMessage).toContain('Invalid plugin configuration');
153
+ }
154
+ }
155
+ });
156
+
157
+ it('should handle non-ZodError exceptions', async () => {
158
+ const runtime = createMockRuntime();
159
+ // Pass a config that will cause validation but won't be a ZodError
160
+ const config = { EXAMPLE_PLUGIN_VARIABLE: 'valid-value' };
161
+
162
+ if (starterPlugin.init) {
163
+ // This should succeed without throwing
164
+ let error: Error | null = null;
165
+ try {
166
+ await starterPlugin.init(config, runtime);
167
+ } catch (e) {
168
+ error = e as Error;
169
+ }
170
+ expect(error).toBeNull();
171
+ expect(process.env.EXAMPLE_PLUGIN_VARIABLE).toBe('valid-value');
172
+ }
173
+ });
120
174
  });
121
175
 
122
176
  describe('Hello World Action', () => {
@@ -2,7 +2,6 @@ import type { Plugin } from '@elizaos/core';
2
2
  import {
3
3
  type Action,
4
4
  type ActionResult,
5
- type Content,
6
5
  type GenerateTextParams,
7
6
  type HandlerCallback,
8
7
  type IAgentRuntime,
@@ -189,11 +188,13 @@ export const starterPlugin: Plugin = {
189
188
  }
190
189
  } catch (error) {
191
190
  if (error instanceof z.ZodError) {
192
- throw new Error(
193
- `Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
194
- );
191
+ const errorMessages =
192
+ error.issues?.map((e) => e.message)?.join(', ') || 'Unknown validation error';
193
+ throw new Error(`Invalid plugin configuration: ${errorMessages}`);
195
194
  }
196
- throw error;
195
+ throw new Error(
196
+ `Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
197
+ );
197
198
  }
198
199
  },
199
200
  models: {
@@ -39,7 +39,7 @@
39
39
  "package.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@elizaos/core": "1.6.2-alpha.2",
42
+ "@elizaos/core": "1.6.2-alpha.21",
43
43
  "@tanstack/react-query": "^5.80.7",
44
44
  "clsx": "^2.1.1",
45
45
  "tailwind-merge": "^3.3.1",
@@ -48,7 +48,7 @@
48
48
  "zod": "4.1.11"
49
49
  },
50
50
  "devDependencies": {
51
- "@elizaos/cli": "1.6.2-alpha.2",
51
+ "@elizaos/cli": "1.6.2-alpha.21",
52
52
  "@tailwindcss/vite": "^4.1.10",
53
53
  "@vitejs/plugin-react-swc": "^3.10.2",
54
54
  "dotenv": "16.4.5",
@@ -183,11 +183,13 @@ export const starterPlugin: Plugin = {
183
183
  }
184
184
  } catch (error) {
185
185
  if (error instanceof z.ZodError) {
186
- throw new Error(
187
- `Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
188
- );
186
+ const errorMessages =
187
+ error.issues?.map((e) => e.message)?.join(', ') || 'Unknown validation error';
188
+ throw new Error(`Invalid plugin configuration: ${errorMessages}`);
189
189
  }
190
- throw error;
190
+ throw new Error(
191
+ `Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
192
+ );
191
193
  }
192
194
  },
193
195
  models: {
@@ -27,12 +27,12 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@elizaos/cli": "1.6.2-alpha.2",
31
- "@elizaos/client": "1.6.2-alpha.2",
32
- "@elizaos/core": "1.6.2-alpha.2",
33
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.2",
34
- "@elizaos/plugin-sql": "1.6.2-alpha.2",
35
- "@elizaos/server": "1.6.2-alpha.2",
30
+ "@elizaos/cli": "1.6.2-alpha.21",
31
+ "@elizaos/client": "1.6.2-alpha.21",
32
+ "@elizaos/core": "1.6.2-alpha.21",
33
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.21",
34
+ "@elizaos/plugin-sql": "1.6.2-alpha.21",
35
+ "@elizaos/server": "1.6.2-alpha.21",
36
36
  "@tanstack/react-query": "^5.29.0",
37
37
  "clsx": "^2.1.1",
38
38
  "react": "^18.3.1",
@@ -5,6 +5,9 @@ import { type Character } from '@elizaos/core';
5
5
  * Eliza responds to a wide range of messages, is helpful and conversational.
6
6
  * She interacts with users in a concise, direct, and helpful manner, using humor and empathy effectively.
7
7
  * Eliza's responses are geared towards providing assistance on various topics while maintaining a friendly demeanor.
8
+ *
9
+ * Note: This character does not have a pre-defined ID. The loader will generate one.
10
+ * If you want a stable agent across restarts, add an "id" field with a specific UUID.
8
11
  */
9
12
  export const character: Character = {
10
13
  name: 'Eliza',
@@ -202,11 +202,13 @@ const plugin: Plugin = {
202
202
  }
203
203
  } catch (error) {
204
204
  if (error instanceof z.ZodError) {
205
- throw new Error(
206
- `Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
207
- );
205
+ const errorMessages =
206
+ error.issues?.map((e) => e.message)?.join(', ') || 'Unknown validation error';
207
+ throw new Error(`Invalid plugin configuration: ${errorMessages}`);
208
208
  }
209
- throw error;
209
+ throw new Error(
210
+ `Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
211
+ );
210
212
  }
211
213
  },
212
214
  models: {
@@ -11,9 +11,6 @@
11
11
  "esModuleInterop": true,
12
12
  "skipLibCheck": true,
13
13
  "incremental": true,
14
- "composite": true,
15
- "declaration": true,
16
- "declarationMap": true,
17
14
  "forceConsistentCasingInFileNames": true,
18
15
  "strictFunctionTypes": false,
19
16
  "useUnknownInCatchVariables": false,
@@ -22,6 +19,7 @@
22
19
  "allowJs": true,
23
20
  "checkJs": false,
24
21
  "noEmitOnError": false,
22
+ "noEmit": true,
25
23
  "moduleDetection": "force",
26
24
  "allowArbitraryExtensions": true,
27
25
  "baseUrl": ".",
@@ -32,11 +32,11 @@
32
32
  "GUIDE.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@elizaos/cli": "1.6.2-alpha.2",
36
- "@elizaos/core": "1.6.2-alpha.2",
37
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.2",
35
+ "@elizaos/cli": "1.6.2-alpha.21",
36
+ "@elizaos/core": "1.6.2-alpha.21",
37
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.21",
38
38
  "@elizaos/plugin-redpill": "1.2.1",
39
- "@elizaos/plugin-sql": "1.6.2-alpha.2",
39
+ "@elizaos/plugin-sql": "1.6.2-alpha.21",
40
40
  "@phala/dstack-sdk": "0.1.11",
41
41
  "@solana/web3.js": "1.98.2",
42
42
  "@tanstack/react-query": "^5.29.0",
@@ -13,10 +13,8 @@ export * from './helpers';
13
13
  export * from './install-plugin';
14
14
  export * from './load-plugin';
15
15
  export * from './local-cli-delegation';
16
- export * from './module-loader';
17
16
  export * from './package-manager';
18
17
  export * from './plugin-context';
19
- export * from './port-handling';
20
18
  export * from './publisher';
21
19
  export * from './resolve-import';
22
20
  export * from './resolve-utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzE,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzE,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
package/dist/version.d.ts CHANGED
@@ -3,10 +3,10 @@
3
3
  * Generated at build time by generate-version.ts
4
4
  * This file contains build-time constants to avoid runtime package.json resolution
5
5
  */
6
- export declare const CLI_VERSION = "1.6.2-alpha.2";
6
+ export declare const CLI_VERSION = "1.6.2-alpha.21";
7
7
  export declare const CLI_NAME = "@elizaos/cli";
8
8
  export declare const CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins";
9
- export declare const BUILD_TIME = "2025-10-05T11:22:01.010Z";
9
+ export declare const BUILD_TIME = "2025-10-17T12:00:18.415Z";
10
10
  export declare const BUILD_ENV = "production";
11
11
  declare const _default: {
12
12
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAC3C,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,eAAe,oDAAoD,CAAC;AAGjF,eAAO,MAAM,UAAU,6BAA6B,CAAC;AACrD,eAAO,MAAM,SAAS,eAAe,CAAC;;;;;;;;AAGtC,wBAME"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAC5C,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AACvC,eAAO,MAAM,eAAe,oDAAoD,CAAC;AAGjF,eAAO,MAAM,UAAU,6BAA6B,CAAC;AACrD,eAAO,MAAM,SAAS,eAAe,CAAC;;;;;;;;AAGtC,wBAME"}
package/dist/version.js CHANGED
@@ -4,12 +4,12 @@
4
4
  * This file contains build-time constants to avoid runtime package.json resolution
5
5
  */
6
6
 
7
- export const CLI_VERSION = '1.6.2-alpha.2';
7
+ export const CLI_VERSION = '1.6.2-alpha.21';
8
8
  export const CLI_NAME = '@elizaos/cli';
9
9
  export const CLI_DESCRIPTION = 'elizaOS CLI - Manage your AI agents and plugins';
10
10
 
11
11
  // Build metadata
12
- export const BUILD_TIME = '2025-10-05T11:22:01.010Z';
12
+ export const BUILD_TIME = '2025-10-17T12:00:18.415Z';
13
13
  export const BUILD_ENV = 'production';
14
14
 
15
15
  // Export as default for convenience
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/cli",
3
- "version": "1.6.2-alpha.2",
3
+ "version": "1.6.2-alpha.21",
4
4
  "description": "elizaOS CLI - Manage your AI agents and plugins",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -66,6 +66,7 @@
66
66
  "@types/node": "^24.0.3",
67
67
  "@types/prompts": "^2.4.2",
68
68
  "@types/semver": "^7.5.8",
69
+ "@types/tar": "^6.1.13",
69
70
  "bats-support": "^0.3.0",
70
71
  "cross-env": "^10.1.0",
71
72
  "node-html-parser": "^7.0.1",
@@ -74,30 +75,35 @@
74
75
  "typescript": "5.9.2",
75
76
  "vite": "^7.1.7"
76
77
  },
77
- "gitHead": "72880e8dab2e3bbe2640f2ca09764b84a80cebd5",
78
+ "gitHead": "167fbae273e74d5eb75642a0486ab754d8e1fabf",
78
79
  "dependencies": {
79
80
  "@anthropic-ai/claude-code": "^2.0.1",
80
81
  "@anthropic-ai/sdk": "^0.65.0",
81
82
  "@clack/prompts": "^0.11.0",
82
- "@elizaos/api-client": "1.6.2-alpha.2",
83
- "@elizaos/core": "1.6.2-alpha.2",
84
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.2",
83
+ "@elizaos/api-client": "1.6.2-alpha.21",
84
+ "@elizaos/core": "1.6.2-alpha.21",
85
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.21",
85
86
  "@elizaos/plugin-openai": "1.5.15",
86
- "@elizaos/plugin-sql": "1.6.2-alpha.2",
87
- "@elizaos/server": "1.6.2-alpha.2",
87
+ "@elizaos/plugin-sql": "1.6.2-alpha.21",
88
+ "@elizaos/server": "1.6.2-alpha.21",
88
89
  "bun": "^1.2.21",
89
90
  "chalk": "^5.4.1",
90
91
  "chokidar": "^4.0.3",
91
92
  "commander": "^14.0.0",
92
93
  "dotenv": "^17.2.3",
94
+ "execa": "^9.6.0",
95
+ "form-data": "^4.0.0",
93
96
  "fs-extra": "^11.1.0",
94
97
  "globby": "^15.0.0",
95
98
  "https-proxy-agent": "^7.0.6",
99
+ "ignore": "^6.0.2",
96
100
  "lodash": "^4.17.21",
101
+ "node-fetch": "^3.3.2",
97
102
  "ora": "^9.0.0",
98
103
  "rimraf": "6.0.1",
99
104
  "semver": "^7.7.2",
100
105
  "simple-git": "^3.27.0",
106
+ "tar": "^7.5.1",
101
107
  "tiktoken": "^1.0.18",
102
108
  "tsconfig-paths": "^4.2.0",
103
109
  "type-fest": "^5.0.1",
@@ -39,11 +39,11 @@
39
39
  "package.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@elizaos/core": "1.6.2-alpha.2",
42
+ "@elizaos/core": "1.6.2-alpha.21",
43
43
  "zod": "4.1.11"
44
44
  },
45
45
  "devDependencies": {
46
- "@elizaos/cli": "1.6.2-alpha.2",
46
+ "@elizaos/cli": "1.6.2-alpha.21",
47
47
  "dotenv": "16.4.5",
48
48
  "prettier": "3.5.3",
49
49
  "typescript": "5.8.2"
@@ -117,6 +117,60 @@ describe('Plugin Configuration', () => {
117
117
  );
118
118
  }
119
119
  });
120
+
121
+ it('should handle ZodError with issues array correctly', async () => {
122
+ const runtime = createMockRuntime();
123
+ const invalidConfig = { EXAMPLE_PLUGIN_VARIABLE: '' }; // Empty string violates min(1)
124
+
125
+ if (starterPlugin.init) {
126
+ try {
127
+ await starterPlugin.init(invalidConfig, runtime);
128
+ throw new Error('Should have thrown error');
129
+ } catch (error) {
130
+ expect(error).toBeInstanceOf(Error);
131
+ const errorMessage = (error as Error).message;
132
+ expect(errorMessage).toContain('Invalid plugin configuration');
133
+ // Should use error.issues, not error.errors
134
+ expect(errorMessage).toContain('Example plugin variable is not provided');
135
+ }
136
+ }
137
+ });
138
+
139
+ it('should handle ZodError with fallback for undefined issues', async () => {
140
+ const runtime = createMockRuntime();
141
+ // Test that the error handling doesn't crash if issues is somehow undefined
142
+ const invalidConfig = { EXAMPLE_PLUGIN_VARIABLE: null };
143
+
144
+ if (starterPlugin.init) {
145
+ try {
146
+ await starterPlugin.init(invalidConfig as any, runtime);
147
+ throw new Error('Should have thrown error');
148
+ } catch (error) {
149
+ expect(error).toBeInstanceOf(Error);
150
+ const errorMessage = (error as Error).message;
151
+ // Should either show specific error or fallback message
152
+ expect(errorMessage).toContain('Invalid plugin configuration');
153
+ }
154
+ }
155
+ });
156
+
157
+ it('should handle non-ZodError exceptions', async () => {
158
+ const runtime = createMockRuntime();
159
+ // Pass a config that will cause validation but won't be a ZodError
160
+ const config = { EXAMPLE_PLUGIN_VARIABLE: 'valid-value' };
161
+
162
+ if (starterPlugin.init) {
163
+ // This should succeed without throwing
164
+ let error: Error | null = null;
165
+ try {
166
+ await starterPlugin.init(config, runtime);
167
+ } catch (e) {
168
+ error = e as Error;
169
+ }
170
+ expect(error).toBeNull();
171
+ expect(process.env.EXAMPLE_PLUGIN_VARIABLE).toBe('valid-value');
172
+ }
173
+ });
120
174
  });
121
175
 
122
176
  describe('Hello World Action', () => {
@@ -2,7 +2,6 @@ import type { Plugin } from '@elizaos/core';
2
2
  import {
3
3
  type Action,
4
4
  type ActionResult,
5
- type Content,
6
5
  type GenerateTextParams,
7
6
  type HandlerCallback,
8
7
  type IAgentRuntime,
@@ -189,11 +188,13 @@ export const starterPlugin: Plugin = {
189
188
  }
190
189
  } catch (error) {
191
190
  if (error instanceof z.ZodError) {
192
- throw new Error(
193
- `Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
194
- );
191
+ const errorMessages =
192
+ error.issues?.map((e) => e.message)?.join(', ') || 'Unknown validation error';
193
+ throw new Error(`Invalid plugin configuration: ${errorMessages}`);
195
194
  }
196
- throw error;
195
+ throw new Error(
196
+ `Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
197
+ );
197
198
  }
198
199
  },
199
200
  models: {
@@ -39,7 +39,7 @@
39
39
  "package.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@elizaos/core": "1.6.2-alpha.2",
42
+ "@elizaos/core": "1.6.2-alpha.21",
43
43
  "@tanstack/react-query": "^5.80.7",
44
44
  "clsx": "^2.1.1",
45
45
  "tailwind-merge": "^3.3.1",
@@ -48,7 +48,7 @@
48
48
  "zod": "4.1.11"
49
49
  },
50
50
  "devDependencies": {
51
- "@elizaos/cli": "1.6.2-alpha.2",
51
+ "@elizaos/cli": "1.6.2-alpha.21",
52
52
  "@tailwindcss/vite": "^4.1.10",
53
53
  "@vitejs/plugin-react-swc": "^3.10.2",
54
54
  "dotenv": "16.4.5",
@@ -183,11 +183,13 @@ export const starterPlugin: Plugin = {
183
183
  }
184
184
  } catch (error) {
185
185
  if (error instanceof z.ZodError) {
186
- throw new Error(
187
- `Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
188
- );
186
+ const errorMessages =
187
+ error.issues?.map((e) => e.message)?.join(', ') || 'Unknown validation error';
188
+ throw new Error(`Invalid plugin configuration: ${errorMessages}`);
189
189
  }
190
- throw error;
190
+ throw new Error(
191
+ `Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
192
+ );
191
193
  }
192
194
  },
193
195
  models: {
@@ -27,12 +27,12 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@elizaos/cli": "1.6.2-alpha.2",
31
- "@elizaos/client": "1.6.2-alpha.2",
32
- "@elizaos/core": "1.6.2-alpha.2",
33
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.2",
34
- "@elizaos/plugin-sql": "1.6.2-alpha.2",
35
- "@elizaos/server": "1.6.2-alpha.2",
30
+ "@elizaos/cli": "1.6.2-alpha.21",
31
+ "@elizaos/client": "1.6.2-alpha.21",
32
+ "@elizaos/core": "1.6.2-alpha.21",
33
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.21",
34
+ "@elizaos/plugin-sql": "1.6.2-alpha.21",
35
+ "@elizaos/server": "1.6.2-alpha.21",
36
36
  "@tanstack/react-query": "^5.29.0",
37
37
  "clsx": "^2.1.1",
38
38
  "react": "^18.3.1",
@@ -5,6 +5,9 @@ import { type Character } from '@elizaos/core';
5
5
  * Eliza responds to a wide range of messages, is helpful and conversational.
6
6
  * She interacts with users in a concise, direct, and helpful manner, using humor and empathy effectively.
7
7
  * Eliza's responses are geared towards providing assistance on various topics while maintaining a friendly demeanor.
8
+ *
9
+ * Note: This character does not have a pre-defined ID. The loader will generate one.
10
+ * If you want a stable agent across restarts, add an "id" field with a specific UUID.
8
11
  */
9
12
  export const character: Character = {
10
13
  name: 'Eliza',
@@ -202,11 +202,13 @@ const plugin: Plugin = {
202
202
  }
203
203
  } catch (error) {
204
204
  if (error instanceof z.ZodError) {
205
- throw new Error(
206
- `Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
207
- );
205
+ const errorMessages =
206
+ error.issues?.map((e) => e.message)?.join(', ') || 'Unknown validation error';
207
+ throw new Error(`Invalid plugin configuration: ${errorMessages}`);
208
208
  }
209
- throw error;
209
+ throw new Error(
210
+ `Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
211
+ );
210
212
  }
211
213
  },
212
214
  models: {
@@ -11,9 +11,6 @@
11
11
  "esModuleInterop": true,
12
12
  "skipLibCheck": true,
13
13
  "incremental": true,
14
- "composite": true,
15
- "declaration": true,
16
- "declarationMap": true,
17
14
  "forceConsistentCasingInFileNames": true,
18
15
  "strictFunctionTypes": false,
19
16
  "useUnknownInCatchVariables": false,
@@ -22,6 +19,7 @@
22
19
  "allowJs": true,
23
20
  "checkJs": false,
24
21
  "noEmitOnError": false,
22
+ "noEmit": true,
25
23
  "moduleDetection": "force",
26
24
  "allowArbitraryExtensions": true,
27
25
  "baseUrl": ".",
@@ -32,11 +32,11 @@
32
32
  "GUIDE.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@elizaos/cli": "1.6.2-alpha.2",
36
- "@elizaos/core": "1.6.2-alpha.2",
37
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.2",
35
+ "@elizaos/cli": "1.6.2-alpha.21",
36
+ "@elizaos/core": "1.6.2-alpha.21",
37
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.21",
38
38
  "@elizaos/plugin-redpill": "1.2.1",
39
- "@elizaos/plugin-sql": "1.6.2-alpha.2",
39
+ "@elizaos/plugin-sql": "1.6.2-alpha.21",
40
40
  "@phala/dstack-sdk": "0.1.11",
41
41
  "@solana/web3.js": "1.98.2",
42
42
  "@tanstack/react-query": "^5.29.0",
@@ -1,71 +0,0 @@
1
- /**
2
- * ModuleLoader provides a clean way to load modules from the project's local node_modules
3
- * instead of the global CLI's bundled dependencies. This solves singleton pattern issues
4
- * and ensures consistent module instances across the application.
5
- */
6
- export declare class ModuleLoader {
7
- private require;
8
- private asyncCache;
9
- private syncCache;
10
- private projectPath;
11
- constructor(projectPath?: string);
12
- /**
13
- * Detect the appropriate project path, preferring monorepo root over current working directory
14
- */
15
- private detectProjectPath;
16
- /**
17
- * Load a module from the project's node_modules directory.
18
- * Uses caching to ensure the same instance is returned for repeated calls.
19
- *
20
- * @param moduleName - The name of the module to load (e.g., '@elizaos/server')
21
- * @returns The loaded module
22
- * @throws Error if the module cannot be found in the project
23
- */
24
- load<T = any>(moduleName: string): Promise<T>;
25
- /**
26
- * Synchronously load a module from the project's node_modules directory.
27
- * Uses caching to ensure the same instance is returned for repeated calls.
28
- *
29
- * @param moduleName - The name of the module to load (e.g., '@elizaos/server')
30
- * @returns The loaded module
31
- * @throws Error if the module cannot be found in the project
32
- */
33
- loadSync<T = any>(moduleName: string): T;
34
- /**
35
- * Set up environment with proper module resolution paths.
36
- * This ensures the same local-first guarantees as server-manager.ts.
37
- */
38
- private setupEnvironment;
39
- /**
40
- * Clear the module cache. Useful for testing or hot reloading scenarios.
41
- */
42
- clearCache(): void;
43
- /**
44
- * Get the resolved path for a module without loading it.
45
- * Useful for debugging or verification.
46
- *
47
- * @param moduleName - The name of the module to resolve
48
- * @returns The resolved file path
49
- */
50
- resolve(moduleName: string): string;
51
- }
52
- /**
53
- * Get the default module loader instance for the current project.
54
- * Creates a new instance if one doesn't exist.
55
- */
56
- export declare function getModuleLoader(): ModuleLoader;
57
- /**
58
- * Convenience function to load a module using the default loader.
59
- *
60
- * @param moduleName - The name of the module to load
61
- * @returns The loaded module
62
- */
63
- export declare function loadModule<T = any>(moduleName: string): Promise<T>;
64
- /**
65
- * Convenience function to synchronously load a module using the default loader.
66
- *
67
- * @param moduleName - The name of the module to load
68
- * @returns The loaded module
69
- */
70
- export declare function loadModuleSync<T = any>(moduleName: string): T;
71
- //# sourceMappingURL=module-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-loader.d.ts","sourceRoot":"","sources":["../../src/utils/module-loader.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,CAAC,EAAE,MAAM;IAWhC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;;;;;;OAOG;IACG,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAgDnD;;;;;;;OAOG;IACH,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;IAgDxC;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAsBxB;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;CAGpC;AAKD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAK9C;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,CAE7D"}