@elizaos/cli 1.3.1 → 1.4.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.
Files changed (198) hide show
  1. package/README.md +47 -1
  2. package/dist/{bun-exec-6CQHTS4F.js → bun-exec-ULMPAIQC.js} +1 -1
  3. package/dist/{chunk-2ALAPQLV.js → chunk-D3QSET5H.js} +342 -360
  4. package/dist/{chunk-FDEDLANP.js → chunk-FQYWRHLX.js} +1 -1
  5. package/dist/{chunk-RM6LUTKD.js → chunk-FSSUAWXQ.js} +3 -3
  6. package/dist/chunk-GXWWPFBO.js +39 -0
  7. package/dist/{chunk-D3Q2UZLZ.js → chunk-I4L4T7QX.js} +1 -1
  8. package/dist/{chunk-KDNV7EA5.js → chunk-SMZBJQJR.js} +1 -1
  9. package/dist/commands/agent/actions/index.d.ts +5 -0
  10. package/dist/commands/agent/actions/index.js +4 -4
  11. package/dist/commands/agent/index.d.ts +2 -2
  12. package/dist/commands/agent/index.js +4 -4
  13. package/dist/commands/create/actions/index.js +5 -5
  14. package/dist/commands/create/index.js +6 -6
  15. package/dist/commands/shared/index.d.ts +11 -28
  16. package/dist/commands/shared/index.js +7 -3
  17. package/dist/index.js +599 -483
  18. package/dist/{plugin-creator-H26ZLR6H.js → plugin-creator-TCUFII32.js} +2 -2
  19. package/dist/{registry-N626N4VG.js → registry-RF6PW3EN.js} +4 -4
  20. package/dist/templates/plugin-quick-starter/README.md +52 -10
  21. package/dist/templates/plugin-quick-starter/package.json +10 -3
  22. package/dist/templates/plugin-quick-starter/src/__tests__/e2e/README.md +140 -0
  23. package/dist/templates/plugin-quick-starter/src/__tests__/e2e/plugin-quick-starter.e2e.ts +339 -0
  24. package/dist/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +537 -146
  25. package/dist/templates/plugin-quick-starter/src/__tests__/test-utils.ts +316 -115
  26. package/dist/templates/plugin-quick-starter/src/plugin.ts +20 -26
  27. package/dist/templates/plugin-starter/README.md +124 -49
  28. package/dist/templates/plugin-starter/package.json +10 -3
  29. package/dist/templates/plugin-starter/src/__tests__/e2e/README.md +44 -9
  30. package/{templates/plugin-starter/src/__tests__/e2e/starter-plugin.ts → dist/templates/plugin-starter/src/__tests__/e2e/plugin-starter.e2e.ts} +13 -20
  31. package/dist/templates/plugin-starter/src/__tests__/integration.test.ts +13 -13
  32. package/dist/templates/plugin-starter/src/__tests__/plugin.test.ts +556 -129
  33. package/dist/templates/plugin-starter/src/__tests__/test-utils.ts +347 -115
  34. package/dist/templates/plugin-starter/src/plugin.ts +21 -27
  35. package/dist/templates/project-starter/README.md +25 -12
  36. package/dist/templates/project-starter/package.json +4 -4
  37. package/dist/templates/project-starter/src/__tests__/actions.test.ts +2 -2
  38. package/dist/templates/project-starter/src/__tests__/e2e/README.md +103 -0
  39. package/dist/templates/project-starter/src/__tests__/e2e/project-starter.e2e.ts +575 -0
  40. package/dist/templates/project-starter/src/__tests__/env.test.ts +3 -1
  41. package/dist/templates/project-starter/src/__tests__/file-structure.test.ts +3 -2
  42. package/dist/templates/project-starter/src/__tests__/integration.test.ts +2 -2
  43. package/dist/templates/project-starter/src/__tests__/models.test.ts +3 -3
  44. package/dist/templates/project-starter/src/__tests__/plugin.test.ts +3 -3
  45. package/dist/templates/project-starter/src/__tests__/provider.test.ts +2 -2
  46. package/dist/templates/project-starter/src/index.ts +4 -3
  47. package/dist/templates/project-starter/src/plugin.ts +5 -5
  48. package/dist/templates/project-starter/tsup.config.ts +2 -1
  49. package/dist/templates/project-tee-starter/.dockerignore +64 -14
  50. package/dist/templates/project-tee-starter/Dockerfile +9 -5
  51. package/dist/templates/project-tee-starter/GUIDE.md +103 -42
  52. package/dist/templates/project-tee-starter/README.md +83 -24
  53. package/dist/templates/project-tee-starter/docker-compose.yaml +5 -2
  54. package/dist/templates/{plugin-starter/dist → project-tee-starter}/index.html +3 -3
  55. package/dist/templates/project-tee-starter/package.json +34 -14
  56. package/dist/templates/project-tee-starter/postcss.config.js +3 -0
  57. package/dist/templates/project-tee-starter/scripts/install-test-deps.js +52 -0
  58. package/dist/templates/project-tee-starter/scripts/test-all.sh +82 -0
  59. package/dist/templates/project-tee-starter/src/__tests__/build-order.test.ts +62 -0
  60. package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/character.test.ts +20 -18
  61. package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/config.test.ts +11 -4
  62. package/dist/templates/project-tee-starter/src/__tests__/e2e/README.md +128 -0
  63. package/dist/templates/project-tee-starter/src/__tests__/e2e/project-tee-starter.e2e.ts +280 -0
  64. package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/env.test.ts +3 -2
  65. package/{templates/project-tee-starter → dist/templates/project-tee-starter/src}/__tests__/error-handling.test.ts +2 -2
  66. package/{templates/project-tee-starter → dist/templates/project-tee-starter/src}/__tests__/events.test.ts +1 -1
  67. package/{templates/project-tee-starter → dist/templates/project-tee-starter/src}/__tests__/file-structure.test.ts +16 -5
  68. package/dist/templates/project-tee-starter/src/__tests__/frontend.test.ts +459 -0
  69. package/{templates/project-tee-starter → dist/templates/project-tee-starter/src}/__tests__/integration.test.ts +2 -2
  70. package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/models.test.ts +1 -1
  71. package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/plugin.test.ts +5 -3
  72. package/{templates/project-tee-starter → dist/templates/project-tee-starter/src}/__tests__/provider.test.ts +2 -2
  73. package/dist/templates/project-tee-starter/src/__tests__/routes.test.ts +30 -0
  74. package/dist/templates/project-tee-starter/src/__tests__/tee-validation.test.ts +295 -0
  75. package/{templates/project-tee-starter → dist/templates/project-tee-starter/src}/__tests__/test-utils.ts +2 -2
  76. package/dist/templates/project-tee-starter/src/__tests__/vite-config-utils.ts +51 -0
  77. package/dist/templates/project-tee-starter/src/frontend/index.css +106 -0
  78. package/dist/templates/project-tee-starter/src/frontend/index.html +20 -0
  79. package/dist/templates/project-tee-starter/src/frontend/index.tsx +370 -0
  80. package/dist/templates/project-tee-starter/src/frontend/panels.tsx +17 -0
  81. package/dist/templates/project-tee-starter/src/frontend/utils.ts +6 -0
  82. package/dist/templates/project-tee-starter/src/index.ts +8 -6
  83. package/dist/templates/project-tee-starter/src/plugin.ts +223 -61
  84. package/dist/templates/project-tee-starter/tailwind.config.js +62 -0
  85. package/dist/templates/project-tee-starter/tsconfig.build.json +2 -2
  86. package/dist/templates/project-tee-starter/tsconfig.json +8 -5
  87. package/dist/templates/project-tee-starter/tsup.config.ts +3 -2
  88. package/dist/templates/project-tee-starter/vite.config.ts +39 -0
  89. package/dist/url-utils-CKc_Ebt_.d.ts +35 -0
  90. package/dist/{utils-H66532NB.js → utils-5HPZSIF6.js} +4 -4
  91. package/package.json +7 -6
  92. package/templates/plugin-quick-starter/README.md +52 -10
  93. package/templates/plugin-quick-starter/package.json +10 -3
  94. package/templates/plugin-quick-starter/src/__tests__/e2e/README.md +140 -0
  95. package/templates/plugin-quick-starter/src/__tests__/e2e/plugin-quick-starter.e2e.ts +339 -0
  96. package/templates/plugin-quick-starter/src/__tests__/plugin.test.ts +537 -146
  97. package/templates/plugin-quick-starter/src/__tests__/test-utils.ts +316 -115
  98. package/templates/plugin-quick-starter/src/plugin.ts +20 -26
  99. package/templates/plugin-starter/README.md +124 -49
  100. package/templates/plugin-starter/package.json +10 -3
  101. package/templates/plugin-starter/src/__tests__/e2e/README.md +44 -9
  102. package/{dist/templates/plugin-starter/src/__tests__/e2e/starter-plugin.ts → templates/plugin-starter/src/__tests__/e2e/plugin-starter.e2e.ts} +13 -20
  103. package/templates/plugin-starter/src/__tests__/integration.test.ts +13 -13
  104. package/templates/plugin-starter/src/__tests__/plugin.test.ts +556 -129
  105. package/templates/plugin-starter/src/__tests__/test-utils.ts +347 -115
  106. package/templates/plugin-starter/src/plugin.ts +21 -27
  107. package/templates/project-starter/README.md +25 -12
  108. package/templates/project-starter/package.json +4 -4
  109. package/templates/project-starter/src/__tests__/actions.test.ts +2 -2
  110. package/templates/project-starter/src/__tests__/e2e/README.md +103 -0
  111. package/templates/project-starter/src/__tests__/e2e/project-starter.e2e.ts +575 -0
  112. package/templates/project-starter/src/__tests__/env.test.ts +3 -1
  113. package/templates/project-starter/src/__tests__/file-structure.test.ts +3 -2
  114. package/templates/project-starter/src/__tests__/integration.test.ts +2 -2
  115. package/templates/project-starter/src/__tests__/models.test.ts +3 -3
  116. package/templates/project-starter/src/__tests__/plugin.test.ts +3 -3
  117. package/templates/project-starter/src/__tests__/provider.test.ts +2 -2
  118. package/templates/project-starter/src/index.ts +4 -3
  119. package/templates/project-starter/src/plugin.ts +5 -5
  120. package/templates/project-starter/tsup.config.ts +2 -1
  121. package/templates/project-tee-starter/.dockerignore +64 -14
  122. package/templates/project-tee-starter/Dockerfile +9 -5
  123. package/templates/project-tee-starter/GUIDE.md +103 -42
  124. package/templates/project-tee-starter/README.md +83 -24
  125. package/templates/project-tee-starter/docker-compose.yaml +5 -2
  126. package/templates/{plugin-starter/dist → project-tee-starter}/index.html +3 -3
  127. package/templates/project-tee-starter/package.json +34 -14
  128. package/templates/project-tee-starter/postcss.config.js +3 -0
  129. package/templates/project-tee-starter/scripts/install-test-deps.js +52 -0
  130. package/templates/project-tee-starter/scripts/test-all.sh +82 -0
  131. package/templates/project-tee-starter/src/__tests__/build-order.test.ts +62 -0
  132. package/templates/project-tee-starter/{__tests__ → src/__tests__}/character.test.ts +20 -18
  133. package/templates/project-tee-starter/{__tests__ → src/__tests__}/config.test.ts +11 -4
  134. package/templates/project-tee-starter/src/__tests__/e2e/README.md +128 -0
  135. package/templates/project-tee-starter/src/__tests__/e2e/project-tee-starter.e2e.ts +280 -0
  136. package/templates/project-tee-starter/{__tests__ → src/__tests__}/env.test.ts +3 -2
  137. package/{dist/templates/project-tee-starter → templates/project-tee-starter/src}/__tests__/error-handling.test.ts +2 -2
  138. package/{dist/templates/project-tee-starter → templates/project-tee-starter/src}/__tests__/events.test.ts +1 -1
  139. package/{dist/templates/project-tee-starter → templates/project-tee-starter/src}/__tests__/file-structure.test.ts +16 -5
  140. package/templates/project-tee-starter/src/__tests__/frontend.test.ts +459 -0
  141. package/{dist/templates/project-tee-starter → templates/project-tee-starter/src}/__tests__/integration.test.ts +2 -2
  142. package/templates/project-tee-starter/{__tests__ → src/__tests__}/models.test.ts +1 -1
  143. package/templates/project-tee-starter/{__tests__ → src/__tests__}/plugin.test.ts +5 -3
  144. package/{dist/templates/project-tee-starter → templates/project-tee-starter/src}/__tests__/provider.test.ts +2 -2
  145. package/templates/project-tee-starter/src/__tests__/routes.test.ts +30 -0
  146. package/templates/project-tee-starter/src/__tests__/tee-validation.test.ts +295 -0
  147. package/{dist/templates/project-tee-starter → templates/project-tee-starter/src}/__tests__/test-utils.ts +2 -2
  148. package/templates/project-tee-starter/src/__tests__/vite-config-utils.ts +51 -0
  149. package/templates/project-tee-starter/src/frontend/index.css +106 -0
  150. package/templates/project-tee-starter/src/frontend/index.html +20 -0
  151. package/templates/project-tee-starter/src/frontend/index.tsx +370 -0
  152. package/templates/project-tee-starter/src/frontend/panels.tsx +17 -0
  153. package/templates/project-tee-starter/src/frontend/utils.ts +6 -0
  154. package/templates/project-tee-starter/src/index.ts +8 -6
  155. package/templates/project-tee-starter/src/plugin.ts +223 -61
  156. package/templates/project-tee-starter/tailwind.config.js +62 -0
  157. package/templates/project-tee-starter/tsconfig.build.json +2 -2
  158. package/templates/project-tee-starter/tsconfig.json +8 -5
  159. package/templates/project-tee-starter/tsup.config.ts +3 -2
  160. package/templates/project-tee-starter/vite.config.ts +39 -0
  161. package/dist/chunk-4O6EZU37.js +0 -14
  162. package/dist/migration-guides/advanced-migration-guide.md +0 -459
  163. package/dist/migration-guides/completion-requirements.md +0 -379
  164. package/dist/migration-guides/integrated-migration-loop.md +0 -392
  165. package/dist/migration-guides/migration-guide.md +0 -712
  166. package/dist/migration-guides/prompt-and-generation-guide.md +0 -702
  167. package/dist/migration-guides/state-and-providers-guide.md +0 -544
  168. package/dist/migration-guides/testing-guide.md +0 -1021
  169. package/dist/templates/plugin-starter/dist/assets/index-CgkejLs_.css +0 -1
  170. package/dist/templates/plugin-starter/dist/assets/index-D1cHX53P.js +0 -49
  171. package/dist/templates/plugin-starter/dist/index.js +0 -387
  172. package/dist/templates/plugin-starter/dist/index.js.map +0 -1
  173. package/dist/templates/plugin-starter/src/tests.ts +0 -6
  174. package/dist/templates/project-starter/src/__tests__/e2e/index.ts +0 -14
  175. package/dist/templates/project-starter/src/__tests__/e2e/natural-language.test.ts +0 -246
  176. package/dist/templates/project-starter/src/__tests__/e2e/project.test.ts +0 -155
  177. package/dist/templates/project-starter/src/__tests__/e2e/starter-plugin.test.ts +0 -421
  178. package/dist/templates/project-tee-starter/__tests__/routes.test.ts +0 -21
  179. package/dist/templates/project-tee-starter/e2e/project.test.ts +0 -38
  180. package/dist/templates/project-tee-starter/e2e/starter-plugin.test.ts +0 -92
  181. package/templates/plugin-starter/dist/.vite/manifest.json +0 -11
  182. package/templates/plugin-starter/dist/assets/index-CgkejLs_.css +0 -1
  183. package/templates/plugin-starter/dist/assets/index-D1cHX53P.js +0 -49
  184. package/templates/plugin-starter/dist/index.d.ts +0 -14
  185. package/templates/plugin-starter/dist/index.js +0 -387
  186. package/templates/plugin-starter/dist/index.js.map +0 -1
  187. package/templates/plugin-starter/src/tests.ts +0 -6
  188. package/templates/project-starter/src/__tests__/e2e/index.ts +0 -14
  189. package/templates/project-starter/src/__tests__/e2e/natural-language.test.ts +0 -246
  190. package/templates/project-starter/src/__tests__/e2e/project.test.ts +0 -155
  191. package/templates/project-starter/src/__tests__/e2e/starter-plugin.test.ts +0 -421
  192. package/templates/project-tee-starter/__tests__/routes.test.ts +0 -21
  193. package/templates/project-tee-starter/e2e/project.test.ts +0 -38
  194. package/templates/project-tee-starter/e2e/starter-plugin.test.ts +0 -92
  195. /package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/actions.test.ts +0 -0
  196. /package/dist/templates/project-tee-starter/{__tests__ → src/__tests__}/utils/core-test-utils.ts +0 -0
  197. /package/templates/project-tee-starter/{__tests__ → src/__tests__}/actions.test.ts +0 -0
  198. /package/templates/project-tee-starter/{__tests__ → src/__tests__}/utils/core-test-utils.ts +0 -0
