Skip to content

Commit 2500e38

Browse files
authored
Merge branch 'develop' into odi-fix2
2 parents 47443db + c733bfa commit 2500e38

File tree

364 files changed

+9237
-12908
lines changed

Some content is hidden

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

364 files changed

+9237
-12908
lines changed

.devcontainer/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
},
1111
"privileged": true,
1212
"runArgs": [
13-
"-p=3000:3000", // Add port for server api
14-
"-p=5173:5173", // Add port for client
13+
"-p 3000:3000", // Add port for server api
14+
"-p 5173:5173", // Add port for client
1515
//"--volume=/usr/lib/wsl:/usr/lib/wsl", // uncomment for WSL
1616
//"--volume=/mnt/wslg:/mnt/wslg", // uncomment for WSL
1717
"--gpus=all", // ! uncomment for vGPU
@@ -35,4 +35,4 @@
3535
}
3636
},
3737
"features": {}
38-
}
38+
}

.env.example

+20-3
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,21 @@ SMALL_LMSTUDIO_MODEL= # Default: hermes-3-llama-3.1-8b
352352
MEDIUM_LMSTUDIO_MODEL= # Default: hermes-3-llama-3.1-8b
353353
LARGE_LMSTUDIO_MODEL= # Default: hermes-3-llama-3.1-8b
354354

355+
# Secret AI Configuration
356+
SECRET_AI_API_KEY= # Secret AI API Key
357+
SECRET_AI_URL= # Default: https://ai1.scrtlabs.com:21434
358+
SMALL_SECRET_AI_MODEL= # Default: deepseek-r1:70b
359+
MEDIUM_SECRET_AI_MODEL= # Default: deepseek-r1:70b
360+
LARGE_SECRET_AI_MODEL= # Default: deepseek-r1:70b
361+
362+
# NEAR AI (https://near.ai) Configuration
363+
NEARAI_API_URL= # Default: https://api.near.ai/v1
364+
NEARAI_API_KEY= # NEAR AI API Key (optional). If you have run `nearai login` with NEAR AI CLI, the API key will be parsed from `~/.nearai/config.json`: https://docs.near.ai/agents/quickstart/
365+
NEARAI_MODEL=
366+
SMALL_NEARAI_MODEL= # Default: fireworks::accounts/fireworks/models/llama-v3p2-3b-instruct
367+
MEDIUM_NEARAI_MODEL= # Default: fireworks::accounts/fireworks/models/llama-v3p1-70b-instruct
368+
LARGE_NEARAI_MODEL= # Default: fireworks::accounts/fireworks/models/llama-v3p1-405b-instruct
369+
355370
# Remaining Provider Configurations
356371
GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key
357372
ALI_BAILIAN_API_KEY= # Ali Bailian API Key
@@ -423,7 +438,7 @@ ABSTRACT_RPC_URL=https://api.testnet.abs.xyz
423438
# Starknet Configuration
424439
STARKNET_ADDRESS=
425440
STARKNET_PRIVATE_KEY=
426-
STARKNET_RPC_URL=
441+
STARKNET_RPC_URL=https://rpc.starknet-testnet.lava.build
427442

428443
# Lens Network Configuration
429444
LENS_ADDRESS=
@@ -555,7 +570,7 @@ NEAR_WALLET_SECRET_KEY= # NEAR Wallet Secret Key
555570
NEAR_WALLET_PUBLIC_KEY= # NEAR Wallet Public Key
556571
NEAR_ADDRESS=
557572
NEAR_SLIPPAGE=1
558-
NEAR_RPC_URL=https://rpc.testnet.near.org
573+
NEAR_RPC_URL=https://near-testnet.lava.build
559574
NEAR_NETWORK=testnet # or mainnet
560575

