Skip to content

Commit 1e657c6

Browse files
authored
Merge branch 'develop' into patch-3
2 parents efb5790 + 24729ee commit 1e657c6

Some content is hidden

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

47 files changed

+2164
-613
lines changed

.env.example

+8-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ SUPABASE_ANON_KEY=
1818
# Comma separated list of remote character urls (optional)
1919
REMOTE_CHARACTER_URLS=
2020

21+
# Logging
22+
DEFAULT_LOG_LEVEL=info
23+
LOG_JSON_FORMAT= # Print everything in logger as json; false by default
24+
2125
###############################
2226
#### Client Configurations ####
2327
###############################
@@ -232,8 +236,10 @@ LARGE_ANTHROPIC_MODEL= # Default: claude-3-5-sonnet-20241022
232236
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access
233237
SMALL_HEURIST_MODEL= # Default: meta-llama/llama-3-70b-instruct
234238
MEDIUM_HEURIST_MODEL= # Default: meta-llama/llama-3-70b-instruct
235-
LARGE_HEURIST_MODEL= # Default: meta-llama/llama-3.1-405b-instruct
236-
HEURIST_IMAGE_MODEL= # Default: PepeXL
239+
LARGE_HEURIST_MODEL= # Default: meta-llama/llama-3.3-70b-instruct
240+
HEURIST_IMAGE_MODEL= # Default: FLUX.1-dev
241+
HEURIST_EMBEDDING_MODEL= # Default: BAAI/bge-large-en-v1.5
242+
USE_HEURIST_EMBEDDING= # Set to TRUE for HEURIST embedding, leave blank for local
237243

238244
# Gaianet Configuration
239245
GAIANET_MODEL=

agent/package.json

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@elizaos/agent",
33
"version": "0.1.9-alpha.1",
4-
"version": "0.1.9-alpha.1",
54
"main": "src/index.ts",
65
"type": "module",
76
"scripts": {
@@ -32,18 +31,14 @@
3231
"@elizaos/client-telegram": "workspace:*",
3332
"@elizaos/client-twitter": "workspace:*",
3433
"@elizaos/client-instagram": "workspace:*",
35-
"@elizaos/client-instagram": "workspace:*",
3634
"@elizaos/client-slack": "workspace:*",
3735
"@elizaos/core": "workspace:*",
3836
"@elizaos/plugin-0g": "workspace:*",
3937
"@elizaos/plugin-abstract": "workspace:*",
4038
"@elizaos/plugin-agentkit": "workspace:*",
41-
"@elizaos/plugin-agentkit": "workspace:*",
4239
"@elizaos/plugin-aptos": "workspace:*",
4340
"@elizaos/plugin-birdeye": "workspace:*",
4441
"@elizaos/plugin-coingecko": "workspace:*",
45-
"@elizaos/plugin-birdeye": "workspace:*",
46-
"@elizaos/plugin-coingecko": "workspace:*",
4742
"@elizaos/plugin-coinmarketcap": "workspace:*",
4843
"@elizaos/plugin-binance": "workspace:*",
4944
"@elizaos/plugin-avail": "workspace:*",
@@ -58,7 +53,6 @@
5853
"@elizaos/plugin-gitbook": "workspace:*",
5954
"@elizaos/plugin-story": "workspace:*",
6055
"@elizaos/plugin-gitcoin-passport": "workspace:*",
61-
"@elizaos/plugin-gitcoin-passport": "workspace:*",
6256
"@elizaos/plugin-goat": "workspace:*",
6357
"@elizaos/plugin-lensNetwork": "workspace:*",
6458
"@elizaos/plugin-icp": "workspace:*",
@@ -69,10 +63,8 @@
6963
"@elizaos/plugin-node": "workspace:*",
7064
"@elizaos/plugin-solana": "workspace:*",
7165
"@elizaos/plugin-injective": "workspace:*",
72-
"@elizaos/plugin-injective": "workspace:*",
7366
"@elizaos/plugin-solana-agentkit": "workspace:*",
7467
"@elizaos/plugin-squid-router": "workspace:*",
75-
"@elizaos/plugin-squid-router": "workspace:*",
7668
"@elizaos/plugin-autonome": "workspace:*",
7769
"@elizaos/plugin-starknet": "workspace:*",
7870
"@elizaos/plugin-stargaze": "workspace:*",
@@ -96,12 +88,10 @@
9688
"@elizaos/plugin-video-generation": "workspace:*",
9789
"@elizaos/plugin-web-search": "workspace:*",
9890
"@elizaos/plugin-dexscreener": "workspace:*",
99-
"@elizaos/plugin-dexscreener": "workspace:*",
10091
"@elizaos/plugin-letzai": "workspace:*",
10192
"@elizaos/plugin-thirdweb": "workspace:*",
10293
"@elizaos/plugin-genlayer": "workspace:*",
10394
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
104-
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
10595
"@elizaos/plugin-depin": "workspace:*",
10696
"@elizaos/plugin-open-weather": "workspace:*",
10797
"@elizaos/plugin-obsidian": "workspace:*",
@@ -125,4 +115,4 @@
125115
"ts-node": "10.9.2",
126116
"tsup": "8.3.5"
127117
}
128-
}
118+
}

