Skip to content

Commit 790e6e1

Browse files
authored
Merge branch 'develop' into feature/dockerized-docs-support
2 parents 555dc24 + 3b36e79 commit 790e6e1

File tree

86 files changed

+4198
-686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+4198
-686
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ IMAGE_OPENAI_MODEL= # Default: dall-e-3
2020
ETERNALAI_URL=
2121
ETERNALAI_MODEL= # Default: "neuralmagic/Meta-Llama-3.1-405B-Instruct-quantized.w4a16"
2222
ETERNALAI_API_KEY=
23+
ETERNAL_AI_LOG_REQUEST=false #Default: false
2324

2425
GROK_API_KEY= # GROK API Key
2526
GROQ_API_KEY= # Starts with gsk_
@@ -368,3 +369,7 @@ CRONOSZKEVM_PRIVATE_KEY=
368369

369370
# Fuel Ecosystem (FuelVM)
370371
FUEL_WALLET_PRIVATE_KEY=
372+
373+
# Tokenizer Settings
374+
TOKENIZER_MODEL= # Specify the tokenizer model to be used.
375+
TOKENIZER_TYPE= # Options: tiktoken (for OpenAI models) or auto (AutoTokenizer from Hugging Face for non-OpenAI models). Default: tiktoken.

.github/workflows/jsdoc-automation.yml

+28-11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,32 @@ name: JSDoc Automation
33
on:
44
workflow_dispatch:
55
inputs:
6+
jsdoc:
7+
description: 'Generate JSDoc comments (T/F)'
8+
required: true
9+
default: 'T'
10+
type: string
11+
readme:
12+
description: 'Generate README documentation (T/F)'
13+
required: true
14+
default: 'T'
15+
type: string
616
pull_number:
7-
description: 'Pull Request Number (if not provided, scans root_directory) - PR must be merged to develop branch'
17+
description: 'Pull Request Number (if not provided, scans root_directory) - PR must be merged to develop branch. DONT provide if `README documentation` is T from above'
818
required: false
919
type: string
1020
root_directory:
1121
description: 'Only scans files in this directory (relative to repository root, e.g., packages/core/src)'
1222
required: true
13-
default: 'packages/core/src/test_resources'
23+
default: 'packages/plugin-near/'
1424
type: string
1525
excluded_directories:
1626
description: 'Directories to exclude from scanning (comma-separated, relative to root_directory)'
1727
required: true
1828
default: 'node_modules,dist,test'
1929
type: string
2030
reviewers:
21-
description: 'Pull Request Reviewers (comma-separated GitHub usernames)'
31+
description: 'Pull Request Reviewers (Must be collaborator on the repository) comma-separated GitHub usernames'
2232
required: true
2333
default: ''
2434
type: string
@@ -27,6 +37,11 @@ on:
2737
required: false
2838
default: 'develop'
2939
type: string
40+
language:
41+
description: 'Documentation language (e.g., English, Spanish, French)'
42+
required: true
43+
default: 'English'
44+
type: string
3045

3146
jobs:
3247
generate-docs:
@@ -45,7 +60,7 @@ jobs:
4560
- name: Setup Node.js
4661
uses: actions/setup-node@v4
4762
with:
48-
node-version: '23'
63+
node-version: '20'
4964

5065
- name: Install pnpm
5166
uses: pnpm/action-setup@v2
@@ -71,17 +86,19 @@ jobs:
7186
working-directory: scripts/jsdoc-automation
7287
run: pnpm install --no-frozen-lockfile
7388

89+
- name: Build TypeScript
90+
working-directory: scripts/jsdoc-automation
91+
run: pnpm build
92+
7493
- name: Run documentation generator
7594
working-directory: scripts/jsdoc-automation
76-
run: |
77-
echo "Node version: $(node --version)"
78-
echo "NPM version: $(npm --version)"
79-
echo "Directory contents:"
80-
ls -la
81-
NODE_OPTIONS='--experimental-vm-modules --no-warnings' pnpm start
95+
run: pnpm start
8296
env:
8397
INPUT_ROOT_DIRECTORY: ${{ inputs.root_directory }}
8498
INPUT_PULL_NUMBER: ${{ inputs.pull_number }}
8599
INPUT_EXCLUDED_DIRECTORIES: ${{ inputs.excluded_directories }}
86100
INPUT_REVIEWERS: ${{ inputs.reviewers }}
87-
INPUT_BRANCH: ${{ inputs.branch }}
101+
INPUT_BRANCH: ${{ inputs.branch }}
102+
INPUT_LANGUAGE: ${{ inputs.language }}
103+
INPUT_JSDOC: ${{ inputs.jsdoc }}
104+
INPUT_README: ${{ inputs.readme }}