@@ -1,23 +1,24 @@
1
1
  import { logger, type IAgentRuntime, type Project, type ProjectAgent } from '@elizaos/core';
2
2
  import starterPlugin from './plugin.ts';
3
3
  import { character } from './character.ts';
4
+ import { ProjectStarterTestSuite } from './__tests__/e2e/project-starter.e2e';
4
5
 
5
6
  const initCharacter = ({ runtime }: { runtime: IAgentRuntime }) => {
6
7
  logger.info('Initializing character');
7
- logger.info('Name: ', character.name);
8
+ logger.info({ name: character.name }, 'Name:');
8
9
  };
9
10
 
10
11
  export const projectAgent: ProjectAgent = {
11
12
  character,
12
13
  init: async (runtime: IAgentRuntime) => await initCharacter({ runtime }),
13
14
  // plugins: [starterPlugin], <-- Import custom plugins here
15
+ tests: [ProjectStarterTestSuite], // Export tests from ProjectAgent
14
16
  };
17
+
15
18
  const project: Project = {
16
19
  agents: [projectAgent],
17
20
  };
18
21
 
19
- // Export test suites for the test runner
20
- export { testSuites } from './__tests__/e2e';
21
22
  export { character } from './character.ts';
22
23
 
23
24
  export default project;
@@ -95,7 +95,7 @@ const helloWorldAction: Action = {
95
95
  success: true,
96
96
  };
