@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
package/README.md CHANGED
@@ -279,8 +279,21 @@ If any character files fail to load, ElizaOS will:
279
279
 
280
280
  Run tests for Eliza agent plugins and projects.
281
281
 
282
+ ElizaOS employs a dual testing strategy:
283
+
284
+ 1. **Component Tests** (`src/__tests__/*.test.ts`)
285
+
286
+ - Run with Bun's native test runner
287
+ - Fast, isolated tests using mocks
288
+ - Perfect for TDD and component logic
289
+
290
+ 2. **E2E Tests** (`src/__tests__/e2e/*.e2e.ts`)
291
+ - Run with ElizaOS custom test runner
292
+ - Real runtime with actual database (PGLite)
293
+ - Test complete user scenarios
294
+
282
295
  - **Subcommands:**
283
- - `component`: Run component tests (via Vitest)
296
+ - `component`: Run component tests (via bun:test)
284
297
  - `e2e`: Run end-to-end runtime tests
285
298
  - `all`: Run both component and e2e tests (default)
286
299
  - **Options:**
@@ -288,6 +301,13 @@ Run tests for Eliza agent plugins and projects.
288
301
  - `-n, --name <n>`: Filter tests by name (matches file names or test suite names)
289
302
  - `--skip-build`: Skip building before running tests
290
303
 
304
+ **E2E Test Structure:**
305
+
306
+ - Plugins export tests in `src/plugin.ts` via the `tests` array
307
+ - Projects export tests in `src/index.ts` via the `tests` array
308
+ - Test files follow naming convention: `[template-name].e2e.ts`
309
+ - Each e2e folder should have a README explaining the testing approach
310
+
291
311
  ### Trusted Execution Environment (TEE) Management
292
312
 
293
313
  #### `elizaos tee phala <subcommand>`
@@ -650,6 +670,19 @@ Plugins extend the functionality of ElizaOS agents by providing additional capab
650
670
  elizaos test e2e
651
671
  ```
652
672
 
673
+ **E2E Test Structure:**
674
+
675
+ ```
676
+ plugin-my-plugin/
677
+ ├── src/
678
+ │ ├── __tests__/
679
+ │ │ ├── e2e/
680
+ │ │ │ ├── plugin-my-plugin.e2e.ts # E2E test suite
681
+ │ │ │ └── README.md # E2E test documentation
682
+ │ │ └── *.test.ts # Component unit tests
683
+ │ └── plugin.ts # Export tests here: tests: [MyPluginTestSuite]
684
+ ```
685
+
653
686
  6. **Publish your plugin**:
654
687
 
655
688
  ```bash
@@ -765,6 +798,19 @@ Projects contain agent configurations and code for building agent-based applicat
765
798
  elizaos test --port 4000 --name specific-test
766
799
  ```
767
800
 
801
+ **E2E Test Structure for Projects:**
802
+
803
+ ```
804
+ my-agent-project/
805
+ ├── src/
806
+ │ ├── __tests__/
807
+ │ │ ├── e2e/
808
+ │ │ │ ├── project-my-agent.e2e.ts # E2E test suite
809
+ │ │ │ └── README.md # E2E test documentation
810
+ │ │ └── *.test.ts # Component unit tests
811
+ │ └── index.ts # Export tests here: tests: [MyProjectTestSuite]
812
+ ```
813
+
768
814
  8. **Development workflow**:
769
815
 
770
816
  ```bash
@@ -5,7 +5,7 @@ import {
5
5
  bunExecInherit,
6
6
  bunExecSimple,
7
7
  commandExists
8
- } from "./chunk-D3Q2UZLZ.js";
8
+ } from "./chunk-I4L4T7QX.js";
9
9
  import "./chunk-3RG5ZIWI.js";
10
10
  export {
11
11
  ProcessExecutionError,