Skip to content

Commit d9aeb80

Browse files
committed
Build is building, jest tests are testing
1 parent d4c170a commit d9aeb80

File tree

14 files changed

+2780
-21022
lines changed

14 files changed

+2780
-21022
lines changed

core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"types": "dist/index.d.ts",
88
"scripts": {
9-
"build": "tsc",
9+
"build": "tsc -p tsconfig.json",
1010
"lint": "eslint . --fix",
1111
"start": "node --loader ts-node/esm src/index.ts",
1212
"start:arok": "node --loader ts-node/esm src/index.ts --characters=\"../characters/arok.character.json\"",

core/src/actions/askClaude.ts

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export const askClaude: Action = {
127127

128128
const response = {
129129
userId,
130+
agentId: runtime.agentId,
130131
content: callbackData,
131132
roomId,
132133
embedding: embeddingZeroVector,

core/src/clients/twitter/utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export async function sendTweetChunks(
136136

137137
const memories: Memory[] = sentTweets.map((tweet) => ({
138138
id: stringToUuid(tweet.id),
139+
agentId: client.runtime.agentId,
139140
userId: client.runtime.agentId,
140141
content: {
141142
text: tweet.text,

core/src/test_resources/basic.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, expect, it } from "@jest/globals";
2+
13
describe('Basic Test Suite', () => {
24
it('should run a basic test', () => {
35
expect(true).toBe(true);

core/src/test_resources/testSetup.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import dotenv from "dotenv";
22
import path from 'path';
33

4+
import { jest } from "@jest/globals";
5+
46
// Load test environment variables
57
dotenv.config({ path: '.env.test' });
68

core/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"noEmitOnError": false,
2121
"moduleDetection": "force",
2222
"allowArbitraryExtensions": true,
23-
"typeRoots": ["./node_modules/@types", "./types"]
23+
"typeRoots": ["./node_modules/@types", "./types", "./node_modules/jest/types"]
2424
},
2525
"include": ["src/**/*"],
2626
"exclude": ["node_modules", "dist", "src/**/*.d.ts", "types/**/*.test.ts"]

core/types/index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
declare global {
2-
interface Buffer extends Uint8Array {}
2+
interface Buffer extends Uint8Array {
3+
}
34
}
45
export {};

docs/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ This the official documentation site of eliza. A flexible, scalable and customiz
66

77
Currently eliza is dependent on Supabase for local development. You can install it with the following command:
88

9-
npm install eliza
9+
pnpm install eliza
1010

1111
# Select your database adapter
1212

13-
npm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
13+
pnpm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
1414

1515
```
1616
17-
npm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
17+
pnpm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
1818
```
1919

2020
### Set up environment variables
@@ -55,7 +55,7 @@ Once you have the CLI installed, you can run the following commands to set up a
5555
supabase start
5656
```
5757

58-
You can now start the eliza project with `npm run dev` and it will connect to the local Supabase instance by default.
58+
You can now start the eliza project with `pnpm run dev` and it will connect to the local Supabase instance by default.
5959

6060
NOTE: You will need Docker installed for this to work. If that is an issue for you, use the Supabase Cloud Setup instructions instead below).
6161

@@ -86,10 +86,10 @@ While eliza uses ChatGPT 3.5 by default, you can use a local model by setting th
8686

8787
### Development
8888

89-
npm run dev # start the server
89+
pnpm run dev # start the server
9090

9191
```
92-
npm run shell # start the shell in another terminal to talk to the default agent
92+
pnpm run shell # start the shell in another terminal to talk to the default agent
9393
```
9494

9595
### Usage

docs/api/docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
4444
You might need these
4545

4646
```
47-
npm install --include=optional sharp
47+
pnpm install --include=optional sharp
4848
```
4949

5050
### Run with Llama
@@ -68,7 +68,7 @@ If you are getting strange issues when starting up, make sure you're using Node
6868
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:
6969

7070
```
71-
npm install --include=optional sharp
71+
pnpm install --include=optional sharp
7272
```
7373

7474
# Environment Setup
@@ -95,7 +95,7 @@ TWITTER_COOKIES= # Account cookies
9595
If you have an NVIDIA GPU, you can install CUDA to speed up local inference dramatically.
9696

9797
```
98-
npm install
98+
pnpm install
9999
npx --no node-llama-cpp source download --gpu cuda
100100
```
101101

docs/api/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
4444
You might need these
4545

4646
```
47-
npm install --include=optional sharp
47+
pnpm install --include=optional sharp
4848
```
4949

5050
### Run with Llama
@@ -68,7 +68,7 @@ If you are getting strange issues when starting up, make sure you're using Node
6868
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:
6969

7070
```
71-
npm install --include=optional sharp
71+
pnpm install --include=optional sharp
7272
```
7373

7474
# Environment Setup
@@ -95,7 +95,7 @@ TWITTER_COOKIES= # Account cookies
9595
If you have an NVIDIA GPU, you can install CUDA to speed up local inference dramatically.
9696

9797
```
98-
npm install
98+
pnpm install
9999
npx --no node-llama-cpp source download --gpu cuda
100100
```
101101

docs/docs/installation.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ sidebar_position: 3
66

77
Currently eliza is dependent on Supabase for local development. You can install it with the following command:
88

9-
`npm install eliza`
9+
`pnpm install eliza`
1010

1111
## Select your database adapter
1212

1313
```
14-
npm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
14+
pnpm install sqlite-vss better-sqlite3 # for sqlite (simple, for local development)
1515
16-
npm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
16+
pnpm install @supabase/supabase-js # for supabase (more complicated but can be deployed at scale)
1717
```
1818

1919
### Set up environment variables
@@ -56,7 +56,7 @@ supabase init
5656
supabase start
5757
```
5858

59-
You can now start the eliza project with `npm run dev` and it will connect to the local Supabase instance by default.
59+
You can now start the eliza project with `pnpm run dev` and it will connect to the local Supabase instance by default.
6060

6161
NOTE: You will need Docker installed for this to work. If that is an issue for you, use the Supabase Cloud Setup instructions instead below).
6262

@@ -90,9 +90,9 @@ const runtime = new BgentRuntime({
9090
### Development
9191

9292
```
93-
npm run dev # start the server
93+
pnpm run dev # start the server
9494
95-
npm run shell # start the shell in another terminal to talk to the default agent
95+
pnpm run shell # start the shell in another terminal to talk to the default agent
9696
```
9797

9898
### Usage

0 commit comments

Comments
 (0)