@elizaos/cli 1.0.8 → 1.0.10
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 +9 -16
- package/dist/assets/{index-CZAd5zm2.js → index-CmuPnu0u.js} +72 -89
- package/dist/assets/index-CmuPnu0u.js.br +0 -0
- package/dist/assets/index-CmuPnu0u.js.map +1 -0
- package/dist/assets/{index-CaEsCLCC.js → index-DDQnwxzL.js} +28798 -16391
- package/dist/assets/{index-CaEsCLCC.js.map → index-DDQnwxzL.js.map} +1 -1
- package/dist/assets/index-Df1AFSuJ.css +1 -0
- package/dist/assets/index-Df1AFSuJ.css.br +0 -0
- package/dist/assets/vendor-DSdxb8P-.js.map +1 -1
- package/dist/{chunk-REBZFQYE.js → chunk-7HYEGM5V.js} +967 -1597
- package/dist/{chunk-W3HS2NP6.js → chunk-B4KJXECB.js} +13 -18
- package/dist/{chunk-33BHGAF7.js → chunk-GWQB7PBK.js} +59 -32
- package/dist/{chunk-CVADLFW6.js → chunk-LQ6XHF53.js} +4543 -3043
- package/dist/{chunk-GYTAJJOD.js → chunk-RIAWNDYI.js} +16 -2
- package/dist/{chunk-IEKLJDUU.js → chunk-WS4DWCDZ.js} +54 -32
- package/dist/commands/agent/actions/index.d.ts +5 -1
- package/dist/commands/agent/actions/index.js +5 -4
- package/dist/commands/agent/index.js +3 -4
- package/dist/commands/create/actions/index.js +4 -5
- package/dist/commands/create/index.js +5 -6
- package/dist/{fileFromPath-DCRQMDLJ.js → fileFromPath-KB6XMTJ4.js} +1 -0
- package/dist/index.html +2 -2
- package/dist/index.js +9346 -102098
- package/dist/{migrator-KZLCVEIH.js → migrator-JREQPDN3.js} +42 -220
- package/dist/pglite.data +0 -0
- package/dist/pglite.wasm +0 -0
- package/dist/plugin-creator-T4K2673C.js +910 -0
- package/dist/{registry-XFOSZFU4.js → registry-CBMRMYCG.js} +3 -4
- package/dist/templates/plugin-starter/README.md +255 -0
- package/dist/templates/plugin-starter/bunfig.toml +6 -0
- package/dist/templates/plugin-starter/cypress.config.ts +18 -0
- package/dist/templates/plugin-starter/index.html +13 -0
- package/dist/templates/plugin-starter/package.json +95 -0
- package/dist/templates/plugin-starter/postcss.config.js +3 -0
- package/dist/templates/plugin-starter/scripts/test-e2e-manual.js +201 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +404 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +287 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/support/commands.ts +38 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/support/component-index.html +11 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/support/component.ts +33 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/support/e2e.ts +11 -0
- package/dist/templates/plugin-starter/src/__tests__/cypress/tsconfig.json +10 -0
- package/dist/templates/plugin-starter/src/__tests__/e2e/README.md +47 -0
- package/dist/templates/plugin-starter/src/__tests__/e2e/starter-plugin.ts +320 -0
- package/{templates/plugin-starter → dist/templates/plugin-starter/src}/__tests__/integration.test.ts +22 -17
- package/{templates/plugin-starter → dist/templates/plugin-starter/src}/__tests__/plugin.test.ts +8 -8
- package/{templates/plugin-starter → dist/templates/plugin-starter/src}/__tests__/test-utils.ts +17 -17
- package/dist/templates/plugin-starter/src/frontend/index.css +77 -0
- package/dist/templates/plugin-starter/src/frontend/index.tsx +164 -0
- package/dist/templates/plugin-starter/src/frontend/utils.ts +6 -0
- package/dist/templates/plugin-starter/src/index.ts +274 -0
- package/dist/templates/plugin-starter/src/tests.ts +6 -0
- package/dist/templates/plugin-starter/tailwind.config.js +62 -0
- package/dist/templates/plugin-starter/tsconfig.build.json +11 -0
- package/dist/templates/plugin-starter/tsconfig.json +28 -0
- package/dist/templates/plugin-starter/tsup.config.ts +20 -0
- package/dist/templates/plugin-starter/vite.config.ts +20 -0
- package/dist/templates/project-starter/.env.example +153 -0
- package/dist/templates/project-starter/README.md +109 -0
- package/dist/templates/project-starter/bunfig.toml +6 -0
- package/dist/templates/project-starter/cypress.config.ts +31 -0
- package/dist/templates/project-starter/index.html +13 -0
- package/dist/templates/project-starter/package.json +83 -0
- package/dist/templates/project-starter/postcss.config.js +3 -0
- package/dist/templates/project-starter/scripts/test-all.sh +101 -0
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/actions.test.ts +6 -6
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/character.test.ts +3 -3
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/config.test.ts +18 -18
- package/dist/templates/project-starter/src/__tests__/cypress/component/Accessibility.cy.tsx +271 -0
- package/dist/templates/project-starter/src/__tests__/cypress/component/ApiIntegration.cy.tsx +220 -0
- package/dist/templates/project-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +146 -0
- package/dist/templates/project-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +51 -0
- package/dist/templates/project-starter/src/__tests__/cypress/e2e/agent-chat.cy.ts +235 -0
- package/dist/templates/project-starter/src/__tests__/cypress/e2e/dashboard.cy.ts +146 -0
- package/dist/templates/project-starter/src/__tests__/cypress/e2e/user-workflow.cy.ts +257 -0
- package/dist/templates/project-starter/src/__tests__/cypress/support/commands.ts +44 -0
- package/dist/templates/project-starter/src/__tests__/cypress/support/component-index.html +11 -0
- package/dist/templates/project-starter/src/__tests__/cypress/support/component.ts +33 -0
- package/dist/templates/project-starter/src/__tests__/cypress/support/e2e.ts +179 -0
- package/dist/templates/project-starter/src/__tests__/e2e/index.ts +14 -0
- package/dist/templates/project-starter/src/__tests__/e2e/natural-language.test.ts +246 -0
- package/dist/templates/project-starter/src/__tests__/e2e/project.test.ts +155 -0
- package/dist/templates/project-starter/src/__tests__/e2e/starter-plugin.test.ts +421 -0
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/env.test.ts +2 -2
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/error-handling.test.ts +17 -17
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/events.test.ts +7 -7
- package/dist/templates/project-starter/src/__tests__/file-structure.test.ts +135 -0
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/integration.test.ts +25 -25
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/models.test.ts +6 -6
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/plugin.test.ts +9 -9
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/provider.test.ts +7 -7
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/routes.test.ts +3 -3
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/test-utils.ts +17 -17
- package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/utils/core-test-utils.ts +3 -3
- package/dist/templates/project-starter/src/frontend/index.css +77 -0
- package/dist/templates/project-starter/src/frontend/index.html +19 -0
- package/dist/templates/project-starter/src/frontend/index.tsx +98 -0
- package/dist/templates/project-starter/src/frontend/utils.ts +6 -0
- package/dist/templates/project-starter/src/index.ts +153 -0
- package/dist/templates/project-starter/src/plugin.ts +255 -0
- package/dist/templates/project-starter/tailwind.config.js +62 -0
- package/dist/templates/project-starter/tsconfig.build.json +20 -0
- package/dist/templates/project-starter/tsconfig.json +39 -0
- package/dist/templates/project-starter/tsup.config.ts +19 -0
- package/dist/templates/project-starter/vite.config.ts +39 -0
- package/dist/templates/project-tee-starter/.dockerignore +20 -0
- package/dist/templates/project-tee-starter/.env.example +55 -0
- package/dist/templates/project-tee-starter/Dockerfile +66 -0
- package/dist/templates/project-tee-starter/GUIDE.md +235 -0
- package/dist/templates/project-tee-starter/README.md +173 -0
- package/dist/templates/project-tee-starter/__tests__/actions.test.ts +9 -0
- package/dist/templates/project-tee-starter/__tests__/character.test.ts +86 -0
- package/dist/templates/project-tee-starter/__tests__/config.test.ts +31 -0
- package/dist/templates/project-tee-starter/__tests__/env.test.ts +87 -0
- package/dist/templates/project-tee-starter/__tests__/error-handling.test.ts +30 -0
- package/dist/templates/project-tee-starter/__tests__/events.test.ts +21 -0
- package/{templates/project-starter → dist/templates/project-tee-starter}/__tests__/file-structure.test.ts +6 -6
- package/dist/templates/project-tee-starter/__tests__/integration.test.ts +205 -0
- package/dist/templates/project-tee-starter/__tests__/models.test.ts +22 -0
- package/dist/templates/project-tee-starter/__tests__/plugin.test.ts +38 -0
- package/dist/templates/project-tee-starter/__tests__/provider.test.ts +189 -0
- package/dist/templates/project-tee-starter/__tests__/routes.test.ts +21 -0
- package/dist/templates/project-tee-starter/__tests__/test-utils.ts +121 -0
- package/dist/templates/project-tee-starter/__tests__/utils/core-test-utils.ts +167 -0
- package/dist/templates/project-tee-starter/assets/mr-tee-portrait.jpg +0 -0
- package/dist/templates/project-tee-starter/bunfig.toml +6 -0
- package/dist/templates/project-tee-starter/docker-compose.yaml +57 -0
- package/dist/templates/project-tee-starter/e2e/project.test.ts +38 -0
- package/dist/templates/project-tee-starter/e2e/starter-plugin.test.ts +92 -0
- package/dist/templates/project-tee-starter/package.json +74 -0
- package/dist/templates/project-tee-starter/src/character.ts +257 -0
- package/dist/templates/project-tee-starter/src/index.ts +33 -0
- package/dist/templates/project-tee-starter/src/plugin.ts +169 -0
- package/dist/templates/project-tee-starter/tsconfig.build.json +13 -0
- package/dist/templates/project-tee-starter/tsconfig.json +30 -0
- package/dist/templates/project-tee-starter/tsup.config.ts +19 -0
- package/dist/{utils-DIZZ3HNZ.js → utils-TIALZU53.js} +9 -8
- package/package.json +29 -12
- package/templates/plugin-starter/README.md +38 -13
- package/templates/plugin-starter/bunfig.toml +6 -0
- package/templates/plugin-starter/cypress.config.ts +18 -0
- package/templates/plugin-starter/index.html +13 -0
- package/templates/plugin-starter/package.json +19 -7
- package/templates/plugin-starter/postcss.config.js +3 -0
- package/templates/plugin-starter/scripts/test-e2e-manual.js +201 -0
- package/templates/plugin-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +404 -0
- package/templates/plugin-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +287 -0
- package/templates/plugin-starter/src/__tests__/cypress/support/commands.ts +38 -0
- package/templates/plugin-starter/src/__tests__/cypress/support/component-index.html +11 -0
- package/templates/plugin-starter/src/__tests__/cypress/support/component.ts +33 -0
- package/templates/plugin-starter/src/__tests__/cypress/support/e2e.ts +11 -0
- package/templates/plugin-starter/src/__tests__/cypress/tsconfig.json +10 -0
- package/templates/plugin-starter/src/__tests__/e2e/README.md +47 -0
- package/templates/plugin-starter/src/__tests__/e2e/starter-plugin.ts +320 -0
- package/templates/plugin-starter/src/__tests__/integration.test.ts +138 -0
- package/templates/plugin-starter/src/__tests__/plugin.test.ts +182 -0
- package/templates/plugin-starter/src/__tests__/test-utils.ts +162 -0
- package/templates/plugin-starter/src/frontend/index.css +77 -0
- package/templates/plugin-starter/src/frontend/index.tsx +164 -0
- package/templates/plugin-starter/src/frontend/utils.ts +6 -0
- package/templates/plugin-starter/src/index.ts +31 -8
- package/templates/plugin-starter/src/tests.ts +6 -0
- package/templates/plugin-starter/tailwind.config.js +62 -0
- package/templates/plugin-starter/tsconfig.json +8 -8
- package/templates/plugin-starter/vite.config.ts +20 -0
- package/templates/project-starter/bunfig.toml +6 -0
- package/templates/project-starter/cypress.config.ts +31 -0
- package/templates/project-starter/index.html +13 -0
- package/templates/project-starter/package.json +37 -14
- package/templates/project-starter/postcss.config.js +3 -0
- package/templates/project-starter/scripts/test-all.sh +101 -0
- package/templates/project-starter/src/__tests__/actions.test.ts +155 -0
- package/templates/project-starter/src/__tests__/character.test.ts +86 -0
- package/templates/project-starter/src/__tests__/config.test.ts +193 -0
- package/templates/project-starter/src/__tests__/cypress/component/Accessibility.cy.tsx +271 -0
- package/templates/project-starter/src/__tests__/cypress/component/ApiIntegration.cy.tsx +220 -0
- package/templates/project-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +146 -0
- package/templates/project-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +51 -0
- package/templates/project-starter/src/__tests__/cypress/e2e/agent-chat.cy.ts +235 -0
- package/templates/project-starter/src/__tests__/cypress/e2e/dashboard.cy.ts +146 -0
- package/templates/project-starter/src/__tests__/cypress/e2e/user-workflow.cy.ts +257 -0
- package/templates/project-starter/src/__tests__/cypress/support/commands.ts +44 -0
- package/templates/project-starter/src/__tests__/cypress/support/component-index.html +11 -0
- package/templates/project-starter/src/__tests__/cypress/support/component.ts +33 -0
- package/templates/project-starter/src/__tests__/cypress/support/e2e.ts +179 -0
- package/templates/project-starter/src/__tests__/e2e/index.ts +14 -0
- package/templates/project-starter/src/__tests__/e2e/natural-language.test.ts +246 -0
- package/templates/project-starter/src/__tests__/e2e/project.test.ts +155 -0
- package/templates/project-starter/src/__tests__/e2e/starter-plugin.test.ts +421 -0
- package/templates/project-starter/src/__tests__/env.test.ts +87 -0
- package/templates/project-starter/src/__tests__/error-handling.test.ts +177 -0
- package/templates/project-starter/src/__tests__/events.test.ts +144 -0
- package/templates/project-starter/src/__tests__/file-structure.test.ts +135 -0
- package/templates/project-starter/src/__tests__/integration.test.ts +209 -0
- package/templates/project-starter/src/__tests__/models.test.ts +152 -0
- package/templates/project-starter/src/__tests__/plugin.test.ts +393 -0
- package/templates/project-starter/src/__tests__/provider.test.ts +325 -0
- package/templates/project-starter/src/__tests__/routes.test.ts +79 -0
- package/templates/project-starter/src/__tests__/test-utils.ts +121 -0
- package/templates/project-starter/src/__tests__/utils/core-test-utils.ts +180 -0
- package/templates/project-starter/src/frontend/index.css +77 -0
- package/templates/project-starter/src/frontend/index.html +19 -0
- package/templates/project-starter/src/frontend/index.tsx +98 -0
- package/templates/project-starter/src/frontend/utils.ts +6 -0
- package/templates/project-starter/src/index.ts +9 -1
- package/templates/project-starter/tailwind.config.js +62 -0
- package/templates/project-starter/tsconfig.build.json +9 -2
- package/templates/project-starter/tsconfig.json +15 -6
- package/templates/project-starter/tsup.config.ts +1 -1
- package/templates/project-starter/vite.config.ts +39 -0
- package/templates/project-tee-starter/__tests__/actions.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/character.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/config.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/env.test.ts +2 -2
- package/templates/project-tee-starter/__tests__/error-handling.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/events.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/file-structure.test.ts +5 -5
- package/templates/project-tee-starter/__tests__/integration.test.ts +22 -26
- package/templates/project-tee-starter/__tests__/models.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/plugin.test.ts +6 -12
- package/templates/project-tee-starter/__tests__/provider.test.ts +6 -6
- package/templates/project-tee-starter/__tests__/routes.test.ts +1 -1
- package/templates/project-tee-starter/__tests__/test-utils.ts +15 -15
- package/templates/project-tee-starter/__tests__/utils/core-test-utils.ts +3 -3
- package/templates/project-tee-starter/bunfig.toml +6 -0
- package/templates/project-tee-starter/package.json +10 -12
- package/dist/assets/index-CZAd5zm2.js.br +0 -0
- package/dist/assets/index-CZAd5zm2.js.map +0 -1
- package/dist/assets/index-DyA-lndn.css +0 -1
- package/dist/assets/index-DyA-lndn.css.br +0 -0
- package/dist/chunk-CEE6RKN5.js +0 -2746
- package/dist/chunk-MA2ZXPG6.js +0 -260
- package/dist/chunk-TUAYJIF2.js +0 -3649
- package/dist/lib-NAGYZHVV.js +0 -9
- package/dist/plugin-creator-IC42XOHG.js +0 -29165
- package/templates/plugin-starter/e2e/starter-plugin.test.ts +0 -171
- package/templates/plugin-starter/images/README.md +0 -24
- package/templates/plugin-starter/vitest.config.ts +0 -16
- package/templates/project-starter/e2e/project.test.ts +0 -34
- package/templates/project-starter/e2e/starter-plugin.test.ts +0 -217
- package/templates/project-starter/vitest.config.ts +0 -16
- package/templates/project-tee-starter/vitest.config.ts +0 -19
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
logger,
|
|
3
|
+
type Character,
|
|
4
|
+
type IAgentRuntime,
|
|
5
|
+
type Project,
|
|
6
|
+
type ProjectAgent,
|
|
7
|
+
} from '@elizaos/core';
|
|
8
|
+
import mrTeePlugin from './plugin';
|
|
9
|
+
import { mrTeeCharacter } from './character';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Represents the default character (Eliza) with her specific attributes and behaviors.
|
|
13
|
+
* Eliza responds to a wide range of messages, is helpful and conversational.
|
|
14
|
+
* She interacts with users in a concise, direct, and helpful manner, using humor and empathy effectively.
|
|
15
|
+
* Eliza's responses are geared towards providing assistance on various topics while maintaining a friendly demeanor.
|
|
16
|
+
*/
|
|
17
|
+
export const character: Character = mrTeeCharacter;
|
|
18
|
+
|
|
19
|
+
const initCharacter = ({ runtime }: { runtime: IAgentRuntime }) => {
|
|
20
|
+
logger.info(`Initializing character: ${mrTeeCharacter.name}`);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const projectAgent: ProjectAgent = {
|
|
24
|
+
character: mrTeeCharacter,
|
|
25
|
+
init: async (runtime: IAgentRuntime) => await initCharacter({ runtime }),
|
|
26
|
+
plugins: [mrTeePlugin],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const project: Project = {
|
|
30
|
+
agents: [projectAgent],
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default project;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { Plugin } from '@elizaos/core';
|
|
2
|
+
import { type IAgentRuntime, Service, logger } from '@elizaos/core';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { type DeriveKeyResponse, TappdClient } from '@phala/dstack-sdk';
|
|
5
|
+
import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts';
|
|
6
|
+
import { keccak256 } from 'viem';
|
|
7
|
+
import { Keypair } from '@solana/web3.js';
|
|
8
|
+
import crypto from 'node:crypto';
|
|
9
|
+
|
|
10
|
+
// Create a custom TEE Client to make calls to the TEE through the Dstack SDK.
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Define the configuration schema for the plugin with the following properties:
|
|
14
|
+
*
|
|
15
|
+
* @param {string} WALLET_SECRET_SALT - The secret salt for the wallet (min length of 1, optional)
|
|
16
|
+
* @returns {object} - The configured schema object
|
|
17
|
+
*/
|
|
18
|
+
const configSchema = z.object({
|
|
19
|
+
WALLET_SECRET_SALT: z
|
|
20
|
+
.string()
|
|
21
|
+
.min(1, 'Wallet secret salt is not provided')
|
|
22
|
+
.optional()
|
|
23
|
+
.transform((val) => {
|
|
24
|
+
if (!val) {
|
|
25
|
+
logger.warn('Warning: Wallet secret salt is not provided');
|
|
26
|
+
}
|
|
27
|
+
return val;
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export class StarterService extends Service {
|
|
32
|
+
static serviceType = 'starter';
|
|
33
|
+
capabilityDescription = 'This is a starter service, can be customized for Mr. TEE.';
|
|
34
|
+
private teeClient: TappdClient;
|
|
35
|
+
private secretSalt: string;
|
|
36
|
+
constructor(protected runtime: IAgentRuntime) {
|
|
37
|
+
super(runtime);
|
|
38
|
+
this.teeClient = new TappdClient();
|
|
39
|
+
this.secretSalt = process.env.WALLET_SECRET_SALT || 'secret_salt';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static async start(runtime: IAgentRuntime) {
|
|
43
|
+
logger.info("*** Starting Mr. TEE's custom service (StarterService) ***");
|
|
44
|
+
const service = new StarterService(runtime);
|
|
45
|
+
try {
|
|
46
|
+
const deriveKeyResponse: DeriveKeyResponse = await service.teeClient.deriveKey(
|
|
47
|
+
service.secretSalt
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
// ECDSA Key
|
|
51
|
+
const hex = keccak256(deriveKeyResponse.asUint8Array());
|
|
52
|
+
const ecdsaKeypair: PrivateKeyAccount = privateKeyToAccount(hex);
|
|
53
|
+
|
|
54
|
+
// ED25519 Key
|
|
55
|
+
const uint8ArrayDerivedKey = deriveKeyResponse.asUint8Array();
|
|
56
|
+
const hash = crypto.createHash('sha256');
|
|
57
|
+
hash.update(uint8ArrayDerivedKey);
|
|
58
|
+
const seed = hash.digest();
|
|
59
|
+
const seedArray = new Uint8Array(seed);
|
|
60
|
+
const ed25519Keypair = Keypair.fromSeed(seedArray.slice(0, 32));
|
|
61
|
+
|
|
62
|
+
logger.log('ECDSA Key Derived Successfully!');
|
|
63
|
+
logger.log('ECDSA Keypair:', ecdsaKeypair.address);
|
|
64
|
+
logger.log('ED25519 Keypair:', ed25519Keypair.publicKey);
|
|
65
|
+
const signature = await ecdsaKeypair.signMessage({ message: 'Hello, world!' });
|
|
66
|
+
logger.log('Sign message w/ ECDSA keypair: Hello world!, Signature: ', signature);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
// Handle TEE connection errors gracefully
|
|
69
|
+
if (error instanceof Error && error.message.includes('ENOENT')) {
|
|
70
|
+
logger.warn('TEE daemon not available - running in non-TEE mode for testing');
|
|
71
|
+
logger.warn('To run with TEE, ensure tappd is running at /var/run/tappd.sock');
|
|
72
|
+
} else {
|
|
73
|
+
logger.error('Error connecting to TEE:', error);
|
|
74
|
+
}
|
|
75
|
+
// Continue without TEE functionality for testing
|
|
76
|
+
}
|
|
77
|
+
return service;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static async stop(runtime: IAgentRuntime) {
|
|
81
|
+
logger.info("*** Stopping Mr. TEE's custom service (StarterService) ***");
|
|
82
|
+
const service = runtime.getService(StarterService.serviceType);
|
|
83
|
+
if (!service) {
|
|
84
|
+
throw new Error('Mr. TEE custom service (StarterService) not found');
|
|
85
|
+
}
|
|
86
|
+
service.stop();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async stop() {
|
|
90
|
+
logger.info("*** Stopping Mr. TEE's custom service instance (StarterService) ***");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const teeStarterPlugin: Plugin = {
|
|
95
|
+
name: 'mr-tee-starter-plugin',
|
|
96
|
+
description: "Mr. TEE's starter plugin - using plugin-tee for attestation",
|
|
97
|
+
config: {
|
|
98
|
+
TEE_MODE: process.env.TEE_MODE,
|
|
99
|
+
WALLET_SECRET_SALT: process.env.WALLET_SECRET_SALT,
|
|
100
|
+
},
|
|
101
|
+
async init(config: Record<string, string>) {
|
|
102
|
+
logger.info('*** Initializing Mr. TEE plugin ***');
|
|
103
|
+
try {
|
|
104
|
+
const validatedConfig = await configSchema.parseAsync(config);
|
|
105
|
+
|
|
106
|
+
// Set all environment variables at once
|
|
107
|
+
for (const [key, value] of Object.entries(validatedConfig)) {
|
|
108
|
+
if (value) process.env[key] = value;
|
|
109
|
+
}
|
|
110
|
+
} catch (error) {
|
|
111
|
+
if (error instanceof z.ZodError) {
|
|
112
|
+
throw new Error(
|
|
113
|
+
`Invalid plugin configuration: ${error.errors.map((e) => e.message).join(', ')}`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
routes: [
|
|
120
|
+
{
|
|
121
|
+
name: 'mr-tee-status-route',
|
|
122
|
+
path: '/mr-tee-status',
|
|
123
|
+
type: 'GET',
|
|
124
|
+
handler: async (
|
|
125
|
+
_req: Record<string, unknown>,
|
|
126
|
+
res: { json: (data: Record<string, unknown>) => void }
|
|
127
|
+
) => {
|
|
128
|
+
res.json({
|
|
129
|
+
message: 'Mr. TEE is operational, fool!',
|
|
130
|
+
tee_mode: process.env.TEE_MODE || 'NOT SET',
|
|
131
|
+
tee_vendor: process.env.TEE_VENDOR || 'NOT SET',
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
events: {
|
|
137
|
+
MESSAGE_RECEIVED: [
|
|
138
|
+
async (params) => {
|
|
139
|
+
logger.info(
|
|
140
|
+
'[MR_TEE_PLUGIN] MESSAGE_RECEIVED event',
|
|
141
|
+
params.message?.content?.text?.substring(0, 50)
|
|
142
|
+
);
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
VOICE_MESSAGE_RECEIVED: [
|
|
146
|
+
async (params) => {
|
|
147
|
+
logger.info('[MR_TEE_PLUGIN] VOICE_MESSAGE_RECEIVED event');
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
WORLD_CONNECTED: [
|
|
151
|
+
async (params) => {
|
|
152
|
+
logger.info('[MR_TEE_PLUGIN] WORLD_CONNECTED event');
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
WORLD_JOINED: [
|
|
156
|
+
async (params) => {
|
|
157
|
+
logger.info('[MR_TEE_PLUGIN] WORLD_JOINED event');
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
// Enable this service to run when TEE mode is enabled
|
|
162
|
+
services: [
|
|
163
|
+
/* StarterService */
|
|
164
|
+
],
|
|
165
|
+
actions: [],
|
|
166
|
+
providers: [],
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export default teeStarterPlugin;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "./src",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"sourceMap": true,
|
|
7
|
+
"inlineSources": true,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"emitDeclarationOnly": true
|
|
10
|
+
},
|
|
11
|
+
"include": ["src/**/*.ts"],
|
|
12
|
+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "dist",
|
|
4
|
+
"rootDir": "src",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"target": "ESNext",
|
|
7
|
+
"module": "Preserve",
|
|
8
|
+
"moduleResolution": "Bundler",
|
|
9
|
+
"strict": false,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": false,
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"emitDeclarationOnly": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"noImplicitAny": false,
|
|
18
|
+
"allowJs": true,
|
|
19
|
+
"checkJs": false,
|
|
20
|
+
"noEmitOnError": false,
|
|
21
|
+
"moduleDetection": "force",
|
|
22
|
+
"allowArbitraryExtensions": true,
|
|
23
|
+
"baseUrl": ".",
|
|
24
|
+
"paths": {
|
|
25
|
+
"@elizaos/core": ["../../core/src"],
|
|
26
|
+
"@elizaos/core/*": ["../../core/src/*"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"include": ["src/**/*.ts"]
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: ['src/index.ts'],
|
|
5
|
+
outDir: 'dist',
|
|
6
|
+
tsconfig: './tsconfig.build.json', // Use build-specific tsconfig
|
|
7
|
+
sourcemap: true,
|
|
8
|
+
clean: true,
|
|
9
|
+
format: ['esm'], // Ensure you're targeting CommonJS
|
|
10
|
+
dts: false, // Skip DTS generation to avoid external import issues // Ensure you're targeting CommonJS
|
|
11
|
+
external: [
|
|
12
|
+
'dotenv', // Externalize dotenv to prevent bundling
|
|
13
|
+
'fs', // Externalize fs to use Node.js built-in module
|
|
14
|
+
'path', // Externalize other built-ins if necessary
|
|
15
|
+
'https',
|
|
16
|
+
'http',
|
|
17
|
+
'zod',
|
|
18
|
+
],
|
|
19
|
+
});
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
configSchema,
|
|
17
17
|
configureDatabaseSettings,
|
|
18
18
|
confirmAction,
|
|
19
|
-
convertToAudioBuffer,
|
|
20
19
|
copyClientDist,
|
|
21
20
|
copyDir,
|
|
22
21
|
copyTemplate,
|
|
@@ -36,7 +35,6 @@ import {
|
|
|
36
35
|
forkExists,
|
|
37
36
|
forkRepository,
|
|
38
37
|
formatEnvFileWithTemplate,
|
|
39
|
-
getAudioMimeType,
|
|
40
38
|
getAuthenticatedUser,
|
|
41
39
|
getCliInstallTag,
|
|
42
40
|
getConfigFilePath,
|
|
@@ -63,6 +61,7 @@ import {
|
|
|
63
61
|
isRunningViaNpx,
|
|
64
62
|
isUtf8Locale,
|
|
65
63
|
isValidAnthropicKey,
|
|
64
|
+
isValidOllamaEndpoint,
|
|
66
65
|
isValidOpenAIKey,
|
|
67
66
|
isValidPostgresUrl,
|
|
68
67
|
loadConfig,
|
|
@@ -72,6 +71,7 @@ import {
|
|
|
72
71
|
mergeProcessEnvWithTemplate,
|
|
73
72
|
migrateCliToBun,
|
|
74
73
|
promptAndStoreAnthropicKey,
|
|
74
|
+
promptAndStoreOllamaConfig,
|
|
75
75
|
promptAndStoreOpenAIKey,
|
|
76
76
|
promptAndStorePostgresUrl,
|
|
77
77
|
promptForEnvVars,
|
|
@@ -94,6 +94,7 @@ import {
|
|
|
94
94
|
setupPgLite,
|
|
95
95
|
showUpdateNotification,
|
|
96
96
|
storeAnthropicKey,
|
|
97
|
+
storeOllamaConfig,
|
|
97
98
|
storeOpenAIKey,
|
|
98
99
|
storePgliteDataDir,
|
|
99
100
|
storePostgresUrl,
|
|
@@ -104,13 +105,12 @@ import {
|
|
|
104
105
|
validateGitHubToken,
|
|
105
106
|
validatePluginEnvVars,
|
|
106
107
|
writeEnvFile
|
|
107
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-7HYEGM5V.js";
|
|
108
109
|
import {
|
|
109
110
|
runBunCommand
|
|
110
|
-
} from "./chunk-
|
|
111
|
-
import "./chunk-
|
|
111
|
+
} from "./chunk-RIAWNDYI.js";
|
|
112
|
+
import "./chunk-WS4DWCDZ.js";
|
|
112
113
|
import "./chunk-F24MS2YR.js";
|
|
113
|
-
import "./chunk-MA2ZXPG6.js";
|
|
114
114
|
import "./chunk-567UPUC7.js";
|
|
115
115
|
export {
|
|
116
116
|
NAV_BACK,
|
|
@@ -126,7 +126,6 @@ export {
|
|
|
126
126
|
configSchema,
|
|
127
127
|
configureDatabaseSettings,
|
|
128
128
|
confirmAction,
|
|
129
|
-
convertToAudioBuffer,
|
|
130
129
|
copyClientDist,
|
|
131
130
|
copyDir,
|
|
132
131
|
copyTemplate,
|
|
@@ -146,7 +145,6 @@ export {
|
|
|
146
145
|
forkExists,
|
|
147
146
|
forkRepository,
|
|
148
147
|
formatEnvFileWithTemplate,
|
|
149
|
-
getAudioMimeType,
|
|
150
148
|
getAuthenticatedUser,
|
|
151
149
|
getCliInstallTag,
|
|
152
150
|
getConfigFilePath,
|
|
@@ -173,6 +171,7 @@ export {
|
|
|
173
171
|
isRunningViaNpx,
|
|
174
172
|
isUtf8Locale,
|
|
175
173
|
isValidAnthropicKey,
|
|
174
|
+
isValidOllamaEndpoint,
|
|
176
175
|
isValidOpenAIKey,
|
|
177
176
|
isValidPostgresUrl,
|
|
178
177
|
loadConfig,
|
|
@@ -182,6 +181,7 @@ export {
|
|
|
182
181
|
mergeProcessEnvWithTemplate,
|
|
183
182
|
migrateCliToBun,
|
|
184
183
|
promptAndStoreAnthropicKey,
|
|
184
|
+
promptAndStoreOllamaConfig,
|
|
185
185
|
promptAndStoreOpenAIKey,
|
|
186
186
|
promptAndStorePostgresUrl,
|
|
187
187
|
promptForEnvVars,
|
|
@@ -205,6 +205,7 @@ export {
|
|
|
205
205
|
setupPgLite,
|
|
206
206
|
showUpdateNotification,
|
|
207
207
|
storeAnthropicKey,
|
|
208
|
+
storeOllamaConfig,
|
|
208
209
|
storeOpenAIKey,
|
|
209
210
|
storePgliteDataDir,
|
|
210
211
|
storePostgresUrl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "elizaOS CLI - Manage your AI agents and plugins",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -33,27 +33,44 @@
|
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"start": "bun run build && node dist/index.js start",
|
|
36
|
-
"build": "
|
|
36
|
+
"build": "bun run src/scripts/copy-templates.ts && bun x tsup && bun run src/scripts/copy-client-dist.ts",
|
|
37
37
|
"lint": "prettier --write ./src",
|
|
38
38
|
"format": "prettier --write ./src",
|
|
39
39
|
"format:check": "prettier --check ./src",
|
|
40
40
|
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo",
|
|
41
|
-
"test": "
|
|
42
|
-
"test:
|
|
41
|
+
"test": "bun run test:all",
|
|
42
|
+
"test:all": "./run-all-tests.sh",
|
|
43
|
+
"test:unit": "bun test --timeout 30000",
|
|
44
|
+
"test:unit:watch": "bun test --watch --timeout 30000",
|
|
45
|
+
"test:unit:coverage": "bun test --coverage --timeout 30000",
|
|
46
|
+
"test:bats": "bats tests/bats",
|
|
47
|
+
"test:bats:commands": "bats tests/bats/commands",
|
|
48
|
+
"test:bats:integration": "bats tests/bats/integration",
|
|
49
|
+
"test:bats:e2e": "bats tests/bats/e2e",
|
|
50
|
+
"test:types": "tsc --noEmit",
|
|
51
|
+
"coverage": "c8 --reporter=lcov --reporter=text bun test",
|
|
52
|
+
"coverage:html": "c8 --reporter=html bun test && open coverage/index.html",
|
|
53
|
+
"test:cli": "cross-env NODE_OPTIONS=\"--max-old-space-size=4096\" bun test tests/commands/ --timeout 120000"
|
|
43
54
|
},
|
|
44
55
|
"devDependencies": {
|
|
45
56
|
"@anthropic-ai/sdk": "^0.40.0",
|
|
46
57
|
"@babel/core": "^7.22.1",
|
|
47
58
|
"@babel/parser": "^7.22.6",
|
|
59
|
+
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
|
|
48
60
|
"@types/babel__core": "^7.20.1",
|
|
49
61
|
"@types/diff": "^5.0.3",
|
|
50
62
|
"@types/fs-extra": "^11.0.1",
|
|
63
|
+
"@types/inquirer": "^9.0.8",
|
|
51
64
|
"@types/lodash": "^4.17.7",
|
|
52
65
|
"@types/node": "^22.15.3",
|
|
53
66
|
"@types/prompts": "^2.4.2",
|
|
54
67
|
"@types/semver": "^7.5.8",
|
|
55
68
|
"axios": "^1.7.9",
|
|
69
|
+
"bats-assert": "^2.0.0",
|
|
70
|
+
"bats-support": "^0.3.0",
|
|
71
|
+
"bun-types": "^1.2.16",
|
|
56
72
|
"commander": "^10.0.0",
|
|
73
|
+
"cross-env": "^7.0.3",
|
|
57
74
|
"diff": "^5.1.0",
|
|
58
75
|
"dotenv": "^16.5.0",
|
|
59
76
|
"esbuild-plugin-copy": "^2.1.1",
|
|
@@ -72,27 +89,27 @@
|
|
|
72
89
|
"tsup": "8.5.0",
|
|
73
90
|
"tsx": "4.19.4",
|
|
74
91
|
"type-fest": "^3.8.0",
|
|
75
|
-
"typescript": "
|
|
92
|
+
"typescript": "5.8.2",
|
|
76
93
|
"vite": "^5.4.1",
|
|
77
|
-
"vitest": "^3.0.0",
|
|
78
94
|
"which": "^4.0.0",
|
|
79
95
|
"ws": "^8.18.0",
|
|
80
96
|
"yoctocolors": "^2.1.1"
|
|
81
97
|
},
|
|
82
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "58b31ee11ea37a2d2dcba67c614f836387f13e67",
|
|
83
99
|
"dependencies": {
|
|
84
100
|
"@clack/prompts": "^0.11.0",
|
|
85
101
|
"@electric-sql/pglite": "^0.3.2",
|
|
86
|
-
"@elizaos/core": "1.0.
|
|
87
|
-
"@elizaos/plugin-
|
|
102
|
+
"@elizaos/core": "1.0.10",
|
|
103
|
+
"@elizaos/plugin-anthropic": "^1.0.0",
|
|
104
|
+
"@elizaos/plugin-bootstrap": "1.0.8",
|
|
88
105
|
"@elizaos/plugin-local-ai": "latest",
|
|
89
106
|
"@elizaos/plugin-openai": "latest",
|
|
90
|
-
"@elizaos/plugin-sql": "1.0.
|
|
107
|
+
"@elizaos/plugin-sql": "1.0.10",
|
|
108
|
+
"@elizaos/server": "1.0.10",
|
|
91
109
|
"@noble/curves": "^1.6.0",
|
|
92
110
|
"@sindresorhus/merge-streams": "^4.0.0",
|
|
93
111
|
"@types/express": "^5.0.2",
|
|
94
112
|
"@types/helmet": "^4.0.0",
|
|
95
|
-
"@types/multer": "^1.4.12",
|
|
96
113
|
"bun": "^1.2.13",
|
|
97
114
|
"chokidar": "^4.0.3",
|
|
98
115
|
"drizzle-orm": "^0.44.2",
|
|
@@ -100,7 +117,7 @@
|
|
|
100
117
|
"express": "^5.1.0",
|
|
101
118
|
"express-rate-limit": "^7.5.0",
|
|
102
119
|
"helmet": "^8.1.0",
|
|
103
|
-
"
|
|
120
|
+
"inquirer": "^12.6.3",
|
|
104
121
|
"octokit": "^4.1.3",
|
|
105
122
|
"path-to-regexp": "^8.2.0",
|
|
106
123
|
"semver": "^7.7.2",
|
|
@@ -44,9 +44,10 @@ ElizaOS provides a comprehensive testing structure for plugins:
|
|
|
44
44
|
- **Integration Tests**: Test how components work together
|
|
45
45
|
- Run with: `elizaos test component`
|
|
46
46
|
|
|
47
|
-
- **End-to-End Tests** (`e2e/` directory):
|
|
47
|
+
- **End-to-End Tests** (`__tests__/e2e/` directory):
|
|
48
48
|
|
|
49
49
|
- Test the plugin within a full ElizaOS runtime
|
|
50
|
+
- Validate complete user scenarios with a real agent
|
|
50
51
|
- Run with: `elizaos test e2e`
|
|
51
52
|
|
|
52
53
|
- **Running All Tests**:
|
|
@@ -72,26 +73,50 @@ describe('Integration: HelloWorld Action with StarterService', () => {
|
|
|
72
73
|
});
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
E2E tests
|
|
76
|
+
E2E tests run in a real ElizaOS runtime:
|
|
76
77
|
|
|
77
78
|
```typescript
|
|
78
|
-
// E2E test example (e2e/starter-plugin.
|
|
79
|
-
export
|
|
80
|
-
name
|
|
81
|
-
tests
|
|
79
|
+
// E2E test example (__tests__/e2e/starter-plugin.ts)
|
|
80
|
+
export const StarterPluginTestSuite: TestSuite = {
|
|
81
|
+
name: 'plugin_starter_test_suite',
|
|
82
|
+
description: 'E2E tests for the starter plugin',
|
|
83
|
+
tests: [
|
|
82
84
|
{
|
|
83
|
-
name: '
|
|
85
|
+
name: 'hello_world_action_test',
|
|
84
86
|
fn: async (runtime) => {
|
|
85
|
-
//
|
|
87
|
+
// Simulate user asking agent to say hello
|
|
88
|
+
const testMessage = {
|
|
89
|
+
content: { text: 'Can you say hello?' }
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// Execute action and capture response
|
|
93
|
+
const response = await helloWorldAction.handler(runtime, testMessage, ...);
|
|
94
|
+
|
|
95
|
+
// Verify agent responds with "hello world"
|
|
96
|
+
if (!response.text.includes('hello world')) {
|
|
97
|
+
throw new Error('Expected "hello world" in response');
|
|
98
|
+
}
|
|
86
99
|
},
|
|
87
100
|
},
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export default new StarterPluginTestSuite();
|
|
101
|
+
],
|
|
102
|
+
};
|
|
92
103
|
```
|
|
93
104
|
|
|
94
|
-
|
|
105
|
+
#### Key E2E Testing Features:
|
|
106
|
+
|
|
107
|
+
- **Real Runtime Environment**: Tests run with a fully initialized ElizaOS runtime
|
|
108
|
+
- **Plugin Interaction**: Test how your plugin behaves with the actual agent
|
|
109
|
+
- **Scenario Testing**: Validate complete user interactions, not just individual functions
|
|
110
|
+
- **No Mock Required**: Access real services, actions, and providers
|
|
111
|
+
|
|
112
|
+
#### Writing New E2E Tests:
|
|
113
|
+
|
|
114
|
+
1. Add a new test object to the `tests` array in your test suite
|
|
115
|
+
2. Each test receives the runtime instance as a parameter
|
|
116
|
+
3. Throw errors to indicate test failures (no assertion library needed)
|
|
117
|
+
4. See the comprehensive documentation in `__tests__/e2e/starter-plugin.ts` for detailed examples
|
|
118
|
+
|
|
119
|
+
The test utilities in `__tests__/test-utils.ts` provide mock objects and setup functions to simplify writing component tests.
|
|
95
120
|
|
|
96
121
|
## Publishing & Continuous Development
|
|
97
122
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
component: {
|
|
5
|
+
devServer: {
|
|
6
|
+
framework: 'react',
|
|
7
|
+
bundler: 'vite',
|
|
8
|
+
},
|
|
9
|
+
specPattern: 'src/__tests__/cypress/component/**/*.cy.{js,jsx,ts,tsx}',
|
|
10
|
+
supportFile: 'src/__tests__/cypress/support/component.ts',
|
|
11
|
+
indexHtmlFile: 'src/__tests__/cypress/support/component-index.html',
|
|
12
|
+
},
|
|
13
|
+
e2e: {
|
|
14
|
+
baseUrl: 'http://localhost:3000',
|
|
15
|
+
supportFile: 'src/__tests__/cypress/support/e2e.ts',
|
|
16
|
+
specPattern: 'src/__tests__/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en" class="dark">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Agent Plugin View</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/frontend/index.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@elizaos/plugin-starter",
|
|
3
3
|
"description": "${PLUGINDESCRIPTION}",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"type": "module",
|
|
@@ -41,25 +41,37 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@elizaos/core": "^1.0.0",
|
|
44
|
+
"@tanstack/react-query": "^5.80.7",
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"tailwindcss": "^4.1.10",
|
|
47
|
+
"tailwind-merge": "^3.3.1",
|
|
48
|
+
"vite": "^6.3.5",
|
|
44
49
|
"zod": "3.24.2"
|
|
45
50
|
},
|
|
46
51
|
"peerDependencies": {},
|
|
47
52
|
"devDependencies": {
|
|
53
|
+
"@cypress/react": "^9.0.1",
|
|
48
54
|
"@elizaos/cli": "^1.0.0",
|
|
55
|
+
"@tailwindcss/vite": "^4.1.10",
|
|
56
|
+
"@testing-library/cypress": "^10.0.3",
|
|
57
|
+
"@vitejs/plugin-react-swc": "^3.10.2",
|
|
58
|
+
"cypress": "^14.4.1",
|
|
49
59
|
"dotenv": "16.4.5",
|
|
50
60
|
"prettier": "3.5.3",
|
|
61
|
+
"tailwindcss-animate": "^1.0.7",
|
|
51
62
|
"tsup": "8.5.0",
|
|
52
|
-
"typescript": "5.8.2"
|
|
53
|
-
"vitest": "3.1.4"
|
|
63
|
+
"typescript": "5.8.2"
|
|
54
64
|
},
|
|
55
65
|
"scripts": {
|
|
56
66
|
"start": "elizaos start",
|
|
57
67
|
"dev": "elizaos dev",
|
|
58
|
-
"build": "tsup",
|
|
68
|
+
"build": "tsc --noEmit && vite build && tsup",
|
|
59
69
|
"lint": "prettier --write ./src",
|
|
60
|
-
"test:component": "
|
|
61
|
-
"test:e2e": "
|
|
62
|
-
"test": "
|
|
70
|
+
"test:component": "bun test",
|
|
71
|
+
"test:e2e": "bun test",
|
|
72
|
+
"test:e2e:manual": "node scripts/test-e2e-manual.js",
|
|
73
|
+
"test:cypress": "cypress run --component",
|
|
74
|
+
"test": "bun run test:component && bun run test:e2e",
|
|
63
75
|
"publish": "elizaos publish",
|
|
64
76
|
"format": "prettier --write ./src",
|
|
65
77
|
"format:check": "prettier --check ./src"
|