agent/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { SlackClientInterface } from "@elizaos/client-slack";
1111
import { TelegramClientInterface } from "@elizaos/client-telegram";
1212
import { TwitterClientInterface } from "@elizaos/client-twitter";
1313
import { FarcasterClientInterface } from "@elizaos/client-farcaster";
14+
import { DirectClient } from "@elizaos/client-direct";
1415
// import { ReclaimAdapter } from "@elizaos/plugin-reclaim";
1516
import { PrimusAdapter } from "@elizaos/plugin-primus";
1617
import { elizaCodeinPlugin, onchainJson } from "@elizaos/plugin-iq6900";
@@ -769,7 +770,7 @@ export async function createAgent(
769770
// Validate TEE configuration
770771
if (teeMode !== TEEMode.OFF && !walletSecretSalt) {
771772
elizaLogger.error(
772-
"WALLET_SECRET_SALT required when TEE_MODE is enabled"
773+
"A WALLET_SECRET_SALT required when TEE_MODE is enabled"
773774
);
774775
throw new Error("Invalid TEE configuration");
775776
}

characters/cosmosHelper.character.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"knowledge": [
2626
"Knows how Cosmos blockchain works",
27-
"Knows what actions should he call for token transfer, swapping or bridging",
27+
"Knows what actions should be called for token transfer, swapping or bridging",
2828
"Knows that users might want to do specific actions multiple times and should help them by doing it again.",
2929
"Should always ask for confirmation before calling an COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP actions.",
3030
"Should call actions COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP only after previous confirmation."
@@ -86,7 +86,7 @@
8686
{
8787
"user": "CosmosHelper",
8888
"content": {
89-
"text": "Sure, your transfer i being processed."
89+
"text": "Sure, your transfer is being processed."
9090
}
9191
}
9292
]

characters/eternalai.character.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
{
8383
"user": "{{user1}}",
8484
"content": {
85-
"text": "arent you worried about agi killing us all, or everyone gettig addicted to ai holodecks or any of that"
85+
"text": "arent you worried about agi killing us all, or everyone getting addicted to ai holodecks or any of that"
8686
}
8787
},
8888
{

client/src/components/ui/breadcrumb.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const BreadcrumbEllipsis = ({
102102
<span className="sr-only">More</span>
103103
</span>
104104
);
105-
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
105+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
106106

107107
export {
108108
Breadcrumb,

client/src/lib/api.ts

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

3-
const BASE_URL = `http://localhost:${import.meta.env.VITE_SERVER_PORT}`;
3+
const BASE_URL = `http://localhost:${import.meta.env.VITE_SERVER_PORT ?? 3000}`;
44

55
const fetcher = async ({
66
url,

client/version.cmd

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@echo off
2+
setlocal enabledelayedexpansion
3+
4+
set "LERNA_FILE=..\lerna.json"
5+
6+
if not exist "%LERNA_FILE%" (
7+
echo Error: %LERNA_FILE% does not exist.
8+
exit /b 1
9+
)
10+
11+
for /f "tokens=2 delims=:, " %%a in ('findstr "version" "%LERNA_FILE%"') do (
12+
set "VERSION=%%~a"
13+
)
14+
15+
if "!VERSION!"=="" (
16+
echo Error: Unable to extract version from %LERNA_FILE%.
17+
exit /b 1
18+
)
19+
20+
if not exist "src\" mkdir src
21+
echo { "version": !VERSION! } > src\info.json
22+
if errorlevel 1 (
23+
echo Error: Failed to write src\info.json
24+
exit /b 1
25+
)

docs/api/classes/MemoryCacheAdapter.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
### new MemoryCacheAdapter()
1212

13-
> **new MemoryCacheAdapter**(`initalData`?): [`MemoryCacheAdapter`](MemoryCacheAdapter.md)
13+
> **new MemoryCacheAdapter**(`initialData`?): [`MemoryCacheAdapter`](MemoryCacheAdapter.md)
1414
1515
#### Parameters
1616

17-
**initalData?**: `Map`\<`string`, `string`\>
17+
**initialData?**: `Map`\<`string`, `string`\>
1818

1919
#### Returns
2020

docs/community/ai16z/degenai/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ We can rebuild him
1111
- ai16z is the biggest holder of degenai (a pumpfun coin)
1212
- Current plan for ai16z still is buybacks of degenai
1313
- To-do: We need to surface this better (like a website)
14-
- DegenspartanAI also stacks his own coin as well
14+
- DegenSpartanAI also stacks his own coin as well
1515
- Shitposting while trading
1616
- He might just dump your shit
1717
- May do psyops like self fuds his own bags
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import { describe, it, expect, vi } from 'vitest';
2+
import { validateInstagramConfig, instagramEnvSchema } from '../src/environment';
3+
import { IAgentRuntime } from '@elizaos/core';
4+
5+
describe('Instagram Environment Configuration', () => {
6+
const mockRuntime: IAgentRuntime = {
7+
getSetting: vi.fn(),
8+
} as unknown as IAgentRuntime;
9+
10+
it('validates correct Instagram configuration', async () => {
11+
const validConfig = {
12+
INSTAGRAM_DRY_RUN: false,
13+
INSTAGRAM_USERNAME: 'test_user',
14+
INSTAGRAM_PASSWORD: 'test_password',
15+
INSTAGRAM_APP_ID: 'test_app_id',
16+
INSTAGRAM_APP_SECRET: 'test_app_secret',
17+
INSTAGRAM_POST_INTERVAL_MIN: 60,
18+
INSTAGRAM_POST_INTERVAL_MAX: 120,
19+
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
20+
INSTAGRAM_ACTION_INTERVAL: 5,
21+
INSTAGRAM_MAX_ACTIONS: 1,
22+
};
23+
24+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
25+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
26+
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
27+
return validConfig[key as keyof typeof validConfig];
28+
});
29+
30+
const config = await validateInstagramConfig(mockRuntime);
31+
expect(config).toEqual(validConfig);
32+
});
33+
34+
it('validates configuration with optional business account', async () => {
35+
const validConfig = {
36+
INSTAGRAM_DRY_RUN: false,
37+
INSTAGRAM_USERNAME: 'test_user',
38+
INSTAGRAM_PASSWORD: 'test_password',
39+
INSTAGRAM_APP_ID: 'test_app_id',
40+
INSTAGRAM_APP_SECRET: 'test_app_secret',
41+
INSTAGRAM_BUSINESS_ACCOUNT_ID: 'business_123',
42+
INSTAGRAM_POST_INTERVAL_MIN: 60,
43+
INSTAGRAM_POST_INTERVAL_MAX: 120,
44+
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
45+
INSTAGRAM_ACTION_INTERVAL: 5,
46+
INSTAGRAM_MAX_ACTIONS: 1,
47+
};
48+
49+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
50+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
51+
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
52+
return validConfig[key as keyof typeof validConfig];
53+
});
54+
55+
const config = await validateInstagramConfig(mockRuntime);
56+
expect(config).toEqual(validConfig);
57+
});
58+
59+
it('throws error for invalid username format', async () => {
60+
const invalidConfig = {
61+
INSTAGRAM_DRY_RUN: false,
62+
INSTAGRAM_USERNAME: 'invalid@username', // Invalid characters
63+
INSTAGRAM_PASSWORD: 'test_password',
64+
INSTAGRAM_APP_ID: 'test_app_id',
65+
INSTAGRAM_APP_SECRET: 'test_app_secret',
66+
};
67+
68+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
69+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
70+
return invalidConfig[key as keyof typeof invalidConfig];
71+
});
72+
73+
await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
74+
});
75+
76+
it('throws error for missing required fields', async () => {
77+
const invalidConfig = {
78+
INSTAGRAM_DRY_RUN: false,
79+
INSTAGRAM_USERNAME: 'test_user',
80+
// Missing password and other required fields
81+
};
82+
83+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
84+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
85+
return invalidConfig[key as keyof typeof invalidConfig];
86+
});
87+
88+
await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
89+
});
90+
});

0 commit comments

Comments
 (0)