@elizaos/cli 1.6.2-alpha.17 → 1.6.2-alpha.18

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.
@@ -39,11 +39,11 @@
39
39
  "package.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@elizaos/core": "1.6.2-alpha.17",
42
+ "@elizaos/core": "1.6.2-alpha.18",
43
43
  "zod": "4.1.11"
44
44
  },
45
45
  "devDependencies": {
46
- "@elizaos/cli": "1.6.2-alpha.17",
46
+ "@elizaos/cli": "1.6.2-alpha.18",
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.17",
42
+ "@elizaos/core": "1.6.2-alpha.18",
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.17",
51
+ "@elizaos/cli": "1.6.2-alpha.18",
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.17",
31
- "@elizaos/client": "1.6.2-alpha.17",
32
- "@elizaos/core": "1.6.2-alpha.17",
33
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.17",
34
- "@elizaos/plugin-sql": "1.6.2-alpha.17",
35
- "@elizaos/server": "1.6.2-alpha.17",
30
+ "@elizaos/cli": "1.6.2-alpha.18",
31
+ "@elizaos/client": "1.6.2-alpha.18",
32
+ "@elizaos/core": "1.6.2-alpha.18",
33
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.18",
34
+ "@elizaos/plugin-sql": "1.6.2-alpha.18",
35
+ "@elizaos/server": "1.6.2-alpha.18",
36
36
  "@tanstack/react-query": "^5.29.0",
37
37
  "clsx": "^2.1.1",
38
38
  "react": "^18.3.1",
@@ -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: {
@@ -32,11 +32,11 @@
32
32
  "GUIDE.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@elizaos/cli": "1.6.2-alpha.17",
36
- "@elizaos/core": "1.6.2-alpha.17",
37
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.17",
35
+ "@elizaos/cli": "1.6.2-alpha.18",
36
+ "@elizaos/core": "1.6.2-alpha.18",
37
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.18",
38
38
  "@elizaos/plugin-redpill": "1.2.1",
39
- "@elizaos/plugin-sql": "1.6.2-alpha.17",
39
+ "@elizaos/plugin-sql": "1.6.2-alpha.18",
40
40
  "@phala/dstack-sdk": "0.1.11",
41
41
  "@solana/web3.js": "1.98.2",
42
42
  "@tanstack/react-query": "^5.29.0",
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.17";
6
+ export declare const CLI_VERSION = "1.6.2-alpha.18";
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-16T06:11:43.376Z";
9
+ export declare const BUILD_TIME = "2025-10-16T06:37:25.142Z";
10
10
  export declare const BUILD_ENV = "production";
11
11
  declare const _default: {
12
12
  version: string;
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.17';
7
+ export const CLI_VERSION = '1.6.2-alpha.18';
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-16T06:11:43.376Z';
12
+ export const BUILD_TIME = '2025-10-16T06:37:25.142Z';
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.17",
3
+ "version": "1.6.2-alpha.18",
4
4
  "description": "elizaOS CLI - Manage your AI agents and plugins",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -75,17 +75,17 @@
75
75
  "typescript": "5.9.2",
76
76
  "vite": "^7.1.7"
77
77
  },
78
- "gitHead": "66c7719b9bfd3511f484125ee98f37a31ee97108",
78
+ "gitHead": "6d6022cc97a0b1ce0909bfe8a7be10392677a416",
79
79
  "dependencies": {
80
80
  "@anthropic-ai/claude-code": "^2.0.1",
81
81
  "@anthropic-ai/sdk": "^0.65.0",
82
82
  "@clack/prompts": "^0.11.0",
83
- "@elizaos/api-client": "1.6.2-alpha.17",
84
- "@elizaos/core": "1.6.2-alpha.17",
85
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.17",
83
+ "@elizaos/api-client": "1.6.2-alpha.18",
84
+ "@elizaos/core": "1.6.2-alpha.18",
85
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.18",
86
86
  "@elizaos/plugin-openai": "1.5.15",
87
- "@elizaos/plugin-sql": "1.6.2-alpha.17",
88
- "@elizaos/server": "1.6.2-alpha.17",
87
+ "@elizaos/plugin-sql": "1.6.2-alpha.18",
88
+ "@elizaos/server": "1.6.2-alpha.18",
89
89
  "bun": "^1.2.21",
90
90
  "chalk": "^5.4.1",
91
91
  "chokidar": "^4.0.3",
@@ -39,11 +39,11 @@
39
39
  "package.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@elizaos/core": "1.6.2-alpha.17",
42
+ "@elizaos/core": "1.6.2-alpha.18",
43
43
  "zod": "4.1.11"
44
44
  },
45
45
  "devDependencies": {
46
- "@elizaos/cli": "1.6.2-alpha.17",
46
+ "@elizaos/cli": "1.6.2-alpha.18",
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.17",
42
+ "@elizaos/core": "1.6.2-alpha.18",
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.17",
51
+ "@elizaos/cli": "1.6.2-alpha.18",
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.17",
31
- "@elizaos/client": "1.6.2-alpha.17",
32
- "@elizaos/core": "1.6.2-alpha.17",
33
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.17",
34
- "@elizaos/plugin-sql": "1.6.2-alpha.17",
35
- "@elizaos/server": "1.6.2-alpha.17",
30
+ "@elizaos/cli": "1.6.2-alpha.18",
31
+ "@elizaos/client": "1.6.2-alpha.18",
32
+ "@elizaos/core": "1.6.2-alpha.18",
33
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.18",
34
+ "@elizaos/plugin-sql": "1.6.2-alpha.18",
35
+ "@elizaos/server": "1.6.2-alpha.18",
36
36
  "@tanstack/react-query": "^5.29.0",
37
37
  "clsx": "^2.1.1",
38
38
  "react": "^18.3.1",
@@ -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: {
@@ -32,11 +32,11 @@
32
32
  "GUIDE.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@elizaos/cli": "1.6.2-alpha.17",
36
- "@elizaos/core": "1.6.2-alpha.17",
37
- "@elizaos/plugin-bootstrap": "1.6.2-alpha.17",
35
+ "@elizaos/cli": "1.6.2-alpha.18",
36
+ "@elizaos/core": "1.6.2-alpha.18",
37
+ "@elizaos/plugin-bootstrap": "1.6.2-alpha.18",
38
38
  "@elizaos/plugin-redpill": "1.2.1",
39
- "@elizaos/plugin-sql": "1.6.2-alpha.17",
39
+ "@elizaos/plugin-sql": "1.6.2-alpha.18",
40
40
  "@phala/dstack-sdk": "0.1.11",
41
41
  "@solana/web3.js": "1.98.2",
42
42
  "@tanstack/react-query": "^5.29.0",