@elizaos/cli 1.6.2-alpha.9 → 1.6.2
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/README.md +3 -3
- package/dist/characters/eliza.d.ts +8 -7
- package/dist/characters/eliza.d.ts.map +1 -1
- package/dist/commands/deploy/actions/deploy-ecs.d.ts +10 -0
- package/dist/commands/deploy/actions/deploy-ecs.d.ts.map +1 -0
- package/dist/commands/deploy/actions/deploy.d.ts +9 -0
- package/dist/commands/deploy/actions/deploy.d.ts.map +1 -0
- package/dist/commands/deploy/index.d.ts +7 -0
- package/dist/commands/deploy/index.d.ts.map +1 -0
- package/dist/commands/deploy/types.d.ts +156 -0
- package/dist/commands/deploy/types.d.ts.map +1 -0
- package/dist/commands/deploy/utils/api-client.d.ts +71 -0
- package/dist/commands/deploy/utils/api-client.d.ts.map +1 -0
- package/dist/commands/deploy/utils/docker-build.d.ts +58 -0
- package/dist/commands/deploy/utils/docker-build.d.ts.map +1 -0
- package/dist/commands/dev/actions/dev-server.d.ts.map +1 -1
- package/dist/commands/scenario/src/plugin-parser.d.ts.map +1 -1
- package/dist/commands/scenario/src/runtime-factory.d.ts.map +1 -1
- package/dist/commands/start/index.d.ts.map +1 -1
- package/dist/commands/tee/eigen-wrapper.d.ts +3 -0
- package/dist/commands/tee/eigen-wrapper.d.ts.map +1 -0
- package/dist/commands/tee/index.d.ts.map +1 -1
- package/dist/commands/test/actions/e2e-tests.d.ts.map +1 -1
- package/dist/commands/test/index.d.ts.map +1 -1
- package/dist/index.js +18400 -9839
- package/dist/index.js.map +200 -54
- package/dist/templates/plugin-quick-starter/package.json +2 -2
- package/dist/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +54 -0
- package/dist/templates/plugin-quick-starter/src/plugin.ts +6 -5
- package/dist/templates/plugin-starter/README.md +1 -1
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/plugin-starter/src/plugin.ts +6 -4
- package/dist/templates/project-starter/README.md +1 -1
- package/dist/templates/project-starter/package.json +6 -6
- package/dist/templates/project-starter/src/character.ts +3 -0
- package/dist/templates/project-starter/src/plugin.ts +6 -4
- package/dist/templates/project-starter/tsconfig.json +1 -3
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/utils/copy-template.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +2 -2
- package/package.json +13 -7
- package/templates/plugin-quick-starter/package.json +2 -2
- package/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +54 -0
- package/templates/plugin-quick-starter/src/plugin.ts +6 -5
- package/templates/plugin-starter/README.md +1 -1
- package/templates/plugin-starter/package.json +2 -2
- package/templates/plugin-starter/src/plugin.ts +6 -4
- package/templates/project-starter/README.md +1 -1
- package/templates/project-starter/package.json +6 -6
- package/templates/project-starter/src/character.ts +3 -0
- package/templates/project-starter/src/plugin.ts +6 -4
- package/templates/project-starter/tsconfig.json +1 -3
- package/templates/project-tee-starter/package.json +4 -4
- package/dist/utils/module-loader.d.ts +0 -71
- package/dist/utils/module-loader.d.ts.map +0 -1
- package/dist/utils/port-handling.d.ts +0 -15
- package/dist/utils/port-handling.d.ts.map +0 -1
- package/dist/utils/port-validation.d.ts +0 -6
- 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
|
|
42
|
+
"@elizaos/core": "1.6.2",
|
|
43
43
|
"zod": "4.1.11"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@elizaos/cli": "1.6.2
|
|
46
|
+
"@elizaos/cli": "1.6.2",
|
|
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
|
-
|
|
193
|
-
|
|
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
|
|
195
|
+
throw new Error(
|
|
196
|
+
`Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
|
|
197
|
+
);
|
|
197
198
|
}
|
|
198
199
|
},
|
|
199
200
|
models: {
|
|
@@ -6,7 +6,7 @@ This is an ElizaOS plugin built with the official plugin starter template.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Create a new plugin (automatically adds "plugin-" prefix)
|
|
9
|
-
elizaos create
|
|
9
|
+
elizaos create --type plugin solana
|
|
10
10
|
# This creates: plugin-solana
|
|
11
11
|
# Dependencies are automatically installed and built
|
|
12
12
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"package.json"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elizaos/core": "1.6.2
|
|
42
|
+
"@elizaos/core": "1.6.2",
|
|
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
|
|
51
|
+
"@elizaos/cli": "1.6.2",
|
|
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
|
-
|
|
187
|
-
|
|
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
|
|
190
|
+
throw new Error(
|
|
191
|
+
`Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
|
|
192
|
+
);
|
|
191
193
|
}
|
|
192
194
|
},
|
|
193
195
|
models: {
|
|
@@ -15,7 +15,7 @@ This is the starter template for ElizaOS projects.
|
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
# Create a new project
|
|
18
|
-
elizaos create
|
|
18
|
+
elizaos create --type project my-project
|
|
19
19
|
# Dependencies are automatically installed and built
|
|
20
20
|
|
|
21
21
|
# Navigate to the project directory
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@elizaos/cli": "1.6.2
|
|
31
|
-
"@elizaos/client": "1.6.2
|
|
32
|
-
"@elizaos/core": "1.6.2
|
|
33
|
-
"@elizaos/plugin-bootstrap": "1.6.2
|
|
34
|
-
"@elizaos/plugin-sql": "1.6.2
|
|
35
|
-
"@elizaos/server": "1.6.2
|
|
30
|
+
"@elizaos/cli": "1.6.2",
|
|
31
|
+
"@elizaos/client": "1.6.2",
|
|
32
|
+
"@elizaos/core": "1.6.2",
|
|
33
|
+
"@elizaos/plugin-bootstrap": "1.6.2",
|
|
34
|
+
"@elizaos/plugin-sql": "1.6.2",
|
|
35
|
+
"@elizaos/server": "1.6.2",
|
|
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
|
-
|
|
206
|
-
|
|
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
|
|
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
|
|
36
|
-
"@elizaos/core": "1.6.2
|
|
37
|
-
"@elizaos/plugin-bootstrap": "1.6.2
|
|
35
|
+
"@elizaos/cli": "1.6.2",
|
|
36
|
+
"@elizaos/core": "1.6.2",
|
|
37
|
+
"@elizaos/plugin-bootstrap": "1.6.2",
|
|
38
38
|
"@elizaos/plugin-redpill": "1.2.1",
|
|
39
|
-
"@elizaos/plugin-sql": "1.6.2
|
|
39
|
+
"@elizaos/plugin-sql": "1.6.2",
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-template.d.ts","sourceRoot":"","sources":["../../src/utils/copy-template.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,EAAO,iBAgE9E;AAoBD;;GAEG;AACH,wBAAsB,YAAY,CAChC,YAAY,EAAE,SAAS,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,QAAQ,GAAG,cAAc,EAC/F,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"copy-template.d.ts","sourceRoot":"","sources":["../../src/utils/copy-template.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,EAAO,iBAgE9E;AAoBD;;GAEG;AACH,wBAAsB,YAAY,CAChC,YAAY,EAAE,SAAS,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,QAAQ,GAAG,cAAc,EAC/F,SAAS,EAAE,MAAM,iBAoHlB"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -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,
|
|
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
|
|
6
|
+
export declare const CLI_VERSION = "1.6.2";
|
|
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-
|
|
9
|
+
export declare const BUILD_TIME = "2025-10-19T13:18:44.811Z";
|
|
10
10
|
export declare const BUILD_ENV = "production";
|
|
11
11
|
declare const _default: {
|
|
12
12
|
version: string;
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,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
|
|
7
|
+
export const CLI_VERSION = '1.6.2';
|
|
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-
|
|
12
|
+
export const BUILD_TIME = '2025-10-19T13:18:44.811Z';
|
|
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
|
|
3
|
+
"version": "1.6.2",
|
|
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": "
|
|
78
|
+
"gitHead": "7eb8cea4326127306eb0fc8d66563f2c06b4f10c",
|
|
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
|
|
83
|
-
"@elizaos/core": "1.6.2
|
|
84
|
-
"@elizaos/plugin-bootstrap": "1.6.2
|
|
83
|
+
"@elizaos/api-client": "1.6.2",
|
|
84
|
+
"@elizaos/core": "1.6.2",
|
|
85
|
+
"@elizaos/plugin-bootstrap": "1.6.2",
|
|
85
86
|
"@elizaos/plugin-openai": "1.5.15",
|
|
86
|
-
"@elizaos/plugin-sql": "1.6.2
|
|
87
|
-
"@elizaos/server": "1.6.2
|
|
87
|
+
"@elizaos/plugin-sql": "1.6.2",
|
|
88
|
+
"@elizaos/server": "1.6.2",
|
|
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
|
|
42
|
+
"@elizaos/core": "1.6.2",
|
|
43
43
|
"zod": "4.1.11"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@elizaos/cli": "1.6.2
|
|
46
|
+
"@elizaos/cli": "1.6.2",
|
|
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
|
-
|
|
193
|
-
|
|
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
|
|
195
|
+
throw new Error(
|
|
196
|
+
`Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
|
|
197
|
+
);
|
|
197
198
|
}
|
|
198
199
|
},
|
|
199
200
|
models: {
|
|
@@ -6,7 +6,7 @@ This is an ElizaOS plugin built with the official plugin starter template.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Create a new plugin (automatically adds "plugin-" prefix)
|
|
9
|
-
elizaos create
|
|
9
|
+
elizaos create --type plugin solana
|
|
10
10
|
# This creates: plugin-solana
|
|
11
11
|
# Dependencies are automatically installed and built
|
|
12
12
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"package.json"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elizaos/core": "1.6.2
|
|
42
|
+
"@elizaos/core": "1.6.2",
|
|
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
|
|
51
|
+
"@elizaos/cli": "1.6.2",
|
|
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
|
-
|
|
187
|
-
|
|
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
|
|
190
|
+
throw new Error(
|
|
191
|
+
`Invalid plugin configuration: ${error instanceof Error ? error.message : String(error)}`
|
|
192
|
+
);
|
|
191
193
|
}
|
|
192
194
|
},
|
|
193
195
|
models: {
|
|
@@ -15,7 +15,7 @@ This is the starter template for ElizaOS projects.
|
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
# Create a new project
|
|
18
|
-
elizaos create
|
|
18
|
+
elizaos create --type project my-project
|
|
19
19
|
# Dependencies are automatically installed and built
|
|
20
20
|
|
|
21
21
|
# Navigate to the project directory
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@elizaos/cli": "1.6.2
|
|
31
|
-
"@elizaos/client": "1.6.2
|
|
32
|
-
"@elizaos/core": "1.6.2
|
|
33
|
-
"@elizaos/plugin-bootstrap": "1.6.2
|
|
34
|
-
"@elizaos/plugin-sql": "1.6.2
|
|
35
|
-
"@elizaos/server": "1.6.2
|
|
30
|
+
"@elizaos/cli": "1.6.2",
|
|
31
|
+
"@elizaos/client": "1.6.2",
|
|
32
|
+
"@elizaos/core": "1.6.2",
|
|
33
|
+
"@elizaos/plugin-bootstrap": "1.6.2",
|
|
34
|
+
"@elizaos/plugin-sql": "1.6.2",
|
|
35
|
+
"@elizaos/server": "1.6.2",
|
|
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
|
-
|
|
206
|
-
|
|
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
|
|
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
|
|
36
|
-
"@elizaos/core": "1.6.2
|
|
37
|
-
"@elizaos/plugin-bootstrap": "1.6.2
|
|
35
|
+
"@elizaos/cli": "1.6.2",
|
|
36
|
+
"@elizaos/core": "1.6.2",
|
|
37
|
+
"@elizaos/plugin-bootstrap": "1.6.2",
|
|
38
38
|
"@elizaos/plugin-redpill": "1.2.1",
|
|
39
|
-
"@elizaos/plugin-sql": "1.6.2
|
|
39
|
+
"@elizaos/plugin-sql": "1.6.2",
|
|
40
40
|
"@phala/dstack-sdk": "0.1.11",
|
|
41
41
|
"@solana/web3.js": "1.98.2",
|
|
42
42
|
"@tanstack/react-query": "^5.29.0",
|