client/vite.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ export default defineConfig({
2727
},
2828
},
2929
server: {
30+
host: true,
3031
proxy: {
3132
"/api": {
32-
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
33+
target: `http://127.0.0.1:${process.env.SERVER_PORT || 3000}`,
3334
changeOrigin: true,
3435
rewrite: (path) => path.replace(/^\/api/, ""),
3536
},

packages/adapter-postgres/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/adapter-postgres",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@types/pg": "8.11.10",

packages/adapter-redis/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/adapter-redis",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"ioredis": "5.4.2"

packages/adapter-sqlite/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/adapter-sqlite",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@types/better-sqlite3": "7.6.12",

packages/adapter-sqljs/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/adapter-sqljs",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@types/sql.js": "1.4.9",

packages/adapter-supabase/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/adapter-supabase",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@supabase/supabase-js": "2.46.2"

packages/client-auto/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/client-auto",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@types/body-parser": "1.19.5",

packages/client-direct/package.json

+14
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
22
"name": "@elizaos/client-direct",
33
"version": "0.1.7-alpha.2",
44
"main": "dist/index.js",
5+
"module": "dist/index.js",
56
"type": "module",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@elizaos/plugin-image-generation": "workspace:*",

packages/client-discord/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/client-discord",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@elizaos/plugin-node": "workspace:*",

packages/client-discord/src/actions/chat_with_attachments.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -191,17 +191,16 @@ const summarizeAction = {
191191

192192
state.attachmentsWithText = attachmentsWithText;
193193
state.objective = objective;
194-
194+
const template = await trimTokens(
195+
summarizationTemplate,
196+
chunkSize + 500,
197+
runtime
198+
);
195199
const context = composeContext({
196200
state,
197201
// make sure it fits, we can pad the tokens a bit
198202
// Get the model's tokenizer based on the current model being used
199-
template: trimTokens(
200-
summarizationTemplate,
201-
chunkSize + 500,
202-
(model.model[ModelClass.SMALL] ||
203-
"gpt-4o-mini") as TiktokenModel // Use the same model as generation; Fallback if no SMALL model configured
204-
),
203+
template,
205204
});
206205

207206
const summary = await generateText({

packages/client-discord/src/actions/summarize_conversation.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,15 @@ const summarizeAction = {
261261
const chunk = chunks[i];
262262
state.currentSummary = currentSummary;
263263
state.currentChunk = chunk;
264+
const template = await trimTokens(
265+
summarizationTemplate,
266+
chunkSize + 500,
267+
runtime
268+
);
264269
const context = composeContext({
265270
state,
266271
// make sure it fits, we can pad the tokens a bit
267-
template: trimTokens(
268-
summarizationTemplate,
269-
chunkSize + 500,
270-
"gpt-4o-mini"
271-
),
272+
template,
272273
});
273274

274275
const summary = await generateText({

packages/client-discord/src/attachments.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function generateSummary(
1919
text: string
2020
): Promise<{ title: string; description: string }> {
2121
// make sure text is under 128k characters
22-
text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up
22+
text = await trimTokens(text, 100000, runtime);
2323

2424
const prompt = `Please generate a concise summary for the following text:
2525

packages/client-discord/src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export async function generateSummary(
4747
text: string
4848
): Promise<{ title: string; description: string }> {
4949
// make sure text is under 128k characters
50-
text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up
50+
text = await trimTokens(text, 100000, runtime);
5151

5252
const prompt = `Please generate a concise summary for the following text:
5353

packages/client-farcaster/package.json

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"name": "@elizaos/client-farcaster",
33
"version": "0.1.7-alpha.2",
4-
"main": "dist/index.js",
54
"type": "module",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
67
"types": "dist/index.d.ts",
8+
"exports": {
9+
"./package.json": "./package.json",
10+
".": {
11+
"import": {
12+
"@elizaos/source": "./src/index.ts",
13+
"types": "./dist/index.d.ts",
14+
"default": "./dist/index.js"
15+
}
16+
}
17+
},
18+
"files": [
19+
"dist"
20+
],
721
"dependencies": {
822
"@elizaos/core": "workspace:*",
923
"@neynar/nodejs-sdk": "^2.0.3"

0 commit comments

Comments
 (0)