@elizaos/cli 1.2.4 → 1.2.7
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/bun-exec-KJOLGZOL.js +21 -0
- package/dist/{chunk-2XI6N7KN.js → chunk-2ZF5OAMV.js} +322 -69
- package/dist/chunk-3YTIOEFK.js +202 -0
- package/dist/chunk-AQ6OMR2A.js +14 -0
- package/dist/{chunk-JZG5QBNT.js → chunk-E54G6FI7.js} +32 -6
- package/dist/{chunk-PSSTO76B.js → chunk-KKAK7OQA.js} +100 -104
- package/dist/chunk-Y5IA2UZ2.js +154 -0
- package/dist/commands/agent/actions/index.js +4 -3
- package/dist/commands/agent/index.js +4 -3
- package/dist/commands/create/actions/index.d.ts +6 -2
- package/dist/commands/create/actions/index.js +8 -7
- package/dist/commands/create/index.js +6 -6
- package/dist/commands/shared/index.js +1 -1
- package/dist/index.js +323 -258
- package/dist/{plugin-creator-5CER524N.js → plugin-creator-Y2NWASXI.js} +16 -15
- package/dist/{registry-SN5V2VXR.js → registry-K2OCCRXO.js} +4 -3
- package/dist/templates/plugin-quick-starter/README.md +214 -0
- package/dist/templates/plugin-quick-starter/bunfig.toml +10 -0
- package/dist/templates/plugin-quick-starter/package.json +76 -0
- package/dist/templates/plugin-quick-starter/scripts/install-test-deps.js +53 -0
- package/dist/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +209 -0
- package/dist/templates/plugin-quick-starter/src/__tests__/test-utils.ts +162 -0
- package/dist/templates/plugin-quick-starter/src/index.ts +4 -0
- package/dist/templates/plugin-quick-starter/src/plugin.ts +272 -0
- package/dist/templates/plugin-quick-starter/tsconfig.build.json +11 -0
- package/dist/templates/plugin-quick-starter/tsconfig.json +28 -0
- package/dist/templates/plugin-quick-starter/tsup.config.ts +20 -0
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/plugin-starter/scripts/install-test-deps.js +7 -3
- package/dist/templates/plugin-starter/src/__tests__/build-order.test.ts +51 -0
- package/dist/templates/plugin-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/dist/templates/plugin-starter/src/plugin.ts +13 -15
- package/dist/templates/plugin-starter/tsup.config.ts +1 -1
- package/dist/templates/plugin-starter/vite.config.ts +1 -1
- package/dist/templates/project-starter/package.json +4 -4
- package/dist/templates/project-starter/scripts/install-test-deps.js +7 -3
- package/dist/templates/project-starter/src/__tests__/build-order.test.ts +59 -0
- package/dist/templates/project-starter/src/__tests__/character-plugin-ordering.test.ts +11 -110
- package/dist/templates/project-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/dist/templates/project-starter/src/character.ts +14 -17
- package/dist/templates/project-starter/tsup.config.ts +1 -1
- package/dist/templates/project-tee-starter/package.json +3 -3
- package/dist/templates/project-tee-starter/src/character.ts +3 -0
- package/dist/{utils-DTW3XU6O.js → utils-QSRUVLAT.js} +4 -3
- package/package.json +6 -6
- package/templates/plugin-quick-starter/README.md +214 -0
- package/templates/plugin-quick-starter/bunfig.toml +10 -0
- package/templates/plugin-quick-starter/package.json +76 -0
- package/templates/plugin-quick-starter/scripts/install-test-deps.js +53 -0
- package/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +209 -0
- package/templates/plugin-quick-starter/src/__tests__/test-utils.ts +162 -0
- package/templates/plugin-quick-starter/src/index.ts +4 -0
- package/templates/plugin-quick-starter/src/plugin.ts +272 -0
- package/templates/plugin-quick-starter/tsconfig.build.json +11 -0
- package/templates/plugin-quick-starter/tsconfig.json +28 -0
- package/templates/plugin-quick-starter/tsup.config.ts +20 -0
- package/templates/plugin-starter/package.json +2 -2
- package/templates/plugin-starter/scripts/install-test-deps.js +7 -3
- package/templates/plugin-starter/src/__tests__/build-order.test.ts +51 -0
- package/templates/plugin-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/templates/plugin-starter/src/plugin.ts +13 -15
- package/templates/plugin-starter/tsup.config.ts +1 -1
- package/templates/plugin-starter/vite.config.ts +1 -1
- package/templates/project-starter/package.json +4 -4
- package/templates/project-starter/scripts/install-test-deps.js +7 -3
- package/templates/project-starter/src/__tests__/build-order.test.ts +59 -0
- package/templates/project-starter/src/__tests__/character-plugin-ordering.test.ts +11 -110
- package/templates/project-starter/src/__tests__/vite-config-utils.ts +33 -0
- package/templates/project-starter/src/character.ts +14 -17
- package/templates/project-starter/tsup.config.ts +1 -1
- package/templates/project-tee-starter/package.json +3 -3
- package/templates/project-tee-starter/src/character.ts +3 -0
- package/dist/chunk-5DYKNYEY.js +0 -2262
- package/dist/chunk-XB5JBFO6.js +0 -41
- package/dist/chunk-ZWDXDKSA.js +0 -281
- package/dist/setup-UQOWDHFN.js +0 -20
- package/dist/templates/plugin-starter/dist/index.js +0 -391
- package/dist/templates/plugin-starter/dist/index.js.map +0 -1
- package/templates/plugin-starter/dist/.vite/manifest.json +0 -11
- package/templates/plugin-starter/dist/index.d.ts +0 -14
- package/templates/plugin-starter/dist/index.js +0 -391
- package/templates/plugin-starter/dist/index.js.map +0 -1
|
@@ -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.7",
|
|
32
|
+
"@elizaos/core": "1.2.7",
|
|
33
|
+
"@elizaos/plugin-bootstrap": "1.2.7",
|
|
34
|
+
"@elizaos/plugin-sql": "1.2.7",
|
|
35
35
|
"@tanstack/react-query": "^5.29.0",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"react": "^18.3.1",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { existsSync, readFileSync } from 'fs';
|
|
4
|
-
import { execSync } from 'child_process';
|
|
5
4
|
import { join } from 'path';
|
|
6
5
|
|
|
7
6
|
const testDependencies = {
|
|
@@ -37,10 +36,15 @@ function installTestDependencies() {
|
|
|
37
36
|
|
|
38
37
|
console.log('Installing test dependencies...');
|
|
39
38
|
try {
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const proc = Bun.spawnSync(['bun', 'add', '-d', ...missingDeps], {
|
|
40
|
+
stdout: 'inherit',
|
|
41
|
+
stderr: 'inherit',
|
|
42
42
|
cwd: process.cwd(),
|
|
43
43
|
});
|
|
44
|
+
|
|
45
|
+
if (proc.exitCode !== 0) {
|
|
46
|
+
throw new Error('bun add command failed');
|
|
47
|
+
}
|
|
44
48
|
console.log('✓ Test dependencies installed successfully');
|
|
45
49
|
} catch (error) {
|
|
46
50
|
console.error('Failed to install test dependencies:', error.message);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { describe, expect, it, beforeAll, afterAll } from 'bun:test';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { $ } from 'bun';
|
|
5
|
+
import { getViteOutDir } from './vite-config-utils';
|
|
6
|
+
|
|
7
|
+
describe('Build Order Integration Test', () => {
|
|
8
|
+
const rootDir = path.resolve(__dirname, '../..');
|
|
9
|
+
const distDir = path.join(rootDir, 'dist');
|
|
10
|
+
let viteBuildDir: string;
|
|
11
|
+
const tsupBuildMarker = path.join(distDir, 'index.js'); // TSup creates this
|
|
12
|
+
|
|
13
|
+
beforeAll(async () => {
|
|
14
|
+
// Get the actual vite build directory from config
|
|
15
|
+
const viteOutDirRelative = await getViteOutDir(rootDir);
|
|
16
|
+
viteBuildDir = path.join(rootDir, viteOutDirRelative);
|
|
17
|
+
|
|
18
|
+
// Clean dist directory before test
|
|
19
|
+
if (fs.existsSync(distDir)) {
|
|
20
|
+
await fs.promises.rm(distDir, { recursive: true, force: true });
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
afterAll(async () => {
|
|
25
|
+
// Clean up after test
|
|
26
|
+
if (fs.existsSync(distDir)) {
|
|
27
|
+
await fs.promises.rm(distDir, { recursive: true, force: true });
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should ensure vite build outputs persist after tsup build', async () => {
|
|
32
|
+
// Run the full build process
|
|
33
|
+
await $`cd ${rootDir} && bun run build`;
|
|
34
|
+
|
|
35
|
+
// Check that both vite and tsup outputs exist
|
|
36
|
+
expect(fs.existsSync(viteBuildDir)).toBe(true);
|
|
37
|
+
expect(fs.existsSync(tsupBuildMarker)).toBe(true);
|
|
38
|
+
|
|
39
|
+
// Check vite built frontend files
|
|
40
|
+
const frontendFiles = fs.readdirSync(viteBuildDir);
|
|
41
|
+
expect(frontendFiles.length).toBeGreaterThan(0);
|
|
42
|
+
|
|
43
|
+
// Should have HTML entry point
|
|
44
|
+
expect(frontendFiles.some((file) => file.endsWith('.html'))).toBe(true);
|
|
45
|
+
|
|
46
|
+
// Should have assets directory (CSS/JS files are in assets/)
|
|
47
|
+
expect(frontendFiles.includes('assets')).toBe(true);
|
|
48
|
+
|
|
49
|
+
// Verify tsup also produced its expected outputs
|
|
50
|
+
const distFiles = fs.readdirSync(distDir);
|
|
51
|
+
|
|
52
|
+
// Should have tsup outputs (index.js)
|
|
53
|
+
expect(distFiles.some((file) => file === 'index.js')).toBe(true);
|
|
54
|
+
|
|
55
|
+
// Should still have vite build directory
|
|
56
|
+
const viteBuildDirName = path.basename(viteBuildDir);
|
|
57
|
+
expect(distFiles.includes(viteBuildDirName)).toBe(true);
|
|
58
|
+
}, 30000); // 30 second timeout for build process
|
|
59
|
+
});
|
|
@@ -55,49 +55,15 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
describe('
|
|
59
|
-
it('should have local-ai fallback condition that checks all AI providers', () => {
|
|
60
|
-
// Test the structure of the conditional logic by examining the character definition
|
|
61
|
-
const characterStr = character.toString();
|
|
62
|
-
|
|
63
|
-
// The local-ai plugin should be conditional on NO other AI providers being available
|
|
64
|
-
expect(typeof character.plugins).toBe('object');
|
|
65
|
-
expect(Array.isArray(character.plugins)).toBe(true);
|
|
66
|
-
|
|
67
|
-
// Test the logical structure - local AI may or may not be present depending on env
|
|
68
|
-
const hasOtherAiProviders = character.plugins.some((plugin) =>
|
|
69
|
-
[
|
|
70
|
-
'@elizaos/plugin-anthropic',
|
|
71
|
-
'@elizaos/plugin-openai',
|
|
72
|
-
'@elizaos/plugin-openrouter',
|
|
73
|
-
'@elizaos/plugin-ollama',
|
|
74
|
-
'@elizaos/plugin-google-genai',
|
|
75
|
-
].includes(plugin)
|
|
76
|
-
);
|
|
77
|
-
const hasLocalAi = character.plugins.includes('@elizaos/plugin-local-ai');
|
|
78
|
-
|
|
79
|
-
// If other AI providers exist, local-ai should not be present (and vice versa)
|
|
80
|
-
if (hasOtherAiProviders) {
|
|
81
|
-
expect(hasLocalAi).toBe(false);
|
|
82
|
-
} else {
|
|
83
|
-
expect(hasLocalAi).toBe(true);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
58
|
+
describe('Plugin Structure and Ordering', () => {
|
|
87
59
|
it('should structure embedding plugins after text-only plugins', () => {
|
|
88
60
|
const plugins = character.plugins;
|
|
89
61
|
|
|
90
62
|
// Find indices of key plugins
|
|
91
63
|
const sqlIndex = plugins.indexOf('@elizaos/plugin-sql');
|
|
92
|
-
const localAiIndex = plugins.indexOf('@elizaos/plugin-local-ai');
|
|
93
64
|
|
|
94
65
|
// SQL should be first
|
|
95
66
|
expect(sqlIndex).toBe(0);
|
|
96
|
-
|
|
97
|
-
// Local AI should be last when present
|
|
98
|
-
if (localAiIndex !== -1) {
|
|
99
|
-
expect(localAiIndex).toBe(plugins.length - 1);
|
|
100
|
-
}
|
|
101
67
|
});
|
|
102
68
|
});
|
|
103
69
|
|
|
@@ -116,7 +82,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
116
82
|
'@elizaos/plugin-openai',
|
|
117
83
|
'@elizaos/plugin-ollama',
|
|
118
84
|
'@elizaos/plugin-google-genai',
|
|
119
|
-
'@elizaos/plugin-local-ai',
|
|
120
85
|
];
|
|
121
86
|
|
|
122
87
|
// Platform plugins
|
|
@@ -144,24 +109,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
144
109
|
|
|
145
110
|
// Bootstrap should be present unless IGNORE_BOOTSTRAP is set
|
|
146
111
|
expect(plugins).toContain('@elizaos/plugin-bootstrap');
|
|
147
|
-
|
|
148
|
-
// Local AI is only present when no other AI providers are available
|
|
149
|
-
const hasOtherAiProviders = plugins.some((plugin) =>
|
|
150
|
-
[
|
|
151
|
-
'@elizaos/plugin-anthropic',
|
|
152
|
-
'@elizaos/plugin-openai',
|
|
153
|
-
'@elizaos/plugin-openrouter',
|
|
154
|
-
'@elizaos/plugin-ollama',
|
|
155
|
-
'@elizaos/plugin-google-genai',
|
|
156
|
-
].includes(plugin)
|
|
157
|
-
);
|
|
158
|
-
const hasLocalAi = plugins.includes('@elizaos/plugin-local-ai');
|
|
159
|
-
|
|
160
|
-
if (hasOtherAiProviders) {
|
|
161
|
-
expect(hasLocalAi).toBe(false);
|
|
162
|
-
} else {
|
|
163
|
-
expect(hasLocalAi).toBe(true);
|
|
164
|
-
}
|
|
165
112
|
});
|
|
166
113
|
|
|
167
114
|
it('should maintain proper ordering between plugin categories', () => {
|
|
@@ -170,14 +117,13 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
170
117
|
// Get indices of representative plugins from each category
|
|
171
118
|
const sqlIndex = plugins.indexOf('@elizaos/plugin-sql');
|
|
172
119
|
const bootstrapIndex = plugins.indexOf('@elizaos/plugin-bootstrap');
|
|
173
|
-
const localAiIndex = plugins.indexOf('@elizaos/plugin-local-ai');
|
|
174
120
|
|
|
175
121
|
// SQL should be first
|
|
176
122
|
expect(sqlIndex).toBe(0);
|
|
177
123
|
|
|
178
|
-
// Bootstrap should
|
|
179
|
-
if (bootstrapIndex !== -1
|
|
180
|
-
expect(bootstrapIndex).
|
|
124
|
+
// Bootstrap should be present
|
|
125
|
+
if (bootstrapIndex !== -1) {
|
|
126
|
+
expect(bootstrapIndex).toBeGreaterThan(sqlIndex);
|
|
181
127
|
}
|
|
182
128
|
});
|
|
183
129
|
});
|
|
@@ -193,8 +139,8 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
193
139
|
expect(plugins).toContain('@elizaos/plugin-sql');
|
|
194
140
|
expect(plugins).toContain('@elizaos/plugin-bootstrap');
|
|
195
141
|
|
|
196
|
-
//
|
|
197
|
-
const
|
|
142
|
+
// Should handle various AI providers
|
|
143
|
+
const hasAiProviders = plugins.some((plugin) =>
|
|
198
144
|
[
|
|
199
145
|
'@elizaos/plugin-anthropic',
|
|
200
146
|
'@elizaos/plugin-openai',
|
|
@@ -203,10 +149,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
203
149
|
'@elizaos/plugin-google-genai',
|
|
204
150
|
].includes(plugin)
|
|
205
151
|
);
|
|
206
|
-
|
|
207
|
-
if (!hasOtherAiProviders) {
|
|
208
|
-
expect(plugins).toContain('@elizaos/plugin-local-ai');
|
|
209
|
-
}
|
|
210
152
|
});
|
|
211
153
|
|
|
212
154
|
it('should include proper conditional checks for Twitter', () => {
|
|
@@ -242,7 +184,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
242
184
|
'@elizaos/plugin-openai',
|
|
243
185
|
'@elizaos/plugin-ollama',
|
|
244
186
|
'@elizaos/plugin-google-genai',
|
|
245
|
-
'@elizaos/plugin-local-ai',
|
|
246
187
|
];
|
|
247
188
|
|
|
248
189
|
// Check if any embedding plugins are present
|
|
@@ -257,28 +198,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
257
198
|
}
|
|
258
199
|
});
|
|
259
200
|
|
|
260
|
-
it('should place local-ai as final fallback when present', () => {
|
|
261
|
-
const plugins = character.plugins;
|
|
262
|
-
const localAiIndex = plugins.indexOf('@elizaos/plugin-local-ai');
|
|
263
|
-
|
|
264
|
-
// Local AI should be the last plugin when it's present (no other AI providers)
|
|
265
|
-
if (localAiIndex !== -1) {
|
|
266
|
-
expect(localAiIndex).toBe(plugins.length - 1);
|
|
267
|
-
} else {
|
|
268
|
-
// If local AI is not present, other AI providers should exist
|
|
269
|
-
const hasOtherAiProviders = plugins.some((plugin) =>
|
|
270
|
-
[
|
|
271
|
-
'@elizaos/plugin-anthropic',
|
|
272
|
-
'@elizaos/plugin-openai',
|
|
273
|
-
'@elizaos/plugin-openrouter',
|
|
274
|
-
'@elizaos/plugin-ollama',
|
|
275
|
-
'@elizaos/plugin-google-genai',
|
|
276
|
-
].includes(plugin)
|
|
277
|
-
);
|
|
278
|
-
expect(hasOtherAiProviders).toBe(true);
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
|
|
282
201
|
it('should maintain consistent plugin structure', () => {
|
|
283
202
|
// Test multiple evaluations for consistency
|
|
284
203
|
const plugins1 = character.plugins;
|
|
@@ -304,7 +223,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
304
223
|
'@elizaos/plugin-openai',
|
|
305
224
|
'@elizaos/plugin-ollama',
|
|
306
225
|
'@elizaos/plugin-google-genai',
|
|
307
|
-
'@elizaos/plugin-local-ai',
|
|
308
226
|
];
|
|
309
227
|
|
|
310
228
|
const textOnlyIndices = textOnlyPlugins
|
|
@@ -349,19 +267,14 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
349
267
|
'@elizaos/plugin-google-genai',
|
|
350
268
|
];
|
|
351
269
|
|
|
352
|
-
// In a complete setup,
|
|
270
|
+
// In a complete setup, at least one AI provider should be present
|
|
353
271
|
// Test the logical structure based on current environment
|
|
354
272
|
const hasOtherAiProviders = character.plugins.some((plugin) =>
|
|
355
273
|
allAiProviders.includes(plugin)
|
|
356
274
|
);
|
|
357
|
-
const hasLocalAi = character.plugins.includes('@elizaos/plugin-local-ai');
|
|
358
275
|
|
|
359
|
-
//
|
|
360
|
-
|
|
361
|
-
expect(hasLocalAi).toBe(false);
|
|
362
|
-
} else {
|
|
363
|
-
expect(hasLocalAi).toBe(true);
|
|
364
|
-
}
|
|
276
|
+
// At least one AI provider should be present
|
|
277
|
+
expect(hasOtherAiProviders).toBe(true);
|
|
365
278
|
});
|
|
366
279
|
|
|
367
280
|
it('should validate embedding vs text-only categorization', () => {
|
|
@@ -369,7 +282,6 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
369
282
|
'@elizaos/plugin-openai',
|
|
370
283
|
'@elizaos/plugin-ollama',
|
|
371
284
|
'@elizaos/plugin-google-genai',
|
|
372
|
-
'@elizaos/plugin-local-ai',
|
|
373
285
|
];
|
|
374
286
|
|
|
375
287
|
const textOnlyPlugins = ['@elizaos/plugin-anthropic', '@elizaos/plugin-openrouter'];
|
|
@@ -402,20 +314,9 @@ describe('Project Starter Character Plugin Ordering', () => {
|
|
|
402
314
|
'@elizaos/plugin-google-genai',
|
|
403
315
|
].includes(plugin)
|
|
404
316
|
);
|
|
405
|
-
const hasLocalAi = plugins.includes('@elizaos/plugin-local-ai');
|
|
406
|
-
|
|
407
|
-
// Either has other AI providers OR has local-ai fallback
|
|
408
|
-
expect(hasOtherAiProviders || hasLocalAi).toBe(true);
|
|
409
317
|
|
|
410
|
-
//
|
|
411
|
-
|
|
412
|
-
if (hasOtherAiProviders) {
|
|
413
|
-
// If other AI providers are present, local-ai should not be
|
|
414
|
-
expect(hasLocalAi).toBe(false);
|
|
415
|
-
} else {
|
|
416
|
-
// If no other AI providers, local-ai should be present as fallback
|
|
417
|
-
expect(hasLocalAi).toBe(true);
|
|
418
|
-
}
|
|
318
|
+
// Should have at least one AI provider
|
|
319
|
+
expect(hasOtherAiProviders).toBe(true);
|
|
419
320
|
});
|
|
420
321
|
});
|
|
421
322
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Extracts the Vite build.outDir from vite.config.ts
|
|
6
|
+
* Handles both relative and absolute paths, accounting for Vite's root directory
|
|
7
|
+
*/
|
|
8
|
+
export async function getViteOutDir(packageRoot: string): Promise<string> {
|
|
9
|
+
const viteConfigPath = path.join(packageRoot, 'vite.config.ts');
|
|
10
|
+
|
|
11
|
+
if (!fs.existsSync(viteConfigPath)) {
|
|
12
|
+
throw new Error(`vite.config.ts not found at ${viteConfigPath}`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Import the vite config dynamically
|
|
16
|
+
const configModule = await import(viteConfigPath);
|
|
17
|
+
const config =
|
|
18
|
+
typeof configModule.default === 'function'
|
|
19
|
+
? configModule.default({ command: 'build', mode: 'production' })
|
|
20
|
+
: configModule.default;
|
|
21
|
+
|
|
22
|
+
let outDir = config.build?.outDir || 'dist';
|
|
23
|
+
const viteRoot = config.root || '.';
|
|
24
|
+
|
|
25
|
+
// If outDir is relative, resolve it relative to the vite root
|
|
26
|
+
if (!path.isAbsolute(outDir)) {
|
|
27
|
+
const viteRootAbsolute = path.resolve(packageRoot, viteRoot);
|
|
28
|
+
outDir = path.resolve(viteRootAbsolute, outDir);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Ensure the path is relative to packageRoot for consistency
|
|
32
|
+
return path.relative(packageRoot, outDir);
|
|
33
|
+
}
|
|
@@ -13,28 +13,25 @@ export const character: Character = {
|
|
|
13
13
|
'@elizaos/plugin-sql',
|
|
14
14
|
|
|
15
15
|
// Text-only plugins (no embedding support)
|
|
16
|
-
...(process.env.ANTHROPIC_API_KEY ? ['@elizaos/plugin-anthropic'] : []),
|
|
17
|
-
...(process.env.OPENROUTER_API_KEY ? ['@elizaos/plugin-openrouter'] : []),
|
|
16
|
+
...(process.env.ANTHROPIC_API_KEY?.trim() ? ['@elizaos/plugin-anthropic'] : []),
|
|
17
|
+
...(process.env.OPENROUTER_API_KEY?.trim() ? ['@elizaos/plugin-openrouter'] : []),
|
|
18
18
|
|
|
19
|
-
// Embedding-capable plugins
|
|
20
|
-
...(process.env.OPENAI_API_KEY ? ['@elizaos/plugin-openai'] : []),
|
|
21
|
-
...(process.env.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
!process.env.OPENAI_API_KEY
|
|
26
|
-
? ['@elizaos/plugin-local-ai']
|
|
27
|
-
: []),
|
|
19
|
+
// Embedding-capable plugins (optional, based on available credentials)
|
|
20
|
+
...(process.env.OPENAI_API_KEY?.trim() ? ['@elizaos/plugin-openai'] : []),
|
|
21
|
+
...(process.env.GOOGLE_GENERATIVE_AI_API_KEY?.trim() ? ['@elizaos/plugin-google-genai'] : []),
|
|
22
|
+
|
|
23
|
+
// Ollama as fallback (only if no main LLM providers are configured)
|
|
24
|
+
...(process.env.OLLAMA_API_ENDPOINT?.trim() ? ['@elizaos/plugin-ollama'] : []),
|
|
28
25
|
|
|
29
26
|
// Platform plugins
|
|
30
|
-
...(process.env.DISCORD_API_TOKEN ? ['@elizaos/plugin-discord'] : []),
|
|
31
|
-
...(process.env.TWITTER_API_KEY &&
|
|
32
|
-
process.env.TWITTER_API_SECRET_KEY &&
|
|
33
|
-
process.env.TWITTER_ACCESS_TOKEN &&
|
|
34
|
-
process.env.TWITTER_ACCESS_TOKEN_SECRET
|
|
27
|
+
...(process.env.DISCORD_API_TOKEN?.trim() ? ['@elizaos/plugin-discord'] : []),
|
|
28
|
+
...(process.env.TWITTER_API_KEY?.trim() &&
|
|
29
|
+
process.env.TWITTER_API_SECRET_KEY?.trim() &&
|
|
30
|
+
process.env.TWITTER_ACCESS_TOKEN?.trim() &&
|
|
31
|
+
process.env.TWITTER_ACCESS_TOKEN_SECRET?.trim()
|
|
35
32
|
? ['@elizaos/plugin-twitter']
|
|
36
33
|
: []),
|
|
37
|
-
...(process.env.TELEGRAM_BOT_TOKEN ? ['@elizaos/plugin-telegram'] : []),
|
|
34
|
+
...(process.env.TELEGRAM_BOT_TOKEN?.trim() ? ['@elizaos/plugin-telegram'] : []),
|
|
38
35
|
|
|
39
36
|
// Bootstrap plugin
|
|
40
37
|
...(!process.env.IGNORE_BOOTSTRAP ? ['@elizaos/plugin-bootstrap'] : []),
|
|
@@ -5,7 +5,7 @@ export default defineConfig({
|
|
|
5
5
|
outDir: 'dist',
|
|
6
6
|
tsconfig: './tsconfig.build.json', // Use build-specific tsconfig
|
|
7
7
|
sourcemap: true,
|
|
8
|
-
clean:
|
|
8
|
+
clean: false,
|
|
9
9
|
format: ['esm'], // Ensure you're targeting CommonJS
|
|
10
10
|
dts: false, // Skip DTS generation to avoid external import issues // Ensure you're targeting CommonJS
|
|
11
11
|
external: [
|
|
@@ -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.7",
|
|
37
|
+
"@elizaos/core": "1.2.7",
|
|
38
38
|
"@elizaos/plugin-redpill": "1.0.3",
|
|
39
|
-
"@elizaos/plugin-sql": "1.2.
|
|
39
|
+
"@elizaos/plugin-sql": "1.2.7",
|
|
40
40
|
"@phala/dstack-sdk": "0.1.11",
|
|
41
41
|
"@solana/web3.js": "1.98.2",
|
|
42
42
|
"viem": "2.30.1",
|
|
@@ -32,6 +32,9 @@ export const mrTeeCharacter: Character = {
|
|
|
32
32
|
// Embedding-capable plugins after other AI plugins
|
|
33
33
|
'@elizaos/plugin-openai',
|
|
34
34
|
|
|
35
|
+
// Ollama as universal fallback (always included for local AI capabilities)
|
|
36
|
+
'@elizaos/plugin-ollama',
|
|
37
|
+
|
|
35
38
|
// Specialized Plugins
|
|
36
39
|
'@elizaos/plugin-tee',
|
|
37
40
|
|
|
@@ -113,12 +113,13 @@ import {
|
|
|
113
113
|
updateFile,
|
|
114
114
|
validateGitHubToken,
|
|
115
115
|
writeEnvFile
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-KKAK7OQA.js";
|
|
117
117
|
import {
|
|
118
118
|
runBunCommand
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-Y5IA2UZ2.js";
|
|
120
120
|
import "./chunk-F24MS2YR.js";
|
|
121
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-3YTIOEFK.js";
|
|
122
|
+
import "./chunk-AQ6OMR2A.js";
|
|
122
123
|
export {
|
|
123
124
|
NAV_BACK,
|
|
124
125
|
NAV_NEXT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "elizaOS CLI - Manage your AI agents and plugins",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"elizaos": "./dist/index.js"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"start": "bun run build &&
|
|
35
|
+
"start": "bun run build && bun dist/index.js start",
|
|
36
36
|
"build": "bun run src/scripts/copy-templates.ts && bun x tsup",
|
|
37
37
|
"lint": "prettier --write ./src",
|
|
38
38
|
"format": "prettier --write ./src",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"typescript": "5.8.3",
|
|
70
70
|
"vite": "^6.3.5"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "a39e204a9979a1056f60b175b381a031cd69ca25",
|
|
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.7",
|
|
78
|
+
"@elizaos/plugin-sql": "1.2.7",
|
|
79
|
+
"@elizaos/server": "1.2.7",
|
|
80
80
|
"bun": "^1.2.17",
|
|
81
81
|
"chalk": "^5.3.0",
|
|
82
82
|
"chokidar": "^4.0.3",
|