97
97
  } catch (error) {
98
- logger.error('Error in HELLO_WORLD action:', error);
98
+ logger.error({ error }, 'Error in HELLO_WORLD action:');
99
99
 
100
100
  return {
101
101
  text: 'Failed to send hello world greeting',
@@ -248,28 +248,28 @@ const plugin: Plugin = {
248
248
  async (params) => {
249
249
  logger.info('MESSAGE_RECEIVED event received');
250
250
  // print the keys
251
- logger.info(Object.keys(params));
251
+ logger.info({ keys: Object.keys(params) }, 'MESSAGE_RECEIVED param keys');
252
252
  },
253
253
  ],
254
254
  VOICE_MESSAGE_RECEIVED: [
255
255
  async (params) => {
256
256
  logger.info('VOICE_MESSAGE_RECEIVED event received');
257
257
  // print the keys
258
- logger.info(Object.keys(params));
258
+ logger.info({ keys: Object.keys(params) }, 'VOICE_MESSAGE_RECEIVED param keys');
259
259
  },
260
260
  ],
261
261
  WORLD_CONNECTED: [
262
262
  async (params) => {
263
263
  logger.info('WORLD_CONNECTED event received');
264
264
  // print the keys
265
- logger.info(Object.keys(params));
265
+ logger.info({ keys: Object.keys(params) }, 'WORLD_CONNECTED param keys');
266
266
  },
267
267
  ],
268
268
  WORLD_JOINED: [
269
269
  async (params) => {
270
270
  logger.info('WORLD_JOINED event received');
271
271
  // print the keys
272
- logger.info(Object.keys(params));
272
+ logger.info({ keys: Object.keys(params) }, 'WORLD_JOINED param keys');
273
273
  },
274
274
  ],
275
275
  },
@@ -7,13 +7,14 @@ export default defineConfig({
7
7
  sourcemap: true,
8
8
  clean: false,
9
9
  format: ['esm'], // Ensure you're targeting CommonJS
10
- dts: false, // Skip DTS generation to avoid external import issues // Ensure you're targeting CommonJS
10
+ dts: true, // require DTS so we get d.ts in the dist folder on npm
11
11
  external: [
12
12
  'dotenv', // Externalize dotenv to prevent bundling
13
13
  'fs', // Externalize fs to use Node.js built-in module
14
14
  'path', // Externalize other built-ins if necessary
15
15
  'https',
16
16
  'http',
17
+ '@elizaos/core',
17
18
  'zod',
18
19
  ],
19
20
  });
@@ -1,20 +1,70 @@
1
- # Ignore node_modules from the build context
2
- node_modules
1
+ # Git files
2
+ .git
3
+ .gitignore
3
4
 
4
- # Ignore logs and temporary files
5
+ # Logs
5
6
  *.log
6
- *.tmp
7
- .DS_Store
7
+ logs/
8
8
 
9
- # Ignore Git files and metadata
10
- .gitignore
9
+ # Runtime data
10
+ pids
11
+ *.pid
12
+ *.seed
13
+ *.pid.lock
11
14
 
12
- # Ignore IDE and editor config files
13
- .vscode
14
- .idea
15
+ # Coverage
16
+ coverage/
17
+ .nyc_output/
18
+
19
+ # IDEs
20
+ .vscode/
21
+ .idea/
15
22
  *.swp
23
+ *.swo
24
+
25
+ # OS files
26
+ .DS_Store
27
+ Thumbs.db
28
+
29
+ # Build outputs (we'll build fresh in Docker)
30
+ dist/
31
+ build/
32
+ *.tsbuildinfo
33
+
34
+ # Test files
35
+ **/__tests__/
36
+ **/*.test.ts
37
+ **/*.test.tsx
38
+ **/*.spec.ts
39
+ **/*.spec.tsx
40
+ # Cypress directories removed
41
+
42
+ # Development files
43
+ **/*.map
44
+ .env.local
45
+ .env.development
46
+ .env.test
47
+
48
+ # Documentation
49
+ *.md
50
+ docs/
51
+ GUIDE.md
52
+ PR_REPORT.md
53
+
54
+ # Temporary files
55
+ tmp/
56
+ temp/
57
+ .cache/
58
+
59
+ # Package manager files (we'll use the ones in builder)
60
+ **/node_modules/
61
+ .pnp
62
+ .pnp.js
16
63
 
17
- # Ignore build artifacts from the host
18
- dist
19
- build
20
- .env
64
+ # ElizaOS specific
65
+ .eliza/
66
+ .elizadb/
67
+ pglite/
68
+ cache/
69
+ *.db
70
+ *.pglite
@@ -19,11 +19,10 @@ RUN npm install -g bun@1.2.5 turbo@2.3.3
19
19
 
20
20
  RUN ln -s /usr/bin/python3 /usr/bin/python
21
21
 
22
- COPY package.json tsconfig.json tsconfig.build.json tsup.config.ts ./
22
+ COPY bunfig.toml index.html package.json postcss.config.js tailwind.config.js tsconfig.json tsconfig.build.json tsup.config.ts vite.config.ts ./
23
23
  COPY src ./src
24
24
  COPY assets ./assets
25
- COPY elizadb ./elizadb
26
- COPY knowledge ./knowledge
25
+ COPY scripts ./scripts
27
26
 
28
27
  RUN bun install --no-cache
29
28
 
@@ -47,16 +46,21 @@ RUN apt-get update && \
47
46
 
48
47
  RUN npm install -g bun@1.2.5 turbo@2.3.3
49
48
 
49
+ COPY --from=builder /app/bunfig.toml ./bunfig.toml
50
+ # Cypress config removed
51
+ COPY --from=builder /app/index.html ./index.html
52
+ COPY --from=builder /app/postcss.config.js ./postcss.config.js
50
53
  COPY --from=builder /app/package.json ./
51
54
  COPY --from=builder /app/tsconfig.json ./
52
55
  COPY --from=builder /app/tsconfig.build.json ./
53
56
  COPY --from=builder /app/tsup.config.ts ./
57
+ COPY --from=builder /app/tailwind.config.js ./tailwind.config.js
58
+ COPY --from=builder /app/vite.config.ts ./vite.config.ts
54
59
  COPY --from=builder /app/node_modules ./node_modules
55
60
  COPY --from=builder /app/dist ./dist
56
- COPY --from=builder /app/elizadb ./elizadb
57
- COPY --from=builder /app/knowledge ./knowledge
58
61
  COPY --from=builder /app/assets ./assets
59
62
  COPY --from=builder /app/src ./src
63
+ COPY --from=builder /app/scripts ./scripts
60
64
 
61
65
  ENV NODE_ENV=production
62
66
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Mr. TEE** is the TEE Security Drill Sergeant, a battle-hardened character who forges secure, paranoid developers through tough love and cryptographic discipline. He embodies the spirit of Mr. T while preaching the gospel of hardware-based security.
6
6
 
7
- ### Core Traits:
7
+ ### Core Traits
8
8
 
9
9
  - **Personality**: No-nonsense drill sergeant with Mr. T's trademark grit
10
10
  - **Mission**: Transform developers into paranoid security experts
@@ -19,7 +19,7 @@ Mr. TEE uses the **@elizaos/plugin-tee** package's built-in `remoteAttestationAc
19
19
  - Provide attestation quotes with supporting data
20
20
  - Verify the secure enclave environment
21
21
 
22
- ### Example Attestation Requests:
22
+ ### Example Attestation Requests
23
23
 
24
24
  - "Can you provide proof that you're running in a secure environment?"
25
25
  - "Generate an attestation report"
@@ -28,6 +28,26 @@ Mr. TEE uses the **@elizaos/plugin-tee** package's built-in `remoteAttestationAc
28
28
 
29
29
  ## Configuration Steps
30
30
 
31
+ ### Prerequisites
32
+
33
+ Before starting deployment, ensure you have:
34
+
35
+ 1. **ElizaOS CLI installed**:
36
+
37
+ ```bash
38
+ npm install -g @elizaos/cli
39
+ ```
40
+
41
+ 2. **Docker Desktop**:
42
+
43
+ - Install Docker Desktop for your OS
44
+ - Start Docker Desktop
45
+ - Login to Docker Hub: `docker login`
46
+
47
+ 3. **Phala Cloud Account** (for TEE deployments):
48
+ - Create account at <https://dashboard.phala.network>
49
+ - Get your API key from the dashboard
50
+
31
51
  ### 1. Environment Variables
32
52
 
33
53
  Configure the following in your `.env` file:
@@ -54,46 +74,52 @@ REDPILL_API_KEY=your_redpill_key
54
74
  #### Local Development (No TEE)
55
75
 
56
76
  ```bash
57
- # Set TEE_MODE=NONE for development
77
+ # Set TEE_MODE=LOCAL or DOCKER for development
58
78
  bun install
59
79
  bun run dev
60
80
  ```
61
81
 
62
- #### Phala dStack Deployment (Cloud TEE)
82
+ #### Phala Cloud Deployment (Production TEE)
63
83
 
64
84
  ```bash
65
- # Install dstack CLI
66
- npm i -g phala
67
-
68
- # Deploy with TEE_MODE=PRODUCTION
69
- phala cvms create -c docker-compose.yaml --env-file .env
85
+ # Prerequisites:
86
+ # 1. Install ElizaOS CLI: npm install -g @elizaos/cli
87
+ # 2. Ensure Docker is running and you're logged in via Docker CLI
88
+ # 3. Set TEE_MODE=PRODUCTION in your .env file
89
+
90
+ # Step 1: Login to Phala Cloud (get API key from Phala Cloud Dashboard)
91
+ elizaos tee phala auth login
92
+
93
+ # Step 2: Build Docker Image for TEE deployment
94
+ elizaos tee phala docker build
95
+
96
+ # Step 3: Push Docker image to DockerHub
97
+ elizaos tee phala docker push
98
+
99
+ # Step 4: Create CVM (Confidential Virtual Machine) instance
100
+ elizaos tee phala cvms create \
101
+ -n elizaos-tee \
102
+ -c docker-compose.yaml \
103
+ --vcpu 2 \
104
+ --memory 4192 \
105
+ --disk-size 40 \
106
+ -e .env
107
+
108
+ # Step 5: Verify attestation (confirms TEE is running securely)
109
+ elizaos tee phala cvms attestation
110
+
111
+ # Step 6: (Optional) Upgrade CVM when you update your code
112
+ elizaos tee phala cvms upgrade -c docker-compose.yaml
70
113
  ```
71
114
 
72
- #### Intel TDX Deployment (Hardware TEE)
73
-
74
- ```bash
75
- # Requires TDX-enabled hardware
76
- # Set TEE_MODE=PRODUCTION
77
- # Ensure you are also running docker
78
-
79
- # Step0: Set your API Key from Phala Cloud Dashboard
80
- phala auth login
81
-
82
- # Step1: Build Docker Image
83
- phala docker build
115
+ ##### Deployment Parameters Explained
84
116
 
85
- # Step2: Publish Docker Image to DockerHub
86
- phala docker push
87
-
88
- # Step3: Update docker-compose.yaml file with your published Docker image and deploy CVM
89
- phala cvms create -c docker-compose.yaml -e .env
90
-
91
- # (Optional) Step4: Check attestation
92
- phala cvms attestation
93
-
94
- # (Optional) Step5: Upgrade CVM if updated changes
95
- phala cvms upgrade -c docker-compose.yaml
96
- ```
117
+ - `-n elizaos-tee`: Name of your CVM instance
118
+ - `-c docker-compose.yaml`: Configuration file
119
+ - `--vcpu 2`: Number of virtual CPUs
120
+ - `--memory 4192`: Memory in MB (4GB)
121
+ - `--disk-size 40`: Storage in GB
122
+ - `-e .env`: Environment file with your secrets
97
123
 
98
124
  ### 3. Platform Integration
99
125
 
@@ -101,13 +127,13 @@ Mr. TEE can connect to multiple platforms:
101
127
 
102
128
  #### Discord
103
129
 
104
- 1. Create Discord application at https://discord.com/developers
130
+ 1. Create Discord application at <https://discord.com/developers>
105
131
  2. Add bot permissions: Send Messages, Read Message History
106
132
  3. Set `DISCORD_APPLICATION_ID` and `DISCORD_API_TOKEN`
107
133
 
108
134
  #### Voice (ElevenLabs)
109
135
 
110
- 1. Get API key from https://elevenlabs.io
136
+ 1. Get API key from <https://elevenlabs.io>
111
137
  2. Choose or clone a voice ID
112
138
  3. Set `ELEVENLABS_API_KEY` and `ELEVENLABS_VOICE_ID`
113
139
 
@@ -138,40 +164,59 @@ Mr. TEE will provide:
138
164
 
139
165
  ## Security Best Practices
140
166
 
141
- ### Mr. TEE's Security Rules:
167
+ ### Mr. TEE's Security Rules
142
168
 
143
169
  1. **Never expose private keys** - Keep them in the TEE
144
170
  2. **Always verify attestation** - Trust but verify
145
171
  3. **Use secure channels** - Encrypt all communications
146
172
  4. **Audit regularly** - Check for vulnerabilities
147
173
  5. **Stay paranoid** - It's not paranoia if they're really after your keys
174
+ 6. **Rotate API keys regularly** - Fresh keys, fresh security
175
+ 7. **Never commit `.env` files** - Secrets stay secret
148
176
 
149
- ### TEE Guarantees:
177
+ ### TEE Guarantees
150
178
 
151
179
  - **Isolated Execution**: Code runs in hardware-protected memory
152
180
  - **Memory Encryption**: All data encrypted in RAM
153
181
  - **Remote Attestation**: Cryptographic proof of execution environment
154
182
  - **Secure Key Storage**: Keys never leave the enclave
183
+ - **Tamper Resistance**: Hardware protection against physical attacks
155
184
 
156
185
  ## Troubleshooting
157
186
 
158
- ### Common Issues:
187
+ ### Common Issues
159
188
 
160
189
  #### "I can't deploy my Agent"
161
190
 
162
- - Sign up for a Phala Cloud account at https://cloud.phala.network/register
191
+ - Sign up for a Phala Cloud account at <https://dashboard.phala.network>
163
192
  - Add credits to your account for CVM deployments
193
+ - Ensure Docker is running and you're logged in
164
194
 
165
195
  #### "Docker deployment failed"
166
196
 
167
- - Make sure to update the docker-compose.yaml file with your published Docker image
197
+ - Ensure Docker Desktop is started
198
+ - Check: `docker ps`
199
+ - Make sure to authenticate: `docker login`
168
200
  - Check your configuration and try to test docker locally
169
201
 
202
+ #### "Authentication failed"
203
+
204
+ - Verify your Phala API key
205
+ - Re-run: `elizaos tee phala auth login`
206
+ - Check API key from Phala Dashboard
207
+
208
+ #### "Build failures"
209
+
210
+ - Check your `.env` configuration
211
+ - Ensure all dependencies are installed: `bun install`
212
+ - Verify Docker is running properly
213
+
170
214
  #### "Attestation failed"
171
215
 
172
216
  - Check TEE_MODE is set to PRODUCTION if deployed to Phala Cloud
173
217
  - Verify network connectivity for attestation services
174
218
  - Ensure proper TEE initialization
219
+ - Check CVM logs in Phala Dashboard
175
220
 
176
221
  #### "Missing API keys"
177
222
 
@@ -179,7 +224,7 @@ Mr. TEE will provide:
179
224
  - Check .env file formatting
180
225
  - Restart after configuration changes
181
226
 
182
- ### Debug Commands:
227
+ ### Debug Commands
183
228
 
184
229
  ```bash
185
230
  # Check environment
@@ -192,6 +237,13 @@ docker logs [container_name] | grep TEE
192
237
  curl http://localhost:3000/health
193
238
  ```
194
239
 
240
+ ### Monitoring Your Deployment
241
+
242
+ - View CVM status: <https://dashboard.phala.network>
243
+ - Check attestation reports regularly
244
+ - Monitor resource usage and adjust if needed
245
+ - Set up alerts for critical events
246
+
195
247
  ## Advanced Configuration
196
248
 
197
249
  ### Custom Security Policies
@@ -222,13 +274,22 @@ The plugin-tee supports multiple TEE vendors:
222
274
  ### Documentation
223
275
 
224
276
  - [TEE Plugin Documentation](../plugin-tee/README.md)
225
- - [ElizaOS Security Guide](../../docs/security.md)
277
+ - [ElizaOS Documentation](https://eliza.how)
226
278
  - [Character Configuration](./src/character.ts)
279
+ - [Phala Network Docs](https://docs.phala.network)
227
280
 
228
281
  ### Support
229
282
 
230
283
  - GitHub Issues: Report bugs and feature requests
231
284
  - Discord Community: Get help from other developers
285
+ - ElizaOS Forums: Share experiences and best practices
286
+
287
+ ### Next Steps
288
+
289
+ - Test your agent's TEE capabilities with attestation commands
290
+ - Configure additional platform integrations (Discord, etc.)
291
+ - Implement custom TEE-aware actions
292
+ - Join the ElizaOS community for support
232
293
 
233
294
  Remember: Mr. TEE doesn't just talk about security—he lives it. Every interaction is an opportunity to strengthen the security posture of developers and systems alike. Stay paranoid, stay secure!
234
295
 
@@ -2,7 +2,15 @@
2
2
 
3
3
  ## 🔐 Overview
4
4
 
5
- The TEE Project Starter provides a foundation for building secure agents with Trusted Execution Environment (TEE) capabilities using ElizaOS. It features **Mr. TEE**, a security drill sergeant character who teaches TEE best practices while leveraging the **@elizaos/plugin-tee** for attestation and secure operations.
5
+ The TEE Project Starter provides a secure foundation for building AI agents with Trusted Execution Environment (TEE) capabilities using ElizaOS. It demonstrates best practices for secure agent deployment with hardware-based security through Phala Cloud's confidential computing infrastructure.
6
+
7
+ ### What You Get
8
+
9
+ - **Mr. TEE Character** - A security-focused AI personality that teaches TEE concepts with tough love
10
+ - **TEE Plugin Integration** - Pre-configured `@elizaos/plugin-tee` for remote attestation and secure operations
11
+ - **Multi-Platform Support** - Discord integration, voice synthesis, and extensible to other platforms
12
+ - **Production-Ready** - Docker configuration optimized for Phala Cloud TEE deployment
13
+ - **Security First** - Built-in paranoid security principles and best practices
6
14
 
7
15
  ## ✨ Key Features
8
16
 
@@ -17,9 +25,13 @@ The TEE Project Starter provides a foundation for building secure agents with Tr
17
25
  ### Prerequisites
18
26
 
19
27
  - Node.js 20+
20
- - Bun package manager
21
- - Docker (for TEE deployments)
22
- - API keys (OpenAI required, others optional)
28
+ - Bun package manager (`npm install -g bun`)
29
+ - Docker Desktop (for TEE deployments)
30
+ - ElizaOS CLI (`npm install -g @elizaos/cli`)
31
+ - API Keys:
32
+ - **Required**: OpenAI API key
33
+ - **Optional**: Discord, ElevenLabs, RedPill APIs
34
+ - **For TEE**: Phala Cloud account and API key
23
35
 
24
36
  ### Installation
25
37
 
@@ -92,17 +104,56 @@ project-tee-starter/
92
104
 
93
105
  ## 🧪 Testing
94
106
 
107
+ ElizaOS employs a dual testing strategy:
108
+
109
+ 1. **Component Tests** (`src/__tests__/*.test.ts`)
110
+
111
+ - Run with Bun's native test runner
112
+ - Fast, isolated tests using mocks
113
+ - Perfect for TDD and component logic
114
+
115
+ 2. **E2E Tests** (`src/__tests__/e2e/*.e2e.ts`)
116
+ - Run with ElizaOS custom test runner
117
+ - Real runtime with actual database (PGLite)
118
+ - Test complete user scenarios including TEE functionality
119
+
120
+ ### Test Structure
121
+
122
+ ```
123
+ src/
124
+ __tests__/ # All tests live inside src
125
+ *.test.ts # Component tests (use Bun test runner)
126
+ e2e/ # E2E tests (use ElizaOS test runner)
127
+ project-tee-starter.e2e.ts # E2E test suite with TEE-specific tests
128
+ README.md # E2E testing documentation
129
+ index.ts # Export tests here: tests: [ProjectTeeStarterTestSuite]
130
+ ```
131
+
132
+ ### Running Tests
133
+
95
134
  ```bash
96
- # Run all tests
97
- bun test
135
+ # Run all tests (component + e2e)
136
+ elizaos test
98
137
 
99
138
  # Component tests only
100
- bun test:component
139
+ elizaos test component
101
140
 
102
- # E2E tests
103
- bun test:e2e
141
+ # E2E tests only
142
+ elizaos test e2e
143
+
144
+ # With specific port for E2E tests
145
+ elizaos test --port 4000
104
146
  ```
105
147
 
148
+ ### TEE-Specific Testing
149
+
150
+ The E2E tests include TEE-specific scenarios:
151
+
152
+ - TEE service availability checks
153
+ - Attestation action registration
154
+ - Secure memory operations
155
+ - Concurrent secure operations handling
156
+
106
157
  ## 🚀 Deployment
107
158
 
108
159
  ### Local Development
@@ -122,29 +173,37 @@ bun run start
122
173
  ### Phala Cloud (Cloud TEE)
123
174
 
124
175
  ```bash
125
- npm install -g phala
126
- # Set TEE_MODE=PRODUCTION
127
- # Ensure you are also running docker
176
+ # Prerequisites:
177
+ # 1. Install the elizaos CLI: npm install -g @elizaos/cli
178
+ # 2. Ensure Docker is running and you're logged in via Docker CLI
179
+ # 3. Set TEE_MODE=PRODUCTION in your .env file
128
180
 
129
- # Step0: Set your API Key from Phala Cloud Dashboard
130
- phala auth login
181
+ # Step 1: Login to Phala Cloud (get API key from Phala Cloud Dashboard)
182
+ elizaos tee phala auth login
131
183
 
132
- # Step1: Build Docker Image
133
- phala docker build
184
+ # Step 2: Build Docker Image for TEE deployment [[memory:4308171]]
185
+ elizaos tee phala docker build
134
186
 
135
- # Step2: Publish Docker Image to DockerHub
136
- phala docker push
187
+ # Step 3: Push Docker image to DockerHub
188
+ elizaos tee phala docker push
137
189
 
138
- # Step3: Update docker-compose.yaml file with your published Docker image and deploy CVM
139
- phala cvms create -c docker-compose.yaml -e .env
190
+ # Step 4: Create CVM (Confidential Virtual Machine) instance
191
+ elizaos tee phala cvms create -n elizaos-tee -c docker-compose.yaml --vcpu 2 --memory 4192 --disk-size 40 -e .env
140
192
 
141
- # (Optional) Step4: Check attestation
142
- phala cvms attestation
193
+ # Step 5: Verify attestation (confirms TEE is running securely)
194
+ elizaos tee phala cvms attestation
143
195
 
144
- # (Optional) Step5: Upgrade CVM if updated changes
145
- phala cvms upgrade -c docker-compose.yaml
196
+ # Step 6: (Optional) Upgrade CVM when you update your code
197
+ elizaos tee phala cvms upgrade -c docker-compose.yaml
146
198
  ```
147
199
 
200
+ #### Important Notes
201
+
202
+ - **Docker Requirements**: Ensure Docker Desktop is running and you're authenticated (`docker login`)
203
+ - **API Key**: Get your Phala Cloud API key from the [Phala Dashboard](https://dashboard.phala.network)
204
+ - **TEE_MODE**: Must be set to `PRODUCTION` for real TEE deployment
205
+ - **Resource Allocation**: The example uses 2 vCPUs, 4GB RAM, and 40GB disk - adjust based on your needs
206
+
148
207
  ## 🎖️ Mr. TEE's Security Philosophy
149
208
 
150
209
  1. **Never expose private keys** - Keep them in the TEE
@@ -1,4 +1,4 @@
1
- version: '3'
1
+ version: '3.8'
2
2
  services:
3
3
  postgres:
4
4
  image: ankane/pgvector:latest
@@ -22,9 +22,9 @@ services:
22
22
  elizaos:
23
23
  image: ${DOCKER_IMAGE}
24
24
  container_name: elizaos
25
- command: sh -c "bun run start"
26
25
  volumes:
27
26
  - /var/run/tappd.sock:/var/run/tappd.sock
27
+ - /var/run/dstack.sock:/var/run/dstack.sock
28
28
  environment:
29
29
  - OPENAI_API_KEY=${OPENAI_API_KEY}
30
30
  - SERVER_PORT=${SERVER_PORT}
@@ -39,6 +39,9 @@ services:
39
39
  - REDPILL_API_KEY=${REDPILL_API_KEY}
40
40
  - ELEVENLABS_API_KEY=${ELEVENLABS_API_KEY}
41
41
  - ELEVENLABS_VOICE_ID=${ELEVENLABS_VOICE_ID}
42
+ - ELIZA_UI_ENABLE=${ELIZA_UI_ENABLE:-true}
43
+ - NODE_ENV=${NODE_ENV:-production}
44
+ - LOG_LEVEL=${LOG_LEVEL:-info}
42
45
  ports:
43
46
  - '3000:3000'
44
47
  - '50000-50100:50000-50100/udp'
@@ -4,11 +4,11 @@
4
4
  <meta charset="UTF-8" />
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Agent Plugin View</title>
8
- <script type="module" crossorigin src="./assets/index-D1cHX53P.js"></script>
9
- <link rel="stylesheet" crossorigin href="./assets/index-CgkejLs_.css">
7
+ <title>Mr. TEE Agent Plugin View</title>
10
8
  </head>
9
+
11
10
  <body>
12
11
  <div id="root"></div>
12
+ <script type="module" src="/src/frontend/index.tsx"></script>
13
13
  </body>
14
14
  </html>