561576
# ZKsync Era Configuration
@@ -970,7 +985,6 @@ BUNDLE_EXECUTOR_ADDRESS= # Address of the bundle executor contract
970985
DESK_EXCHANGE_PRIVATE_KEY= # Required for trading and cancelling orders
971986
DESK_EXCHANGE_NETWORK= # "mainnet" or "testnet
972987

973-
974988
# Compass plugin configuration
975989
COMPASS_WALLET_PRIVATE_KEY=
976990
COMPASS_ARBITRUM_RPC_URL=
@@ -981,3 +995,6 @@ COMPASS_BASE_RPC_URL=
981995
DATA_API_KEY= # Your d.a.t.a API key
982996
DATA_AUTH_TOKEN= # Your d.a.t.a auth token
983997

998+
# NKN Configuration
999+
NKN_CLIENT_PRIVATE_KEY= # Required, NKN client private key
1000+
NKN_CLIENT_ID= # Optional, NKN client ID

.npmrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
node-linker=hoisted
2-
frozen-lockfile=true
1+
frozen-lockfile=true

README.md

+55
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,58 @@ We now have a [paper](https://arxiv.org/pdf/2501.06781) you can cite for the Eli
204204
## Star History
205205

206206
[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date)
207+
208+
## 🛠️ System Requirements
209+
210+
### Minimum Requirements
211+
- CPU: Dual-core processor
212+
- RAM: 4GB
213+
- Storage: 1GB free space
214+
- Internet connection: Broadband (1 Mbps+)
215+
216+
### Software Requirements
217+
- Python 2.7+ (3.8+ recommended)
218+
- Node.js 23+
219+
- pnpm
220+
- Git
221+
222+
### Optional Requirements
223+
- GPU: For running local LLM models
224+
- Additional storage: For document storage and memory
225+
- Higher RAM: For running multiple agents
226+
227+
## 📁 Project Structure
228+
```
229+
eliza/
230+
├── packages/
231+
│ ├── core/ # Core Eliza functionality
232+
│ ├── clients/ # Client implementations
233+
│ └── actions/ # Custom actions
234+
├── docs/ # Documentation
235+
├── scripts/ # Utility scripts
236+
└── examples/ # Example implementations
237+
```
238+
239+
## 🤝 Contributing
240+
241+
We welcome contributions! Here's how you can help:
242+
243+
### Getting Started
244+
1. Fork the repository
245+
2. Create a new branch: `git checkout -b feature/your-feature-name`
246+
3. Make your changes
247+
4. Run tests: `pnpm test`
248+
5. Submit a pull request
249+
250+
### Types of Contributions
251+
- 🐛 Bug fixes
252+
- ✨ New features
253+
- 📚 Documentation improvements
254+
- 🌍 Translations
255+
- 🧪 Test improvements
256+
257+
### Code Style
258+
- Follow the existing code style
259+
- Add comments for complex logic
260+
- Update documentation for changes
261+
- Add tests for new features

agent/src/index.ts

+28-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { DirectClient } from "@elizaos/client-direct";
22
import {
3+
type Adapter,
34
AgentRuntime,
45
CacheManager,
56
CacheStore,
67
type Character,
8+
type ClientInstance,
79
DbCacheAdapter,
810
elizaLogger,
911
FsCacheAdapter,
1012
type IAgentRuntime,
1113
type IDatabaseAdapter,
1214
type IDatabaseCacheAdapter,
13-
type ClientInstance,
14-
type Adapter,
1515
ModelProviderName,
1616
parseBooleanFromText,
1717
settings,
@@ -24,6 +24,7 @@ import { bootstrapPlugin } from "@elizaos/plugin-bootstrap";
2424

2525
import fs from "fs";
2626
import net from "net";
27+
import os from "os";
2728
import path from "path";
2829
import { fileURLToPath } from "url";
2930
import yargs from "yargs";
@@ -367,6 +368,7 @@ async function handlePluginImporting(plugins: string[]) {
367368
const functionName =
368369
plugin
369370
.replace("@elizaos/plugin-", "")
371+
.replace("@elizaos-plugins/plugin-", "")
370372
.replace(/-./g, (x) => x[1].toUpperCase()) +
371373
"Plugin"; // Assumes plugin function is camelCased with Plugin suffix
372374
return (
@@ -400,7 +402,10 @@ export function getTokenForProvider(
400402
case ModelProviderName.LMSTUDIO:
401403
return "";
402404
case ModelProviderName.GAIANET:
403-
return "";
405+
return (
406+
character.settings?.secrets?.GAIA_API_KEY ||
407+
settings.GAIA_API_KEY
408+
);
404409
case ModelProviderName.BEDROCK:
405410
return "";
406411
case ModelProviderName.OPENAI:
@@ -541,6 +546,23 @@ export function getTokenForProvider(
541546
character.settings?.secrets?.LIVEPEER_GATEWAY_URL ||
542547
settings.LIVEPEER_GATEWAY_URL
543548
);
549+
case ModelProviderName.SECRETAI:
550+
return (
551+
character.settings?.secrets?.SECRET_AI_API_KEY ||
552+
settings.SECRET_AI_API_KEY
553+
);
554+
case ModelProviderName.NEARAI:
555+
try {
556+
const config = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.nearai/config.json'), 'utf8'));
557+
return JSON.stringify(config?.auth);
558+
} catch (e) {
559+
elizaLogger.warn(`Error loading NEAR AI config: ${e}`);
560+
}
561+
return (
562+
character.settings?.secrets?.NEARAI_API_KEY ||
563+
settings.NEARAI_API_KEY
564+
);
565+
544566
default:
545567
const errorMessage = `Failed to get token - unsupported model provider: ${provider}`;
546568
elizaLogger.error(errorMessage);
@@ -798,10 +820,8 @@ const startAgents = async () => {
798820
}
799821

800822
// upload some agent functionality into directClient
801-
// XXX TODO: is this still used?
823+
// This is used in client-direct/api.ts at "/agents/:agentId/set" route to restart an agent
802824
directClient.startAgent = async (character) => {
803-
throw new Error('not implemented');
804-
805825
// Handle plugins
806826
character.plugins = await handlePluginImporting(character.plugins);
807827

@@ -834,12 +854,12 @@ if (
834854
parseBooleanFromText(process.env.PREVENT_UNHANDLED_EXIT)
835855
) {
836856
// Handle uncaught exceptions to prevent the process from crashing
837-
process.on("uncaughtException", function (err) {
857+
process.on("uncaughtException", (err) => {
838858
console.error("uncaughtException", err);
839859
});
840860

841861
// Handle unhandled rejections to prevent the process from crashing
842-
process.on("unhandledRejection", function (err) {
862+
process.on("unhandledRejection", (err) => {
843863
console.error("unhandledRejection", err);
844864
});
845865
}

client/src/lib/api.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import type { UUID, Character } from "@elizaos/core";
22

3-
const BASE_URL = `${import.meta.env.VITE_SERVER_URL}:${
4-
import.meta.env.VITE_SERVER_PORT
5-
}`;
3+
const BASE_URL =
4+
import.meta.env.VITE_SERVER_BASE_URL ||
5+
`${import.meta.env.VITE_SERVER_URL}:${import.meta.env.VITE_SERVER_PORT}`;
6+
7+
console.log({ BASE_URL });
68

79
const fetcher = async ({
810
url,

client/src/lib/info.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version": "0.25.6-alpha.1"}
1+
{"version": "0.25.7"}

client/vite.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ export default defineConfig(({ mode }) => {
2525
"import.meta.env.VITE_SERVER_URL": JSON.stringify(
2626
env.SERVER_URL || "http://localhost"
2727
),
28+
"import.meta.env.VITE_SERVER_BASE_URL": JSON.stringify(
29+
env.SERVER_BASE_URL
30+
)
2831
},
2932
build: {
3033
outDir: "dist",

0 commit comments

Comments
 (0)