Skip to content

Commit

Permalink
Merge branch 'develop' into fix-akash-splash-bis
Browse files Browse the repository at this point in the history
  • Loading branch information
AIFlowML authored Jan 27, 2025
2 parents d4ed0a0 + 84b59ae commit be1e3b4
Show file tree
Hide file tree
Showing 100 changed files with 6,015 additions and 651 deletions.
20 changes: 18 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (opt
# Devin Configuration
DEVIN_API_TOKEN= # Get your API key from docs.devin.ai/tutorials/api-integration

# Gelato Configuration
GELATO_RELAY_API_KEY= # Gelato API key

# Farcaster Neynar Configuration
FARCASTER_FID= # The FID associated with the account your are sending casts from
FARCASTER_NEYNAR_API_KEY= # Neynar API key: https://neynar.com/
Expand Down Expand Up @@ -517,8 +520,9 @@ APTOS_PRIVATE_KEY= # Aptos private key
APTOS_NETWORK= # Must be one of mainnet, testnet

# MultiversX
MVX_PRIVATE_KEY= # Multiversx private key
MVX_NETWORK= # must be one of mainnet, devnet, testnet
MVX_PRIVATE_KEY= # Multiversx private key
MVX_NETWORK= # must be one of mainnet, devnet, testnet
ACCESS_TOKEN_MANAGEMENT_TO=everyone # you can put an userid to limit token managament to one user only (use same id as in the database)

# NEAR
NEAR_WALLET_SECRET_KEY= # NEAR Wallet Secret Key
Expand Down Expand Up @@ -904,3 +908,15 @@ QUICKINTEL_API_KEY= # Your QuickIntel API key for token security an

# News API Key
NEWS_API_KEY= # News API KEY from https://newsapi.org/

# BTCFUN Plugin Configuration
BTCFUN_API_URL= # Default: https://api-testnet-new.btc.fun
BTC_PRIVATE_KEY_WIF= # Your BTC private key in WIF format
BTC_ADDRESS= # Your BTC address
BTC_MINT_CAP=10000 # Maximum amount that can be minted
BTC_MINT_DEADLINE=864000 # Deadline for minting in seconds
BTC_FUNDRAISING_CAP=100 # Maximum amount for fundraising

# Trikon Plugin Configuration
TRIKON_WALLET_ADDRESS= # Your Trikon wallet address (must be a valid 64-character hex string starting with '0x')
TRIKON_INITIAL_BALANCE= # (Optional) The initial balance for the wallet. Defaults to "0" if not provided.
4 changes: 4 additions & 0 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@elizaos/plugin-initia": "workspace:*",
"@elizaos/plugin-image-generation": "workspace:*",
"@elizaos/plugin-lit": "workspace:*",
"@elizaos/plugin-gelato": "workspace:*",
"@elizaos/plugin-moralis": "workspace:*",
"@elizaos/plugin-mind-network": "workspace:*",
"@elizaos/plugin-movement": "workspace:*",
Expand Down Expand Up @@ -143,6 +144,9 @@
"@elizaos/plugin-dcap": "workspace:*",
"@elizaos/plugin-form": "workspace:*",
"@elizaos/plugin-ankr": "workspace:*",
"@elizaos/client-xmtp": "workspace:*",
"@elizaos/plugin-btcfun": "workspace:*",
"@elizaos/plugin-trikon": "workspace:*",
"readline": "1.3.0",
"ws": "8.18.0",
"yargs": "17.7.2"
Expand Down
15 changes: 12 additions & 3 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import { MongoDBDatabaseAdapter } from "@elizaos/adapter-mongodb"
import { FarcasterClientInterface } from "@elizaos/client-farcaster"
import { OmniflixPlugin } from "@elizaos/plugin-omniflix"
import { JeeterClientInterface } from "@elizaos/client-simsai"

import { XmtpClientInterface } from "@elizaos/client-xmtp";
import { DirectClient } from "@elizaos/client-direct"
import { agentKitPlugin } from "@elizaos/plugin-agentkit"

import { gelatoPlugin } from "@elizaos/plugin-gelato";
import { PrimusAdapter } from "@elizaos/plugin-primus"
import { lightningPlugin } from "@elizaos/plugin-lightning"
import { elizaCodeinPlugin, onchainJson } from "@elizaos/plugin-iq6900"
Expand Down Expand Up @@ -145,7 +145,8 @@ import { ankrPlugin } from "@elizaos/plugin-ankr";
import { formPlugin } from "@elizaos/plugin-form";
import { MongoClient } from "mongodb";
import { quickIntelPlugin } from "@elizaos/plugin-quick-intel"

import { btcfunPlugin } from "@elizaos/plugin-btcfun"
import { trikonPlugin } from "@elizaos/plugin-trikon"
const __filename = fileURLToPath(import.meta.url) // get the resolved path to the file
const __dirname = path.dirname(__filename) // get the name of the directory

Expand Down Expand Up @@ -627,6 +628,11 @@ export async function initializeClients(character: Character, runtime: IAgentRun
if (autoClient) clients.auto = autoClient
}

if (clientTypes.includes(Clients.XMTP)) {
const xmtpClient = await XmtpClientInterface.start(runtime);
if (xmtpClient) clients.xmtp = xmtpClient;
}

if (clientTypes.includes(Clients.DISCORD)) {
const discordClient = await DiscordClientInterface.start(runtime)
if (discordClient) clients.discord = discordClient
Expand Down Expand Up @@ -905,6 +911,9 @@ export async function createAgent(character: Character, db: IDatabaseAdapter, ca
getSecret(character, "ANKR_WALLET") ? ankrPlugin : null,
getSecret(character, "DCAP_EVM_PRIVATE_KEY") && getSecret(character, "DCAP_MODE") ? dcapPlugin : null,
getSecret(character, "QUICKINTEL_API_KEY") ? quickIntelPlugin : null,
getSecret(character, "GELATO_RELAY_API_KEY") ? gelatoPlugin : null,
getSecret(character, "BTC_PRIVATE_KEY_WIF") && getSecret(character, "BTC_FUN_API_URL") ? btcfunPlugin : null,
getSecret(character, "TRIKON_WALLET_ADDRESS") ? trikonPlugin : null,
].flat().filter(Boolean),
providers: [],
managers: [],
Expand Down
8 changes: 6 additions & 2 deletions docs/docs/advanced/infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ const supabaseConfig = {
The memory system uses vector embeddings for semantic search:

```typescript
import { embed } from "@elizaos/core";

async function storeMemory(runtime: IAgentRuntime, content: string) {
const embedding = await runtime.embed(content);
const embedding = await embed(runtime, message.content.text);

await runtime.databaseAdapter.createMemory({
type: "message",
Expand All @@ -136,8 +138,10 @@ async function storeMemory(runtime: IAgentRuntime, content: string) {
### Memory Retrieval

```typescript
import { embed } from "@elizaos/core";

async function searchMemories(runtime: IAgentRuntime, query: string) {
const embedding = await runtime.embed(query);
const embedding = await embed(runtime, query);

return runtime.databaseAdapter.searchMemoriesByEmbedding(embedding, {
match_threshold: 0.8,
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/packages/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ export async function initializeClients(
if (clientTypes.includes(Clients.DIRECT)) {
clients.push(await AutoClientInterface.start(runtime));
}
if (clientTypes.includes(Clients.XMTP)) {
const xmtpClient = await XmtpClientInterface.start(runtime);
if (xmtpClient) clients.xmtp = xmtpClient;
}

return clients;
}
Expand Down
164 changes: 82 additions & 82 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
{
"name": "eliza",
"scripts": {
"format": "biome format --write .",
"lint": "biome lint .",
"check": "biome check --apply .",
"preinstall": "npx only-allow pnpm",
"build": "turbo run build --filter=!eliza-docs",
"build-docker": "turbo run build",
"cleanstart": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && pnpm --filter \"@elizaos/agent\" start --isRoot",
"cleanstart:debug": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && cross-env NODE_ENV=development VERBOSE=true DEFAULT_LOG_LEVEL=debug DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot",
"start": "pnpm --filter \"@elizaos/agent\" start --isRoot",
"start:client": "pnpm --dir client dev",
"start:debug": "cross-env NODE_ENV=development VERBOSE=true DEFAULT_LOG_LEVEL=debug DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot",
"dev": "bash ./scripts/dev.sh",
"release": "pnpm build && pnpm format && npx lerna publish --no-private --force-publish",
"clean": "bash ./scripts/clean.sh",
"docker:build": "bash ./scripts/docker.sh build",
"docker:run": "bash ./scripts/docker.sh run",
"docker:bash": "bash ./scripts/docker.sh bash",
"docker:start": "bash ./scripts/docker.sh start",
"docker": "pnpm docker:build && pnpm docker:run && pnpm docker:bash",
"test": "bash ./scripts/test.sh",
"smokeTests": "bash ./scripts/smokeTests.sh",
"integrationTests": "bash ./scripts/integrationTests.sh"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@commitlint/cli": "18.6.1",
"@commitlint/config-conventional": "18.6.3",
"@types/jest": "^29.5.11",
"concurrently": "9.1.0",
"cross-env": "7.0.3",
"husky": "9.1.7",
"jest": "^29.7.0",
"lerna": "8.1.5",
"only-allow": "1.2.1",
"turbo": "2.3.3",
"typedoc": "0.26.11",
"typescript": "5.6.3",
"viem": "2.21.58",
"vite": "5.4.12",
"vitest": "2.1.5"
},
"pnpm": {
"overrides": {
"onnxruntime-node": "1.20.1",
"@solana/[email protected]": "npm:@solana/[email protected]",
"@solana/[email protected]": "npm:@solana/[email protected]",
"@solana/web3.js@2": "npm:@solana/[email protected]",
"viem": "2.21.58",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@polkadot/types-create": "10.13.1",
"@polkadot/types-codec": "10.13.1",
"@ai-sdk/provider": "1.0.6",
"@ai-sdk/provider-utils": "2.1.2"
}
},
"engines": {
"node": "23.3.0"
},
"dependencies": {
"@0glabs/0g-ts-sdk": "0.2.1",
"@coinbase/coinbase-sdk": "0.10.0",
"@deepgram/sdk": "^3.9.0",
"@injectivelabs/sdk-ts": "^1.14.33",
"@vitest/eslint-plugin": "1.0.1",
"amqplib": "0.10.5",
"csv-parse": "5.6.0",
"langdetect": "^0.2.1",
"ollama-ai-provider": "0.16.1",
"optional": "0.1.4",
"pnpm": "9.14.4",
"sharp": "0.33.5",
"tslog": "4.9.3",
"bs58": "4.0.0"
},
"packageManager": "[email protected]+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee",
"workspaces": [
"packages/*"
]
}
"name": "eliza",
"scripts": {
"format": "biome format --write .",
"lint": "biome lint .",
"check": "biome check --apply .",
"preinstall": "npx only-allow pnpm",
"build": "turbo run build --filter=!eliza-docs",
"build-docker": "turbo run build",
"cleanstart": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && pnpm --filter \"@elizaos/agent\" start --isRoot",
"cleanstart:debug": "if [ -f agent/data/db.sqlite ]; then rm agent/data/db.sqlite; fi && cross-env NODE_ENV=development VERBOSE=true DEFAULT_LOG_LEVEL=debug DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot",
"start": "pnpm --filter \"@elizaos/agent\" start --isRoot",
"start:client": "pnpm --dir client dev",
"start:debug": "cross-env NODE_ENV=development VERBOSE=true DEFAULT_LOG_LEVEL=debug DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot",
"dev": "bash ./scripts/dev.sh",
"release": "pnpm build && pnpm format && npx lerna publish --no-private --force-publish",
"clean": "bash ./scripts/clean.sh",
"docker:build": "bash ./scripts/docker.sh build",
"docker:run": "bash ./scripts/docker.sh run",
"docker:bash": "bash ./scripts/docker.sh bash",
"docker:start": "bash ./scripts/docker.sh start",
"docker": "pnpm docker:build && pnpm docker:run && pnpm docker:bash",
"test": "bash ./scripts/test.sh",
"smokeTests": "bash ./scripts/smokeTests.sh",
"integrationTests": "bash ./scripts/integrationTests.sh"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@commitlint/cli": "18.6.1",
"@commitlint/config-conventional": "18.6.3",
"@types/jest": "^29.5.11",
"concurrently": "9.1.0",
"cross-env": "7.0.3",
"husky": "9.1.7",
"jest": "^29.7.0",
"lerna": "8.1.5",
"only-allow": "1.2.1",
"turbo": "2.3.3",
"typedoc": "0.26.11",
"typescript": "5.6.3",
"viem": "2.21.58",
"vite": "5.4.12",
"vitest": "2.1.5"
},
"pnpm": {
"overrides": {
"onnxruntime-node": "1.20.1",
"@solana/[email protected]": "npm:@solana/[email protected]",
"@solana/[email protected]": "npm:@solana/[email protected]",
"@solana/web3.js@2": "npm:@solana/[email protected]",
"viem": "2.21.58",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@polkadot/types-create": "10.13.1",
"@polkadot/types-codec": "10.13.1",
"@ai-sdk/provider": "1.0.6",
"@ai-sdk/provider-utils": "2.1.2",
"cookie": "0.7.0"
}
},
"engines": {
"node": "23.3.0"
},
"dependencies": {
"@0glabs/0g-ts-sdk": "0.2.1",
"@coinbase/coinbase-sdk": "0.10.0",
"@deepgram/sdk": "^3.9.0",
"@injectivelabs/sdk-ts": "^1.14.33",
"@vitest/eslint-plugin": "1.0.1",
"amqplib": "0.10.5",
"csv-parse": "5.6.0",
"langdetect": "^0.2.1",
"ollama-ai-provider": "0.16.1",
"optional": "0.1.4",
"pnpm": "9.14.4",
"sharp": "0.33.5",
"bs58": "4.0.0"
},
"packageManager": "[email protected]+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee",
"workspaces": [
"packages/*"
]
}
Loading

0 comments on commit be1e3b4

Please sign in to comment.